Minor edits to a few ASM hacks

(Changed 2-bytes null jcc to just 2 nop)
This commit is contained in:
NovaRain
2022-11-16 12:19:04 +08:00
parent f7d94e16c9
commit 8521c1772b
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -638,7 +638,7 @@ void Inventory::init() {
sizeLimitMode -= 4;
// item_total_weight_ patch
SafeWrite8(0x477EB3, CodeType::JumpShort);
SafeWriteBatch<BYTE>(0, {0x477EF5, 0x477F11, 0x477F29});
SafeWriteBatch<WORD>(0x9090, {0x477EF4, 0x477F10, 0x477F28});
}
invSizeMaxLimit = IniReader::GetConfigInt("Misc", "CritterInvSizeLimit", 100);
+3 -3
View File
@@ -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);
}