Minor edits to Worldmap.cpp & Interface.cpp (from 4.x)

This commit is contained in:
NovaRain
2020-01-02 00:43:13 +08:00
parent 9ef670161d
commit 6871e6f673
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -127,6 +127,8 @@ static void __declspec(naked) wmInterfaceRefreshCarFuel_hack() {
}
static void WorldMapInterfacePatch() {
BlockCall(0x4C2380); // Remove disabling palette animations (can be used as a place to call a hack function in wmInterfaceInit_)
if (GetConfigInt("Misc", "WorldMapFontPatch", 0)) {
dlog("Applying world map font patch.", DL_INIT);
HookCall(0x4C2343, wmInterfaceInit_text_font_hook);
+1 -1
View File
@@ -354,7 +354,7 @@ void WorldmapFpsPatch() {
if (GetConfigInt("Misc", "WorldMapEncounterFix", 0)) {
dlog("Applying world map encounter patch.", DL_INIT);
WorldMapEncounterRate = GetConfigInt("Misc", "WorldMapEncounterRate", 5);
SafeWrite32(0x4C232D, 0x01EBC031); // xor eax, eax; jmps 0x4C2332 (wmInterfaceInit_)
SafeWrite32(0x4C232D, 0xB8); // mov eax, 0; (wmInterfaceInit_)
HookCall(0x4BFEE0, wmWorldMapFunc_hook);
MakeCall(0x4C0667, wmRndEncounterOccurred_hack);
dlogr(" Done", DL_INIT);
+2 -2
View File
@@ -738,8 +738,8 @@ static void DllMain2() {
}
// Increase the max text width of the information card in the character screen
SafeWrite8(0x43ACD5, 144); // 136
SafeWrite8(0x43DD37, 144); // 133
SafeWrite8(0x43ACD5, 145); // 136
SafeWrite8(0x43DD37, 145); // 133
dlogr("Running TalkingHeadsInit().", DL_INIT);
TalkingHeadsInit();