From 01f7c39d1e35cdce0b5d0ee217fcbdaab1eb5cc2 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 22 Dec 2017 01:07:51 +0100 Subject: [PATCH] Modulo over CLoadingScreen::m_currDisplayedSplash - imfast compatible --- SilentPatchSA/SilentPatchSA.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 586aef9..d812948 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -2509,6 +2509,15 @@ BOOL InjectDelayedPatches_10() } } + // For imfast compatibility + if ( MemEquals( 0x590ADE, { 0xFF, 0x05 } ) ) + { + // Modulo over CLoadingScreen::m_currDisplayedSplash + Nop( 0x590ADE, 1 ); + InjectHook( 0x590ADE + 1, DoPCScreenChange_Mod, PATCH_CALL ); + Patch( 0x590042 + 2, &currDisplayedSplash_ForLastSplash ); + } + #ifndef NDEBUG if ( const int QPCDays = GetPrivateProfileIntW(L"Debug", L"AddDaysToQPC", 0, wcModulePath); QPCDays != 0 ) { @@ -3364,12 +3373,6 @@ void Patch_SA_10() InjectHook( 0x6E2B6E, RecordVehicleDeleted_AndRemoveFromVehicleList ); - // Modulo over CLoadingScreen::m_currDisplayedSplash - Nop( 0x590ADE, 1 ); - InjectHook( 0x590ADE + 1, DoPCScreenChange_Mod, PATCH_CALL ); - Patch( 0x590042 + 2, &currDisplayedSplash_ForLastSplash ); - - // Don't include an extra D3DLIGHT on vehicles since we fixed directional already // By aap Patch(0x5D88D1 + 6, 0);