From 8521c1772bcea428820758470645a7c46c0c4448 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Wed, 16 Nov 2022 12:09:24 +0800 Subject: [PATCH] Minor edits to a few ASM hacks (Changed 2-bytes null jcc to just 2 nop) --- sfall/Modules/DebugEditor.cpp | 2 +- sfall/Modules/Inventory.cpp | 2 +- sfall/Modules/MiscPatches.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sfall/Modules/DebugEditor.cpp b/sfall/Modules/DebugEditor.cpp index 972e16cf..2a9a87dd 100644 --- a/sfall/Modules/DebugEditor.cpp +++ b/sfall/Modules/DebugEditor.cpp @@ -440,7 +440,7 @@ static void DebugModePatch() { if (dbgMode & 1) { SafeWrite16(0x4C6E75, 0x66EB); // jmps 0x4C6EDD SafeWrite8(0x4C6EF2, CodeType::JumpShort); - SafeWrite8(0x4C7034, 0x0); + SafeWrite16(0x4C7033, 0x9090); MakeCall(0x4DC319, win_debug_hook, 2); } } else { diff --git a/sfall/Modules/Inventory.cpp b/sfall/Modules/Inventory.cpp index 24e36218..d7ceceaf 100644 --- a/sfall/Modules/Inventory.cpp +++ b/sfall/Modules/Inventory.cpp @@ -638,7 +638,7 @@ void Inventory::init() { sizeLimitMode -= 4; // item_total_weight_ patch SafeWrite8(0x477EB3, CodeType::JumpShort); - SafeWriteBatch(0, {0x477EF5, 0x477F11, 0x477F29}); + SafeWriteBatch(0x9090, {0x477EF4, 0x477F10, 0x477F28}); } invSizeMaxLimit = IniReader::GetConfigInt("Misc", "CritterInvSizeLimit", 100); diff --git a/sfall/Modules/MiscPatches.cpp b/sfall/Modules/MiscPatches.cpp index 80add436..8dec44ee 100644 --- a/sfall/Modules/MiscPatches.cpp +++ b/sfall/Modules/MiscPatches.cpp @@ -635,7 +635,7 @@ static void DisablePipboyAlarmPatch() { if (IniReader::GetConfigInt("Misc", "DisablePipboyAlarm", 0)) { dlog("Applying Disable Pip-Boy alarm button patch.", DL_INIT); SafeWrite8(0x499518, CodeType::Ret); - SafeWrite8(0x443601, 0x0); + SafeWrite8(0x443601, 0); dlogr(" Done", DL_INIT); } } @@ -671,7 +671,7 @@ static void DialogueFix() { static void AlwaysReloadMsgs() { if (IniReader::GetConfigInt("Misc", "AlwaysReloadMsgs", 0)) { dlog("Applying always reload messages patch.", DL_INIT); - SafeWrite8(0x4A6B8D, 0x0); + SafeWrite8(0x4A6B8D, 0); // jnz $+6 dlogr(" Done", DL_INIT); } } @@ -679,7 +679,7 @@ static void AlwaysReloadMsgs() { static void MusicInDialoguePatch() { if (IniReader::GetConfigInt("Misc", "EnableMusicInDialogue", 0)) { dlog("Applying music in dialogue patch.", DL_INIT); - SafeWrite8(0x44525B, 0); + SafeWrite16(0x44525A, 0x9090); //BlockCall(0x450627); dlogr(" Done", DL_INIT); }