diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 053bdd08..5eeb8d1a 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -405,7 +405,7 @@ CorpseDeleteTime=6 ;Set a number of milliseconds to idle each input loop ;Set to -1 to disable -;Set to 0 to idle only if other processes are waiting for processor time +;Set to 0 to idle only if other processes of equal priority are waiting for processor time ;Set to 1 (or some higher number if needed, the maximum is 127) to prevent 100% CPU use ProcessorIdle=-1 @@ -515,9 +515,6 @@ BonusHtHDamageFix=1 ;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory DisplayBonusDamage=0 -;Set to 1 to display the range of the second attack mode in the inventory when you switch weapon modes in active item slots -DisplaySecondWeaponRange=1 - ;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127) AnimationsAtOnceLimit=120 diff --git a/artifacts/scripting/headers/sfall.h b/artifacts/scripting/headers/sfall.h index 885dd098..f2efd5f4 100644 --- a/artifacts/scripting/headers/sfall.h +++ b/artifacts/scripting/headers/sfall.h @@ -89,7 +89,7 @@ #define WINTYPE_DIALOG (1) #define WINTYPE_PIPBOY (2) #define WINTYPE_WORLDMAP (3) -#define WINTYPE_MAINIFACE (4) // the interface bar +#define WINTYPE_IFACEBAR (4) // the interface bar #define WINTYPE_CHARACTER (5) #define WINTYPE_SKILLDEX (6) #define WINTYPE_ESCMENU (7) // escape menu @@ -287,8 +287,8 @@ #define get_flags(obj) sfall_func1("get_flags", obj) #define get_ini_section(file, sect) sfall_func2("get_ini_section", file, sect) #define get_ini_sections(file) sfall_func1("get_ini_sections", file) -#define get_interface_xpos(winType) sfall_func2("get_window_attribute", winType, 0) -#define get_interface_ypos(winType) sfall_func2("get_window_attribute", winType, 1) +#define get_interface_x(winType) sfall_func2("get_window_attribute", winType, 0) +#define get_interface_y(winType) sfall_func2("get_window_attribute", winType, 1) #define get_inven_ap_cost sfall_func0("get_inven_ap_cost") #define get_map_enter_position sfall_func0("get_map_enter_position") #define get_metarule_table sfall_func0("get_metarule_table") diff --git a/sfall/FalloutEngine/EngineUtils.cpp b/sfall/FalloutEngine/EngineUtils.cpp index 7d8f1b72..e639a8b2 100644 --- a/sfall/FalloutEngine/EngineUtils.cpp +++ b/sfall/FalloutEngine/EngineUtils.cpp @@ -200,7 +200,7 @@ enum WinNameType { Dialog = 1, PipBoy = 2, WorldMap = 3, - MainIface = 4, // the interface bar + IfaceBar = 4, // the interface bar Character = 5, Skilldex = 6, EscMenu = 7, // escape menu @@ -221,7 +221,7 @@ fo::Window* GetWindow(long winType) { case WinNameType::WorldMap: winID = *(DWORD*)FO_VAR_wmBkWin; break; - case WinNameType::MainIface: + case WinNameType::IfaceBar: winID = fo::var::interfaceWindow; break; case WinNameType::Character: diff --git a/sfall/Modules/BugFixes.cpp b/sfall/Modules/BugFixes.cpp index 9e0d248c..5abb35ba 100644 --- a/sfall/Modules/BugFixes.cpp +++ b/sfall/Modules/BugFixes.cpp @@ -101,7 +101,7 @@ isFloat: } static const DWORD UnarmedAttacksFixEnd = 0x423A0D; -static void __declspec(naked) UnarmedAttacksFix() { +static void __declspec(naked) compute_attack_hack() { __asm { mov ecx, 5; // 5% chance of critical hit cmp edx, ATKTYPE_POWERKICK; // Power Kick @@ -2490,7 +2490,7 @@ void BugFixes::init() //if (GetConfigInt("Misc", "SpecialUnarmedAttacksFix", 1)) { dlog("Applying Special Unarmed Attacks fix.", DL_INIT); - MakeJump(0x42394D, UnarmedAttacksFix); + MakeJump(0x42394D, compute_attack_hack); dlogr(" Done", DL_INIT); //} diff --git a/sfall/Modules/MiscPatches.cpp b/sfall/Modules/MiscPatches.cpp index 37b75957..7eeeadf0 100644 --- a/sfall/Modules/MiscPatches.cpp +++ b/sfall/Modules/MiscPatches.cpp @@ -522,11 +522,12 @@ void DisableHorriganPatch() { } void DisplaySecondWeaponRangePatch() { - if (GetConfigInt("Misc", "DisplaySecondWeaponRange", 1)) { // TODO: remove option? + // Display the range of the second attack mode in the inventory when you switch weapon modes in active item slots + //if (GetConfigInt("Misc", "DisplaySecondWeaponRange", 1)) { dlog("Applying display second weapon range patch.", DL_INIT); HookCall(0x472201, display_stats_hook); dlogr(" Done", DL_INIT); - } + //} } void KeepWeaponSelectModePatch() { diff --git a/sfall/Modules/Scripting/Handlers/Interface.cpp b/sfall/Modules/Scripting/Handlers/Interface.cpp index 4a94554b..c8fc127a 100644 --- a/sfall/Modules/Scripting/Handlers/Interface.cpp +++ b/sfall/Modules/Scripting/Handlers/Interface.cpp @@ -553,10 +553,10 @@ void sf_get_window_attribute(OpcodeContext& ctx) { } long pos = 0; switch (ctx.arg(1).rawValue()) { - case 0 : // x + case 0: // x pos = win->wRect.left; break; - case 1 : // y + case 1: // y pos = win->wRect.top; break; }