Minor edits to the previous commit

This commit is contained in:
NovaRain
2021-08-06 00:54:20 +08:00
parent 865adb7ee8
commit a26b7931a6
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ static DWORD saveInCombatFix;
static bool gameLoaded = false;
static bool onLoadingMap = false;
char LoadGameHook::mapLoadingName[40]; // current loading/loaded map name
char LoadGameHook::mapLoadingName[16]; // current loading/loaded map name
long LoadGameHook::interfaceWID = -1;
@@ -439,7 +439,7 @@ static void __declspec(naked) map_load_hook() {
__asm {
mov esi, ebx;
lea edi, LoadGameHook::mapLoadingName;
mov ecx, 10;
mov ecx, 4;
rep movsd; // copy the name of the loaded map to mapLoadingName
mov onLoadingMap, 1;
call fo::funcoffs::map_load_file_;
+1 -1
View File
@@ -64,7 +64,7 @@ public:
static bool IsMapLoading();
static char mapLoadingName[40];
static char mapLoadingName[16];
static long interfaceWID;
};
+3 -3
View File
@@ -777,7 +777,7 @@ static void __declspec(naked) map_load_file_hook() {
push eax;
call InWorldMap;
test eax, eax;
jnz play;
jnz playWind;
lea eax, LoadGameHook::mapLoadingName;
call fo::funcoffs::wmMapMatchNameToIdx_;
test eax, eax;
@@ -789,10 +789,10 @@ static void __declspec(naked) map_load_file_hook() {
pop eax;
pop edx;
cmp eax, cMusicArea;
jne play;
jne playWind;
add esp, 4;
retn;
play:
playWind:
mov eax, -1;
default:
mov cMusicArea, eax;