mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Replaced more INI reading with new functions;
Removed CityRepsCount setting (redundant)
This commit is contained in:
@@ -389,7 +389,6 @@ UseScrollingQuestsList=1
|
|||||||
|
|
||||||
;Use this line to modify the list of cities and their associated global variables used for city reputations
|
;Use this line to modify the list of cities and their associated global variables used for city reputations
|
||||||
;Syntax is 'city id : global id',with each city/global pair separated by a comma.
|
;Syntax is 'city id : global id',with each city/global pair separated by a comma.
|
||||||
;CityRepsCount=19
|
|
||||||
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
|
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
|
||||||
|
|
||||||
;Set this to a valid path to save a copy of the console contents
|
;Set this to a valid path to save a copy of the console contents
|
||||||
|
|||||||
@@ -388,11 +388,11 @@ HRESULT _stdcall FakeDirectInputCreate(HINSTANCE a, DWORD b, IDirectInputA** c,
|
|||||||
HRESULT hr = proc(a, b, c, d);
|
HRESULT hr = proc(a, b, c, d);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
reverseMouse = GetPrivateProfileInt("Input", "ReverseMouseButtons", 0, ini) != 0;
|
reverseMouse = GetConfigInt("Input", "ReverseMouseButtons", 0) != 0;
|
||||||
|
|
||||||
useScrollWheel = GetPrivateProfileInt("Input", "UseScrollWheel", 1, ini) != 0;
|
useScrollWheel = GetConfigInt("Input", "UseScrollWheel", 1) != 0;
|
||||||
wheelMod = GetPrivateProfileInt("Input", "ScrollMod", 0, ini);
|
wheelMod = GetConfigInt("Input", "ScrollMod", 0);
|
||||||
LONG MouseSpeed = GetPrivateProfileInt("Input", "MouseSensitivity", 100, ini);
|
LONG MouseSpeed = GetConfigInt("Input", "MouseSensitivity", 100);
|
||||||
if (MouseSpeed != 100) {
|
if (MouseSpeed != 100) {
|
||||||
adjustMouseSpeed = true;
|
adjustMouseSpeed = true;
|
||||||
mouseSpeedMod = ((double)MouseSpeed) / 100.0;
|
mouseSpeedMod = ((double)MouseSpeed) / 100.0;
|
||||||
@@ -400,13 +400,13 @@ HRESULT _stdcall FakeDirectInputCreate(HINSTANCE a, DWORD b, IDirectInputA** c,
|
|||||||
mousePartY = 0;
|
mousePartY = 0;
|
||||||
} else adjustMouseSpeed = false;
|
} else adjustMouseSpeed = false;
|
||||||
|
|
||||||
middleMouseKey = GetPrivateProfileInt("Input", "MiddleMouse", 0x30, ini);
|
middleMouseKey = GetConfigInt("Input", "MiddleMouse", 0x30);
|
||||||
middleMouseDown = false;
|
middleMouseDown = false;
|
||||||
|
|
||||||
backgroundKeyboard = GetPrivateProfileInt("Input", "BackgroundKeyboard", 0, ini) != 0;
|
backgroundKeyboard = GetConfigInt("Input", "BackgroundKeyboard", 0) != 0;
|
||||||
backgroundMouse = GetPrivateProfileInt("Input", "BackgroundMouse", 0, ini) != 0;
|
backgroundMouse = GetConfigInt("Input", "BackgroundMouse", 0) != 0;
|
||||||
|
|
||||||
debugEditorKey = GetPrivateProfileInt("Input", "DebugEditorKey", 0, ini);
|
debugEditorKey = GetConfigInt("Input", "DebugEditorKey", 0);
|
||||||
|
|
||||||
*c = (IDirectInputA*)new FakeDirectInput(*c);
|
*c = (IDirectInputA*)new FakeDirectInput(*c);
|
||||||
|
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ end:
|
|||||||
|
|
||||||
void AmmoMod::init() {
|
void AmmoMod::init() {
|
||||||
int formula;
|
int formula;
|
||||||
if (formula = GetPrivateProfileIntA("Misc", "DamageFormula", 0, ini)) {
|
if (formula = GetConfigInt("Misc", "DamageFormula", 0)) {
|
||||||
switch (formula) {
|
switch (formula) {
|
||||||
case 1:
|
case 1:
|
||||||
MakeCall(0x424995, &DamageFunction1, true);
|
MakeCall(0x424995, &DamageFunction1, true);
|
||||||
@@ -760,8 +760,8 @@ void AmmoMod::init() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int BonusHtHDmgFix = GetPrivateProfileIntA("Misc", "BonusHtHDamageFix", 1, ini);
|
int BonusHtHDmgFix = GetConfigInt("Misc", "BonusHtHDamageFix", 1);
|
||||||
int DisplayBonusDmg = GetPrivateProfileIntA("Misc", "DisplayBonusDamage", 0, ini);
|
int DisplayBonusDmg = GetConfigInt("Misc", "DisplayBonusDamage", 0);
|
||||||
if (BonusHtHDmgFix) {
|
if (BonusHtHDmgFix) {
|
||||||
dlog("Applying Bonus HtH Damage Perk fix.", DL_INIT);
|
dlog("Applying Bonus HtH Damage Perk fix.", DL_INIT);
|
||||||
MakeCall(0x435C0C, &MeleeDmgDispFix, true);
|
MakeCall(0x435C0C, &MeleeDmgDispFix, true);
|
||||||
@@ -774,7 +774,7 @@ void AmmoMod::init() {
|
|||||||
MakeCall(0x47854C, &HtHDamageFix1b, true);
|
MakeCall(0x47854C, &HtHDamageFix1b, true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
}
|
}
|
||||||
//if(GetPrivateProfileIntA("Misc", "SpecialUnarmedAttacksFix", 1, ini)) {
|
//if(GetConfigInt("Misc", "SpecialUnarmedAttacksFix", 1)) {
|
||||||
dlog("Applying Special Unarmed Attacks fix.", DL_INIT);
|
dlog("Applying Special Unarmed Attacks fix.", DL_INIT);
|
||||||
MakeCall(0x42394D, &UnarmedAttacksFix, true);
|
MakeCall(0x42394D, &UnarmedAttacksFix, true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ void ApplyAnimationsAtOncePatches(signed char aniMax) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnimationsAtOnce::init() {
|
void AnimationsAtOnce::init() {
|
||||||
DWORD setting = GetPrivateProfileIntA("Misc", "AnimationsAtOnceLimit", 32, ini);
|
DWORD setting = GetConfigInt("Misc", "AnimationsAtOnceLimit", 32);
|
||||||
if ((signed char)setting > 32) {
|
if ((signed char)setting > 32) {
|
||||||
dlog("Applying AnimationsAtOnceLimit patch.", DL_INIT);
|
dlog("Applying AnimationsAtOnceLimit patch.", DL_INIT);
|
||||||
ApplyAnimationsAtOncePatches((signed char)setting);
|
ApplyAnimationsAtOncePatches((signed char)setting);
|
||||||
|
|||||||
+23
-23
@@ -930,7 +930,7 @@ end:
|
|||||||
|
|
||||||
void BugFixes::init()
|
void BugFixes::init()
|
||||||
{
|
{
|
||||||
//if (GetPrivateProfileIntA("Misc", "SharpshooterFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "SharpshooterFix", 1)) {
|
||||||
dlog("Applying sharpshooter patch.", DL_INIT);
|
dlog("Applying sharpshooter patch.", DL_INIT);
|
||||||
// http://www.nma-fallout.com/threads/fo2-engine-tweaks-sfall.178390/page-119#post-4050162
|
// http://www.nma-fallout.com/threads/fo2-engine-tweaks-sfall.178390/page-119#post-4050162
|
||||||
// by Slider2k
|
// by Slider2k
|
||||||
@@ -949,7 +949,7 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|
||||||
// Fix for "Too Many Items" bug
|
// Fix for "Too Many Items" bug
|
||||||
//if (GetPrivateProfileIntA("Misc", "TooManyItemsBugFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "TooManyItemsBugFix", 1)) {
|
||||||
dlog("Applying preventive patch for \"Too Many Items\" bug.", DL_INIT);
|
dlog("Applying preventive patch for \"Too Many Items\" bug.", DL_INIT);
|
||||||
HookCall(0x4A596A, &scr_write_ScriptNode_hook);
|
HookCall(0x4A596A, &scr_write_ScriptNode_hook);
|
||||||
HookCall(0x4A59C1, &scr_write_ScriptNode_hook);
|
HookCall(0x4A59C1, &scr_write_ScriptNode_hook);
|
||||||
@@ -960,7 +960,7 @@ void BugFixes::init()
|
|||||||
MakeCall(0x49BE70, &obj_use_power_on_car_hack, false);
|
MakeCall(0x49BE70, &obj_use_power_on_car_hack, false);
|
||||||
|
|
||||||
// Fix for being able to charge the car by using cells on other scenery/critters
|
// Fix for being able to charge the car by using cells on other scenery/critters
|
||||||
if (GetPrivateProfileIntA("Misc", "CarChargingFix", 1, ini)) {
|
if (GetConfigInt("Misc", "CarChargingFix", 1)) {
|
||||||
dlog("Applying car charging fix.", DL_INIT);
|
dlog("Applying car charging fix.", DL_INIT);
|
||||||
MakeCall(0x49C36D, &protinst_default_use_item_hack, true);
|
MakeCall(0x49C36D, &protinst_default_use_item_hack, true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
@@ -979,7 +979,7 @@ void BugFixes::init()
|
|||||||
// Evil bug! If party member has the same armor type in inventory as currently equipped, then
|
// Evil bug! If party member has the same armor type in inventory as currently equipped, then
|
||||||
// on level up he loses Armor Class equal to the one received from this armor.
|
// on level up he loses Armor Class equal to the one received from this armor.
|
||||||
// The same happens if you just order NPC to remove the armor through dialogue.
|
// The same happens if you just order NPC to remove the armor through dialogue.
|
||||||
//if (GetPrivateProfileIntA("Misc", "ArmorCorruptsNPCStatsFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "ArmorCorruptsNPCStatsFix", 1)) {
|
||||||
dlog("Applying fix for armor reducing NPC original stats when removed.", DL_INIT);
|
dlog("Applying fix for armor reducing NPC original stats when removed.", DL_INIT);
|
||||||
HookCall(0x495F3B, &partyMemberCopyLevelInfo_stat_level_hook);
|
HookCall(0x495F3B, &partyMemberCopyLevelInfo_stat_level_hook);
|
||||||
HookCall(0x45419B, &correctFidForRemovedItem_adjust_ac_hook);
|
HookCall(0x45419B, &correctFidForRemovedItem_adjust_ac_hook);
|
||||||
@@ -992,7 +992,7 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|
||||||
// Allow 9 options (lines of text) to be displayed correctly in a dialog window
|
// Allow 9 options (lines of text) to be displayed correctly in a dialog window
|
||||||
if (GetPrivateProfileIntA("Misc", "DialogOptions9Lines", 1, ini)) {
|
if (GetConfigInt("Misc", "DialogOptions9Lines", 1)) {
|
||||||
dlog("Applying 9 dialog options patch.", DL_INIT);
|
dlog("Applying 9 dialog options patch.", DL_INIT);
|
||||||
MakeCall(0x44701C, &gdProcessUpdate_hack, true);
|
MakeCall(0x44701C, &gdProcessUpdate_hack, true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
@@ -1009,7 +1009,7 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|
||||||
// Fix for not counting in the weight of equipped items on NPC when stealing or bartering
|
// Fix for not counting in the weight of equipped items on NPC when stealing or bartering
|
||||||
//if (GetPrivateProfileIntA("Misc", "NPCWeightFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "NPCWeightFix", 1)) {
|
||||||
dlog("Applying fix for not counting in weight of equipped items on NPC.", DL_INIT);
|
dlog("Applying fix for not counting in weight of equipped items on NPC.", DL_INIT);
|
||||||
MakeCall(0x473B4E, &loot_container_hack, false);
|
MakeCall(0x473B4E, &loot_container_hack, false);
|
||||||
MakeCall(0x47588A, &barter_inventory_hack, false);
|
MakeCall(0x47588A, &barter_inventory_hack, false);
|
||||||
@@ -1023,7 +1023,7 @@ void BugFixes::init()
|
|||||||
SafeWrite8(0x475541, 64);
|
SafeWrite8(0x475541, 64);
|
||||||
SafeWrite8(0x475789, 64);
|
SafeWrite8(0x475789, 64);
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "InventoryDragIssuesFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "InventoryDragIssuesFix", 1)) {
|
||||||
dlog("Applying inventory reverse order issues fix.", DL_INIT);
|
dlog("Applying inventory reverse order issues fix.", DL_INIT);
|
||||||
// Fix for minor visual glitch when picking up solo item from the top of inventory
|
// Fix for minor visual glitch when picking up solo item from the top of inventory
|
||||||
// and there is multiple item stack at the bottom of inventory
|
// and there is multiple item stack at the bottom of inventory
|
||||||
@@ -1036,32 +1036,32 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "NPCLevelFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "NPCLevelFix", 1)) {
|
||||||
dlog("Applying NPC level fix.", DL_INIT);
|
dlog("Applying NPC level fix.", DL_INIT);
|
||||||
HookCall(0x495BC9, (void*)0x495E51);
|
HookCall(0x495BC9, (void*)0x495E51);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "BlackSkilldexFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "BlackSkilldexFix", 1)) {
|
||||||
dlog("Applying black skilldex patch.", DL_INIT);
|
dlog("Applying black skilldex patch.", DL_INIT);
|
||||||
HookCall(0x497D0F, &PipStatus_AddHotLines_hook);
|
HookCall(0x497D0F, &PipStatus_AddHotLines_hook);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "FixWithdrawalPerkDescCrash", 1, ini)) {
|
//if (GetConfigInt("Misc", "FixWithdrawalPerkDescCrash", 1)) {
|
||||||
dlog("Applying withdrawal perk description crash fix.", DL_INIT);
|
dlog("Applying withdrawal perk description crash fix.", DL_INIT);
|
||||||
HookCall(0x47A501, &perform_withdrawal_start_display_print_hook);
|
HookCall(0x47A501, &perform_withdrawal_start_display_print_hook);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "JetAntidoteFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "JetAntidoteFix", 1)) {
|
||||||
dlog("Applying Jet Antidote fix.", DL_INIT);
|
dlog("Applying Jet Antidote fix.", DL_INIT);
|
||||||
// the original jet antidote fix
|
// the original jet antidote fix
|
||||||
MakeCall(0x47A013, &item_d_take_drug_hack1, true);
|
MakeCall(0x47A013, &item_d_take_drug_hack1, true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "NPCDrugAddictionFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "NPCDrugAddictionFix", 1)) {
|
||||||
dlog("Applying NPC's drug addiction fix.", DL_INIT);
|
dlog("Applying NPC's drug addiction fix.", DL_INIT);
|
||||||
// proper checks for NPC's addiction instead of always using global vars
|
// proper checks for NPC's addiction instead of always using global vars
|
||||||
MakeCall(0x47A644, &item_d_check_addict_hack, true);
|
MakeCall(0x47A644, &item_d_check_addict_hack, true);
|
||||||
@@ -1069,13 +1069,13 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileInt("Misc", "ShivPatch", 1, ini)) {
|
//if (GetConfigInt("Misc", "ShivPatch", 1)) {
|
||||||
dlog("Applying shiv patch.", DL_INIT);
|
dlog("Applying shiv patch.", DL_INIT);
|
||||||
SafeWrite8(0x477B2B, 0xEB);
|
SafeWrite8(0x477B2B, 0xEB);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileInt("Misc", "ImportedProcedureFix", 0, ini)) {
|
//if (GetConfigInt("Misc", "ImportedProcedureFix", 0)) {
|
||||||
dlog("Applying imported procedure patch.", DL_INIT);
|
dlog("Applying imported procedure patch.", DL_INIT);
|
||||||
// http://teamx.ru/site_arc/smf/index.php-topic=398.0.htm
|
// http://teamx.ru/site_arc/smf/index.php-topic=398.0.htm
|
||||||
SafeWrite16(0x46B35B, 0x1C60); // Fix problems with the temporary stack
|
SafeWrite16(0x46B35B, 0x1C60); // Fix problems with the temporary stack
|
||||||
@@ -1086,21 +1086,21 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "WieldObjCritterFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "WieldObjCritterFix", 1)) {
|
||||||
dlog("Applying wield_obj_critter fix.", DL_INIT);
|
dlog("Applying wield_obj_critter fix.", DL_INIT);
|
||||||
SafeWrite8(0x456912, 0x1E);
|
SafeWrite8(0x456912, 0x1E);
|
||||||
HookCall(0x45697F, &op_wield_obj_critter_adjust_ac_hook);
|
HookCall(0x45697F, &op_wield_obj_critter_adjust_ac_hook);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "MultiHexPathingFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "MultiHexPathingFix", 1)) {
|
||||||
dlog("Applying MultiHex Pathing Fix.", DL_INIT);
|
dlog("Applying MultiHex Pathing Fix.", DL_INIT);
|
||||||
MakeCall(0x42901F, &MultiHexFix, false);
|
MakeCall(0x42901F, &MultiHexFix, false);
|
||||||
MakeCall(0x429170, &MultiHexFix, false);
|
MakeCall(0x429170, &MultiHexFix, false);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "DodgyDoorsFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "DodgyDoorsFix", 1)) {
|
||||||
dlog("Applying Dodgy Door Fix.", DL_INIT);
|
dlog("Applying Dodgy Door Fix.", DL_INIT);
|
||||||
MakeCall(0x4113D6, &action_melee_hack, true);
|
MakeCall(0x4113D6, &action_melee_hack, true);
|
||||||
MakeCall(0x411BCC, &action_ranged_hack, true);
|
MakeCall(0x411BCC, &action_ranged_hack, true);
|
||||||
@@ -1108,7 +1108,7 @@ void BugFixes::init()
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
// Fix for "NPC turns into a container" bug
|
// Fix for "NPC turns into a container" bug
|
||||||
//if (GetPrivateProfileIntA("Misc", "NPCTurnsIntoContainerFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "NPCTurnsIntoContainerFix", 1)) {
|
||||||
dlog("Applying fix for \"NPC turns into a container\" bug.", DL_INIT);
|
dlog("Applying fix for \"NPC turns into a container\" bug.", DL_INIT);
|
||||||
MakeCall(0x424F8E, &set_new_results_hack, false);
|
MakeCall(0x424F8E, &set_new_results_hack, false);
|
||||||
MakeCall(0x42E46E, &critter_wake_clear_hack, true);
|
MakeCall(0x42E46E, &critter_wake_clear_hack, true);
|
||||||
@@ -1127,7 +1127,7 @@ void BugFixes::init()
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|
||||||
// Fix for unable to sell used geiger counters or stealth boys
|
// Fix for unable to sell used geiger counters or stealth boys
|
||||||
if (GetPrivateProfileIntA("Misc", "CanSellUsedGeiger", 1, ini)) {
|
if (GetConfigInt("Misc", "CanSellUsedGeiger", 1)) {
|
||||||
dlog("Applying fix for unable to sell used geiger counters or stealth boys.", DL_INIT);
|
dlog("Applying fix for unable to sell used geiger counters or stealth boys.", DL_INIT);
|
||||||
SafeWrite8(0x478115, 0xBA);
|
SafeWrite8(0x478115, 0xBA);
|
||||||
SafeWrite8(0x478138, 0xBA);
|
SafeWrite8(0x478138, 0xBA);
|
||||||
@@ -1152,26 +1152,26 @@ void BugFixes::init()
|
|||||||
SafeWrite8(0x4C4743, 0xC6); // cmp esi, eax
|
SafeWrite8(0x4C4743, 0xC6); // cmp esi, eax
|
||||||
|
|
||||||
// Partial fix for incorrect positioning after exiting small locations (e.g. Ghost Farm)
|
// Partial fix for incorrect positioning after exiting small locations (e.g. Ghost Farm)
|
||||||
//if (GetPrivateProfileIntA("Misc", "SmallLocExitFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "SmallLocExitFix", 1)) {
|
||||||
dlog("Applying fix for incorrect positioning after exiting small locations.", DL_INIT);
|
dlog("Applying fix for incorrect positioning after exiting small locations.", DL_INIT);
|
||||||
MakeCall(0x4C5A41, &wmTeleportToArea_hack, true);
|
MakeCall(0x4C5A41, &wmTeleportToArea_hack, true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "PrintToFileFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "PrintToFileFix", 1)) {
|
||||||
dlog("Applying print to file fix.", DL_INIT);
|
dlog("Applying print to file fix.", DL_INIT);
|
||||||
MakeCall(0x4C67D4, &db_get_file_list_hack, false);
|
MakeCall(0x4C67D4, &db_get_file_list_hack, false);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Fix for display issues when calling gdialog_mod_barter with critters with no "Barter" flag set
|
// Fix for display issues when calling gdialog_mod_barter with critters with no "Barter" flag set
|
||||||
//if (GetPrivateProfileIntA("Misc", "gdBarterDispFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "gdBarterDispFix", 1)) {
|
||||||
dlog("Applying gdialog_mod_barter display fix.", DL_INIT);
|
dlog("Applying gdialog_mod_barter display fix.", DL_INIT);
|
||||||
HookCall(0x448250, &gdActivateBarter_hook);
|
HookCall(0x448250, &gdActivateBarter_hook);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (GetPrivateProfileIntA("Misc", "BagBackpackFix", 1, ini)) {
|
//if (GetConfigInt("Misc", "BagBackpackFix", 1)) {
|
||||||
// Fix for items disappearing from inventory when you try to drag them to bag/backpack in the inventory list
|
// Fix for items disappearing from inventory when you try to drag them to bag/backpack in the inventory list
|
||||||
// and are overloaded
|
// and are overloaded
|
||||||
HookCall(0x4764FC, (void*)FuncOffs::item_add_force_);
|
HookCall(0x4764FC, (void*)FuncOffs::item_add_force_);
|
||||||
|
|||||||
@@ -71,18 +71,18 @@ divEnd2:
|
|||||||
|
|
||||||
|
|
||||||
void BurstMods::init() {
|
void BurstMods::init() {
|
||||||
if (GetPrivateProfileIntA("Misc", "ComputeSprayMod", 0, ini)) {
|
if (GetConfigInt("Misc", "ComputeSprayMod", 0)) {
|
||||||
dlog("Applying ComputeSpray changes.", DL_INIT);
|
dlog("Applying ComputeSpray changes.", DL_INIT);
|
||||||
compute_spray_center_mult = GetPrivateProfileIntA("Misc", "ComputeSpray_CenterMult", 1, ini);
|
compute_spray_center_mult = GetConfigInt("Misc", "ComputeSpray_CenterMult", 1);
|
||||||
compute_spray_center_div = GetPrivateProfileIntA("Misc", "ComputeSpray_CenterDiv", 3, ini);
|
compute_spray_center_div = GetConfigInt("Misc", "ComputeSpray_CenterDiv", 3);
|
||||||
if (compute_spray_center_div < 1) {
|
if (compute_spray_center_div < 1) {
|
||||||
compute_spray_center_div = 1;
|
compute_spray_center_div = 1;
|
||||||
}
|
}
|
||||||
if (compute_spray_center_mult > compute_spray_center_div) {
|
if (compute_spray_center_mult > compute_spray_center_div) {
|
||||||
compute_spray_center_mult = compute_spray_center_div;
|
compute_spray_center_mult = compute_spray_center_div;
|
||||||
}
|
}
|
||||||
compute_spray_target_mult = GetPrivateProfileIntA("Misc", "ComputeSpray_TargetMult", 1, ini);
|
compute_spray_target_mult = GetConfigInt("Misc", "ComputeSpray_TargetMult", 1);
|
||||||
compute_spray_target_div = GetPrivateProfileIntA("Misc", "ComputeSpray_TargetDiv", 2, ini);
|
compute_spray_target_div = GetConfigInt("Misc", "ComputeSpray_TargetDiv", 2);
|
||||||
if (compute_spray_target_div < 1) {
|
if (compute_spray_target_div < 1) {
|
||||||
compute_spray_target_div = 1;
|
compute_spray_target_div = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ morelines:
|
|||||||
void Credits::init() {
|
void Credits::init() {
|
||||||
HookCall(0x480C49, &ShowCreditsHook);
|
HookCall(0x480C49, &ShowCreditsHook);
|
||||||
HookCall(0x43F881, &ShowCreditsHook);
|
HookCall(0x43F881, &ShowCreditsHook);
|
||||||
if (GetPrivateProfileIntA("Misc", "CreditsAtBottom", 0, ini)) {
|
if (GetConfigInt("Misc", "CreditsAtBottom", 0)) {
|
||||||
HookCall(0x42CB49, &CreditsNextLineHook_Bottom);
|
HookCall(0x42CB49, &CreditsNextLineHook_Bottom);
|
||||||
} else {
|
} else {
|
||||||
HookCall(0x42CB49, &CreditsNextLineHook_Top);
|
HookCall(0x42CB49, &CreditsNextLineHook_Top);
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ void CriticalTableOverride() {dlog("Initilizing critical table override.", DL_IN
|
|||||||
#undef SetEntry
|
#undef SetEntry
|
||||||
|
|
||||||
void RemoveCriticalTimeLimitsPatch() {
|
void RemoveCriticalTimeLimitsPatch() {
|
||||||
if (GetPrivateProfileIntA("Misc", "RemoveCriticalTimelimits", 0, ini)) {
|
if (GetConfigInt("Misc", "RemoveCriticalTimelimits", 0)) {
|
||||||
dlog("Removing critical time limits.", DL_INIT);
|
dlog("Removing critical time limits.", DL_INIT);
|
||||||
SafeWrite8(0x42412B, 0x90);
|
SafeWrite8(0x42412B, 0x90);
|
||||||
BlockCall(0x42412C);
|
BlockCall(0x42412C);
|
||||||
@@ -247,7 +247,7 @@ void RemoveCriticalTimeLimitsPatch() {
|
|||||||
void Criticals::init() {
|
void Criticals::init() {
|
||||||
LoadGameHook::onAfterGameStarted += CritLoad;
|
LoadGameHook::onAfterGameStarted += CritLoad;
|
||||||
|
|
||||||
mode = GetPrivateProfileIntA("Misc", "OverrideCriticalTable", 2, ini);
|
mode = GetConfigInt("Misc", "OverrideCriticalTable", 2);
|
||||||
if (mode < 0 || mode > 3) mode = 0;
|
if (mode < 0 || mode > 3) mode = 0;
|
||||||
if (mode) {
|
if (mode) {
|
||||||
CriticalTableOverride();
|
CriticalTableOverride();
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ void ResetExplosionSettings() {
|
|||||||
void Explosions::init() {
|
void Explosions::init() {
|
||||||
MakeCall(0x411AB4, &explosion_effect_hook, true); // required for explosions_metarule
|
MakeCall(0x411AB4, &explosion_effect_hook, true); // required for explosions_metarule
|
||||||
|
|
||||||
if (GetPrivateProfileIntA("Misc", "ExplosionsEmitLight", 0, ini)) {
|
if (GetConfigInt("Misc", "ExplosionsEmitLight", 0)) {
|
||||||
dlog("Initing Explosion changes.", DL_INIT);
|
dlog("Initing Explosion changes.", DL_INIT);
|
||||||
lightingEnabled = true;
|
lightingEnabled = true;
|
||||||
MakeCall(0x4118E1, &ranged_attack_lighting_fix, true);
|
MakeCall(0x4118E1, &ranged_attack_lighting_fix, true);
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ void EnableSuperSaving() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ExtraSaveSlots::init() {
|
void ExtraSaveSlots::init() {
|
||||||
if (GetPrivateProfileIntA("Misc", "ExtraSaveSlots", 0, ini)) {
|
if (GetConfigInt("Misc", "ExtraSaveSlots", 0)) {
|
||||||
dlog("Running EnableSuperSaving()", DL_INIT);
|
dlog("Running EnableSuperSaving()", DL_INIT);
|
||||||
EnableSuperSaving();
|
EnableSuperSaving();
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|||||||
@@ -744,7 +744,7 @@ void _stdcall FSresize(DWORD id, DWORD size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FileSystem::init() {
|
void FileSystem::init() {
|
||||||
if (GetPrivateProfileIntA("Misc", "UseFileSystemOverride", 0, ini)) {
|
if (GetConfigInt("Misc", "UseFileSystemOverride", 0)) {
|
||||||
FileSystemInit();
|
FileSystemInit();
|
||||||
|
|
||||||
LoadGameHook::onGameReset += FileSystemReset;
|
LoadGameHook::onGameReset += FileSystemReset;
|
||||||
|
|||||||
@@ -938,18 +938,18 @@ HRESULT _stdcall FakeDirectDrawCreate2(void*, IDirectDraw** b, void*) {
|
|||||||
movieDesc.dwHeight = 320;
|
movieDesc.dwHeight = 320;
|
||||||
movieDesc.dwWidth = 640;
|
movieDesc.dwWidth = 640;
|
||||||
|
|
||||||
gWidth = GetPrivateProfileIntA("Graphics", "GraphicsWidth", 0, ini);
|
gWidth = GetConfigInt("Graphics", "GraphicsWidth", 0);
|
||||||
gHeight = GetPrivateProfileIntA("Graphics", "GraphicsHeight", 0, ini);
|
gHeight = GetConfigInt("Graphics", "GraphicsHeight", 0);
|
||||||
if (!gWidth || !gHeight) {
|
if (!gWidth || !gHeight) {
|
||||||
gWidth = ResWidth;
|
gWidth = ResWidth;
|
||||||
gHeight = ResHeight;
|
gHeight = ResHeight;
|
||||||
}
|
}
|
||||||
GPUBlt = GetPrivateProfileIntA("Graphics", "GPUBlt", 0, ini);
|
GPUBlt = GetConfigInt("Graphics", "GPUBlt", 0);
|
||||||
if (!GPUBlt || GPUBlt > 2) GPUBlt = 2; //Swap them around to keep compatibility with old ddraw.ini's
|
if (!GPUBlt || GPUBlt > 2) GPUBlt = 2; //Swap them around to keep compatibility with old ddraw.ini's
|
||||||
else if (GPUBlt == 2) GPUBlt = 0;
|
else if (GPUBlt == 2) GPUBlt = 0;
|
||||||
|
|
||||||
if (Graphics::mode == 5) {
|
if (Graphics::mode == 5) {
|
||||||
ScrollWindowKey = GetPrivateProfileInt("Input", "WindowScrollKey", 0, ini);
|
ScrollWindowKey = GetConfigInt("Input", "WindowScrollKey", 0);
|
||||||
} else ScrollWindowKey = 0;
|
} else ScrollWindowKey = 0;
|
||||||
|
|
||||||
rcpres[0] = 1.0f / (float)gWidth;
|
rcpres[0] = 1.0f / (float)gWidth;
|
||||||
@@ -975,7 +975,7 @@ static __declspec(naked) void FadeHook() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Graphics::init() {
|
void Graphics::init() {
|
||||||
Graphics::mode = GetPrivateProfileIntA("Graphics", "Mode", 0, ini);
|
Graphics::mode = GetConfigInt("Graphics", "Mode", 0);
|
||||||
if (Graphics::mode != 4 && Graphics::mode != 5) {
|
if (Graphics::mode != 4 && Graphics::mode != 5) {
|
||||||
Graphics::mode = 0;
|
Graphics::mode = 0;
|
||||||
}
|
}
|
||||||
@@ -997,7 +997,7 @@ void Graphics::init() {
|
|||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
#undef _DLL_NAME
|
#undef _DLL_NAME
|
||||||
}
|
}
|
||||||
fadeMulti = GetPrivateProfileIntA("Graphics", "FadeMultiplier", 100, ini);
|
fadeMulti = GetConfigInt("Graphics", "FadeMultiplier", 100);
|
||||||
if (fadeMulti != 100) {
|
if (fadeMulti != 100) {
|
||||||
dlog("Applying fade patch.", DL_INIT);
|
dlog("Applying fade patch.", DL_INIT);
|
||||||
SafeWrite32(0x00493B17, ((DWORD)&FadeHook) - 0x00493B1b);
|
SafeWrite32(0x00493B17, ((DWORD)&FadeHook) - 0x00493B1b);
|
||||||
|
|||||||
@@ -2441,7 +2441,7 @@ void EnableHeroAppearanceMod() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HeroAppearance::init() {
|
void HeroAppearance::init() {
|
||||||
if (GetPrivateProfileIntA("Misc", "EnableHeroAppearanceMod", 0, ini)) {
|
if (GetConfigInt("Misc", "EnableHeroAppearanceMod", 0)) {
|
||||||
dlog("Setting up Appearance Char Screen buttons.", DL_INIT);
|
dlog("Setting up Appearance Char Screen buttons.", DL_INIT);
|
||||||
EnableHeroAppearanceMod();
|
EnableHeroAppearanceMod();
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
static const DWORD dinputPos = 0x50FB70;
|
static const DWORD dinputPos = 0x50FB70;
|
||||||
|
|
||||||
void Input::init() {
|
void Input::init() {
|
||||||
//if(GetPrivateProfileIntA("Input", "Enable", 0, ini)) {
|
//if(GetConfigInt("Input", "Enable", 0)) {
|
||||||
dlog("Applying input patch.", DL_INIT);
|
dlog("Applying input patch.", DL_INIT);
|
||||||
SafeWriteStr(dinputPos, "ddraw.dll");
|
SafeWriteStr(dinputPos, "ddraw.dll");
|
||||||
availableGlobalScriptTypes |= 1;
|
availableGlobalScriptTypes |= 1;
|
||||||
|
|||||||
+10
-10
@@ -619,16 +619,16 @@ void __declspec(naked) ItemCountFix() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InventoryReset() {
|
void InventoryReset() {
|
||||||
invenapcost = GetPrivateProfileInt("Misc", "InventoryApCost", 4, ini);
|
invenapcost = GetConfigInt("Misc", "InventoryApCost", 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inventory::init() {
|
void Inventory::init() {
|
||||||
onKeyPressed += InventoryKeyPressedHook;
|
onKeyPressed += InventoryKeyPressedHook;
|
||||||
LoadGameHook::onGameReset += InventoryReset;
|
LoadGameHook::onGameReset += InventoryReset;
|
||||||
|
|
||||||
mode = GetPrivateProfileInt("Misc", "CritterInvSizeLimitMode", 0, ini);
|
mode = GetConfigInt("Misc", "CritterInvSizeLimitMode", 0);
|
||||||
invenapcost = GetPrivateProfileInt("Misc", "InventoryApCost", 4, ini);
|
invenapcost = GetConfigInt("Misc", "InventoryApCost", 4);
|
||||||
invenapqpreduction = GetPrivateProfileInt("Misc", "QuickPocketsApCostReduction", 2, ini);
|
invenapqpreduction = GetConfigInt("Misc", "QuickPocketsApCostReduction", 2);
|
||||||
MakeCall(0x46E80B, inven_ap_cost_hook, true);
|
MakeCall(0x46E80B, inven_ap_cost_hook, true);
|
||||||
if (mode > 7) {
|
if (mode > 7) {
|
||||||
mode = 0;
|
mode = 0;
|
||||||
@@ -638,7 +638,7 @@ void Inventory::init() {
|
|||||||
SafeWrite8(0x477EB3, 0xeb);
|
SafeWrite8(0x477EB3, 0xeb);
|
||||||
}
|
}
|
||||||
if (mode) {
|
if (mode) {
|
||||||
MaxItemSize = GetPrivateProfileInt("Misc", "CritterInvSizeLimit", 100, ini);
|
MaxItemSize = GetConfigInt("Misc", "CritterInvSizeLimit", 100);
|
||||||
|
|
||||||
//Check item_add_multi (picking stuff from the floor, etc.)
|
//Check item_add_multi (picking stuff from the floor, etc.)
|
||||||
HookCall(0x4771BD, &ItemAddMultiHook1);
|
HookCall(0x4771BD, &ItemAddMultiHook1);
|
||||||
@@ -662,25 +662,25 @@ void Inventory::init() {
|
|||||||
HookCall(0x472FFE, &InvenObjExamineFuncHook);
|
HookCall(0x472FFE, &InvenObjExamineFuncHook);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetPrivateProfileInt("Misc", "SuperStimExploitFix", 0, ini)) {
|
if (GetConfigInt("Misc", "SuperStimExploitFix", 0)) {
|
||||||
GetPrivateProfileString("sfall", "SuperStimExploitMsg", "You cannot use a super stim on someone who is not injured!", SuperStimMsg, 128, translationIni);
|
GetPrivateProfileString("sfall", "SuperStimExploitMsg", "You cannot use a super stim on someone who is not injured!", SuperStimMsg, 128, translationIni);
|
||||||
MakeCall(0x49C3CC, SuperStimFix, true);
|
MakeCall(0x49C3CC, SuperStimFix, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetPrivateProfileInt("Misc", "CheckWeaponAmmoCost", 0, ini)) {
|
if (GetConfigInt("Misc", "CheckWeaponAmmoCost", 0)) {
|
||||||
MakeCall(0x4266E9, &add_check_for_item_ammo_cost, true);
|
MakeCall(0x4266E9, &add_check_for_item_ammo_cost, true);
|
||||||
MakeCall(0x4234B3, ÷_burst_rounds_by_ammo_cost, true);
|
MakeCall(0x4234B3, ÷_burst_rounds_by_ammo_cost, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReloadWeaponKey = GetPrivateProfileInt("Input", "ReloadWeaponKey", 0, ini);
|
ReloadWeaponKey = GetConfigInt("Input", "ReloadWeaponKey", 0);
|
||||||
|
|
||||||
if (GetPrivateProfileIntA("Misc", "StackEmptyWeapons", 0, ini)) {
|
if (GetConfigInt("Misc", "StackEmptyWeapons", 0)) {
|
||||||
MakeCall(0x4736C6, &inven_action_cursor_hack, true);
|
MakeCall(0x4736C6, &inven_action_cursor_hack, true);
|
||||||
HookCall(0x4772AA, &item_add_mult_hook);
|
HookCall(0x4772AA, &item_add_mult_hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not call the 'Move Items' window when using drap and drop to reload weapons in the inventory
|
// Do not call the 'Move Items' window when using drap and drop to reload weapons in the inventory
|
||||||
int ReloadReserve = GetPrivateProfileIntA("Misc", "ReloadReserve", 1, ini);
|
int ReloadReserve = GetConfigInt("Misc", "ReloadReserve", 1);
|
||||||
if (ReloadReserve >= 0) {
|
if (ReloadReserve >= 0) {
|
||||||
SafeWrite32(0x47655F, ReloadReserve); // mov eax, ReloadReserve
|
SafeWrite32(0x47655F, ReloadReserve); // mov eax, ReloadReserve
|
||||||
SafeWrite32(0x476563, 0x097EC139); // cmp ecx, eax; jle 0x476570
|
SafeWrite32(0x476563, 0x097EC139); // cmp ecx, eax; jle 0x476570
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ApplyDisplayKarmaChangesPatch() {
|
void ApplyDisplayKarmaChangesPatch() {
|
||||||
if (GetPrivateProfileInt("Misc", "DisplayKarmaChanges", 0, ini)) {
|
if (GetConfigInt("Misc", "DisplayKarmaChanges", 0)) {
|
||||||
dlog("Applying display karma changes patch.", DL_INIT);
|
dlog("Applying display karma changes patch.", DL_INIT);
|
||||||
karmaGainMsg = Translate("sfall", "KarmaGain", "You gained %d karma.");
|
karmaGainMsg = Translate("sfall", "KarmaGain", "You gained %d karma.");
|
||||||
karmaLossMsg = Translate("sfall", "KarmaLoss", "You lost %d karma.");
|
karmaLossMsg = Translate("sfall", "KarmaLoss", "You lost %d karma.");
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ void KillCounterInit(bool use) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void KillCounter::init() {
|
void KillCounter::init() {
|
||||||
if (GetPrivateProfileIntA("Misc", "ExtraKillTypes", 0, ini)) {
|
if (GetConfigInt("Misc", "ExtraKillTypes", 0)) {
|
||||||
dlog("Applying extra kill types patch.", DL_INIT);
|
dlog("Applying extra kill types patch.", DL_INIT);
|
||||||
KillCounterInit(true);
|
KillCounterInit(true);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ static void __declspec(naked) AutomapHook() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LoadGameHook::init() {
|
void LoadGameHook::init() {
|
||||||
saveInCombatFix = GetPrivateProfileInt("Misc", "SaveInCombatFix", 1, ini);
|
saveInCombatFix = GetConfigInt("Misc", "SaveInCombatFix", 1);
|
||||||
if (saveInCombatFix > 2) saveInCombatFix = 0;
|
if (saveInCombatFix > 2) saveInCombatFix = 0;
|
||||||
GetPrivateProfileString("sfall", "SaveInCombat", "Cannot save at this time", saveFailMsg, 128, translationIni);
|
GetPrivateProfileString("sfall", "SaveInCombat", "Cannot save at this time", saveFailMsg, 128, translationIni);
|
||||||
GetPrivateProfileString("sfall", "SaveSfallDataFail", "ERROR saving extended savegame information! Check if other programs interfere with savegame files/folders and try again!", saveSfallDataFailMsg, 128, translationIni);
|
GetPrivateProfileString("sfall", "SaveSfallDataFail", "ERROR saving extended savegame information! Check if other programs interfere with savegame files/folders and try again!", saveSfallDataFailMsg, 128, translationIni);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ skip:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LoadOrder::init() {
|
void LoadOrder::init() {
|
||||||
if (GetPrivateProfileIntA("Misc", "DataLoadOrderPatch", 0, ini)) {
|
if (GetConfigInt("Misc", "DataLoadOrderPatch", 0)) {
|
||||||
dlog("Applying data load order patch.", DL_INIT);
|
dlog("Applying data load order patch.", DL_INIT);
|
||||||
MakeCall(0x444259, &game_init_databases_hack1, false);
|
MakeCall(0x444259, &game_init_databases_hack1, false);
|
||||||
MakeCall(0x4442F1, &game_init_databases_hack2, false);
|
MakeCall(0x4442F1, &game_init_databases_hack2, false);
|
||||||
|
|||||||
+15
-13
@@ -87,27 +87,29 @@ static void __declspec(naked) MainMenuTextHook() {
|
|||||||
void MainMenu::init() {
|
void MainMenu::init() {
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuCreditsOffsetX", 0, ini)) {
|
if (tmp = GetConfigInt("Misc", "MainMenuCreditsOffsetX", 0)) {
|
||||||
SafeWrite32(0x481753, 0xf+tmp);
|
SafeWrite32(0x481753, 0xf + tmp);
|
||||||
}
|
}
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuCreditsOffsetY", 0, ini)) {
|
if (tmp = GetConfigInt("Misc", "MainMenuCreditsOffsetY", 0)) {
|
||||||
SafeWrite32(0x48175C, 0x1cc+tmp);
|
SafeWrite32(0x48175C, 0x1cc + tmp);
|
||||||
}
|
}
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuOffsetX", 0, ini)) {
|
if (tmp = GetConfigInt("Misc", "MainMenuOffsetX", 0)) {
|
||||||
SafeWrite32(0x48187C, 0x1e+tmp);
|
SafeWrite32(0x48187C, 0x1e + tmp);
|
||||||
MainMenuTextOffset=tmp;
|
MainMenuTextOffset = tmp;
|
||||||
}
|
}
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuOffsetY", 0, ini)) {
|
if (tmp = GetConfigInt("Misc", "MainMenuOffsetY", 0)) {
|
||||||
MainMenuYOffset=tmp;
|
MainMenuYOffset = tmp;
|
||||||
MainMenuTextOffset+=tmp*640;
|
MainMenuTextOffset += tmp * 640;
|
||||||
MakeCall(0x481844, &MainMenuButtonYHook, true);
|
MakeCall(0x481844, &MainMenuButtonYHook, true);
|
||||||
}
|
}
|
||||||
if(MainMenuTextOffset) {
|
if (MainMenuTextOffset) {
|
||||||
SafeWrite8(0x481933, 0x90);
|
SafeWrite8(0x481933, 0x90);
|
||||||
MakeCall(0x481934, &MainMenuTextYHook, false);
|
MakeCall(0x481934, &MainMenuTextYHook, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
MakeCall(0x4817AB, MainMenuTextHook, true);
|
MakeCall(0x4817AB, MainMenuTextHook, true);
|
||||||
OverrideColour=GetPrivateProfileInt("Misc", "MainMenuFontColour", 0, ini);
|
OverrideColour = GetConfigInt("Misc", "MainMenuFontColour", 0);
|
||||||
if(OverrideColour) MakeCall(0x48174C, &FontColour, false);
|
if (OverrideColour) {
|
||||||
|
MakeCall(0x48174C, &FontColour, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user