From 898e7bb4e0fde1ae4fa6c7417eff47647c4baa62 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Thu, 5 Oct 2023 09:08:37 +0800 Subject: [PATCH] Removed AdditionalWeaponAnims from ddraw.ini (always enabled) Updated version number. --- artifacts/ddraw.ini | 3 ++- artifacts/scripting/hookscripts.md | 2 +- sfall/InputFuncs.cpp | 2 +- sfall/Modules/MiscPatches.cpp | 4 ++-- sfall/version.h | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 6d01468c..f0af4a59 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -1,5 +1,5 @@ ;sfall configuration settings -;v3.8.40 +;v3.8.40.2 [Main] ;Set to 1 if you want to use command line arguments to tell sfall to use another ini file @@ -407,6 +407,7 @@ SaveInCombatFix=1 ;Set to 1 to enable additional weapon animation codes from 'o' to 't' ;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10 ;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corresponds to 's' and 15 to 't' +;This option is always enabled in 4.4.0.2/3.8.40.2 or later. The information is left for reference only AdditionalWeaponAnims=1 ;Uncomment these lines to modify the default modifiers for aimed shots at specific bodyparts diff --git a/artifacts/scripting/hookscripts.md b/artifacts/scripting/hookscripts.md index 201d8360..0f24e1dc 100644 --- a/artifacts/scripting/hookscripts.md +++ b/artifacts/scripting/hookscripts.md @@ -597,7 +597,7 @@ int arg0 - event type: -1 - combat ends abruptly (by script or by pressing Enter during PC turn) -2 - combat ends normally (hook always runs at the end of combat) Critter arg1 - critter doing the turn -bool arg2 - 1 at the start/end of the player's turn after loading a game saved in combat mode, 0 otherwise +int arg2 - 1 at the start/end of the player's turn after loading a game saved in combat mode, 0 otherwise int ret0 - pass 1 at the start of turn to skip the turn, pass -1 at the end of turn to force end of combat ``` diff --git a/sfall/InputFuncs.cpp b/sfall/InputFuncs.cpp index a86e1040..aa6d4cea 100644 --- a/sfall/InputFuncs.cpp +++ b/sfall/InputFuncs.cpp @@ -107,7 +107,7 @@ DWORD __stdcall KeyDown(DWORD key) { if ((key & 0x80000000) > 0) { // special flag to check by VK code directly return GetAsyncKeyState(key & 0xFFFF) & 0x8000; } - key = key & 0xFFFF; + key &= 0xFFFF; // combined use of DINPUT states + confirmation from GetAsyncKeyState() if (key < MAX_KEYS) { if (keysDown[key]) { // confirm pressed state diff --git a/sfall/Modules/MiscPatches.cpp b/sfall/Modules/MiscPatches.cpp index 0eda4a46..9c14ec29 100644 --- a/sfall/Modules/MiscPatches.cpp +++ b/sfall/Modules/MiscPatches.cpp @@ -500,7 +500,7 @@ static void __declspec(naked) map_check_state_hook_redraw() { } static void AdditionalWeaponAnimsPatch() { - if (IniReader::GetConfigInt("Misc", "AdditionalWeaponAnims", 0)) { + //if (IniReader::GetConfigInt("Misc", "AdditionalWeaponAnims", 1)) { dlogr("Applying additional weapon animations patch.", DL_INIT); SafeWrite8(0x419320, 18); // art_get_code_ const DWORD weaponAnimAddr[] = { @@ -508,7 +508,7 @@ static void AdditionalWeaponAnimsPatch() { 0x4194CC // art_get_name_ }; HookCalls(WeaponAnimHook, weaponAnimAddr); - } + //} } static void SkilldexImagesPatch() { diff --git a/sfall/version.h b/sfall/version.h index ac41bd15..7a48c350 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -25,6 +25,6 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 #define VERSION_BUILD 40 -#define VERSION_REV 1 +#define VERSION_REV 2 -#define VERSION_STRING "3.8.40.1" +#define VERSION_STRING "3.8.40.2"