Merge pull request #215 from diamante0018/fix-pm-func

Fix PM_IsAdsAllowed stub
This commit is contained in:
Dss0 2022-04-09 23:36:37 +02:00 committed by GitHub
commit d2602f2f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 10 deletions

View File

@ -1128,19 +1128,23 @@ namespace Game
}
}
bool PM_IsAdsAllowed(Game::playerState_s* playerState)
__declspec(naked) bool PM_IsAdsAllowed(playerState_s* /*ps*/)
{
bool result;
__asm
{
mov esi, playerState
mov ebx, 0x5755A0
call ebx
mov result, al // AL
}
push eax
pushad
return result;
mov esi, [esp + 0x24 + 0x4] // ps
mov ecx, 0x5755A0
call ecx
mov [esp + 0x20], eax
popad
pop eax
ret
}
}
__declspec(naked) void FS_AddLocalizedGameDirectory(const char* /*path*/, const char* /*dir*/)

View File

@ -1102,7 +1102,7 @@ namespace Game
void FS_AddLocalizedGameDirectory(const char *path, const char *dir);
bool PM_IsAdsAllowed(Game::playerState_s* playerState);
bool PM_IsAdsAllowed(playerState_s* ps);
void ShowMessageBox(const std::string& message, const std::string& title);