mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Replaced some address hacks with simplified ones (e.g. using jumps in stead of multiple NOPs), to be in line with the changes in 3.8 branch (commit 16be32d284)
This commit is contained in:
@@ -398,8 +398,7 @@ void NpcAutoLevelPatch() {
|
||||
npcAutoLevelEnabled = GetConfigInt("Misc", "NPCAutoLevel", 0) != 0;
|
||||
if (npcAutoLevelEnabled) {
|
||||
dlog("Applying NPC autolevel patch.", DL_INIT);
|
||||
SafeWrite16(0x00495D22, 0x9090);
|
||||
SafeWrite32(0x00495D24, 0x90909090);
|
||||
SafeWrite8(0x495CFB, 0xEB); // jmps 0x495D28 (skip random check)
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
|
||||
@@ -678,16 +677,14 @@ void DontDeleteProtosPatch() {
|
||||
void AlwaysReloadMsgs() {
|
||||
if (GetConfigInt("Misc", "AlwaysReloadMsgs", 0)) {
|
||||
dlog("Applying always reload messages patch.", DL_INIT);
|
||||
SafeWrite8(0x4A6B8A, 0xff);
|
||||
SafeWrite32(0x4A6B8B, 0x02eb0074);
|
||||
SafeWrite8(0x4A6B8D, 0x0);
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveWindowRoundingPatch() {
|
||||
if(GetConfigInt("Misc", "RemoveWindowRounding", 0)) {
|
||||
SafeWrite32(0x4B8090, 0x90909090);
|
||||
SafeWrite16(0x4B8094, 0x9090);
|
||||
SafeWrite16(0x4B8090, 0x04EB); // jmps 0x4B8096
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -538,10 +538,8 @@ less:
|
||||
|
||||
void SkipOpeningMoviesPatch() {
|
||||
if (GetConfigInt("Misc", "SkipOpeningMovies", 0)) {
|
||||
dlog("Blocking opening movies.", DL_INIT);
|
||||
BlockCall(0x4809CB);
|
||||
BlockCall(0x4809D4);
|
||||
BlockCall(0x4809E0);
|
||||
dlog("Skipping opening movies.", DL_INIT);
|
||||
SafeWrite16(0x4809C7, 0x1CEB); // jmps 0x4809E5
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user