mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
1000fps cap 'fix' removed
This commit is contained in:
parent
c9ee5c6a2b
commit
928a641669
1 changed files with 0 additions and 141 deletions
|
@ -1795,129 +1795,6 @@ DarkVehiclesFix4_MakeItDark:
|
|||
}
|
||||
// 1.0 ONLY ENDS HERE
|
||||
|
||||
static void* const FPSLimit_ReturnTrue = AddressByVersion<void*>(0x748D98, 0x74969D, 0x782D22);
|
||||
static void* const FPSLimit_ReturnFalse = AddressByVersion<void*>(0x748DA3, 0x7496A8, 0x782D2D);
|
||||
static int& FPSLimitVal = **AddressByVersion<int**>(0x619622, 0x619E42, 0x63B112);
|
||||
void __declspec(naked) YesFPSLimit()
|
||||
{
|
||||
static const double f1000 = 1000.0;
|
||||
_asm
|
||||
{
|
||||
mov eax, [FPSLimitVal]
|
||||
fild [eax]
|
||||
fdivr [f1000]
|
||||
fcomp [esp+94h-80h]
|
||||
fnstsw ax
|
||||
test ah, 5
|
||||
jp YesFPSLimit_Skip
|
||||
|
||||
jmp FPSLimit_ReturnTrue
|
||||
|
||||
YesFPSLimit_Skip:
|
||||
jmp FPSLimit_ReturnFalse
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) NoFPSLimit()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
test al, al
|
||||
jnz YesFPSLimit
|
||||
|
||||
fld1
|
||||
fcomp [esp+94h-80h]
|
||||
fnstsw ax
|
||||
test ah, 5
|
||||
jp NoFPSLimit_Skip
|
||||
|
||||
jmp FPSLimit_ReturnTrue
|
||||
|
||||
NoFPSLimit_Skip:
|
||||
jmp FPSLimit_ReturnFalse
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) YesFPSLimit_11()
|
||||
{
|
||||
static const double f1000 = 1000.0;
|
||||
_asm
|
||||
{
|
||||
mov eax, [FPSLimitVal]
|
||||
fild [eax]
|
||||
fdivr [f1000]
|
||||
fcomp [esp+1Ch]
|
||||
fnstsw ax
|
||||
test ah, 5
|
||||
jp YesFPSLimit_Skip
|
||||
|
||||
jmp FPSLimit_ReturnTrue
|
||||
|
||||
YesFPSLimit_Skip:
|
||||
jmp FPSLimit_ReturnFalse
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) NoFPSLimit_11()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
test al, al
|
||||
jnz YesFPSLimit_11
|
||||
|
||||
fld1
|
||||
fcomp [esp+1Ch]
|
||||
fnstsw ax
|
||||
test ah, 5
|
||||
jp NoFPSLimit_Skip
|
||||
|
||||
jmp FPSLimit_ReturnTrue
|
||||
|
||||
NoFPSLimit_Skip:
|
||||
jmp FPSLimit_ReturnFalse
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) YesFPSLimit_Steam()
|
||||
{
|
||||
static const double f1000 = 1000.0;
|
||||
_asm
|
||||
{
|
||||
mov eax, [FPSLimitVal]
|
||||
fild [eax]
|
||||
fdivr [f1000]
|
||||
fcomp [esp+90h-78h]
|
||||
fnstsw ax
|
||||
test ah, 5
|
||||
jp YesFPSLimit_Skip
|
||||
|
||||
jmp FPSLimit_ReturnTrue
|
||||
|
||||
YesFPSLimit_Skip:
|
||||
jmp FPSLimit_ReturnFalse
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) NoFPSLimit_Steam()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
test al, al
|
||||
jnz YesFPSLimit_Steam
|
||||
|
||||
fld1
|
||||
fcomp [esp+90h-78h]
|
||||
fnstsw ax
|
||||
test ah, 5
|
||||
jp NoFPSLimit_Skip
|
||||
|
||||
jmp FPSLimit_ReturnTrue
|
||||
|
||||
NoFPSLimit_Skip:
|
||||
jmp FPSLimit_ReturnFalse
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) GetMaxExtraDirectionals()
|
||||
{
|
||||
_asm
|
||||
|
@ -2942,12 +2819,6 @@ void Patch_SA_10()
|
|||
Patch<DWORD>(0x746368, desktop.bottom);
|
||||
Patch<const char*>(0x7463C8, aNoDesktopMode);
|
||||
|
||||
// 1000 FPS cap
|
||||
Patch<BYTE>(AddressByRegion_10<DWORD>(0x748D69), 0x18);
|
||||
Patch<BYTE>(AddressByRegion_10<DWORD>(0x748D72), 0x0F);
|
||||
InjectHook(AddressByRegion_10<DWORD>(0x748D7D), NoFPSLimit, PATCH_JUMP);
|
||||
InjectHook(AddressByRegion_10<DWORD>(0x748D82), YesFPSLimit, PATCH_JUMP);
|
||||
|
||||
// Corrected Map screen 1px issue
|
||||
Patch<float>(0x575DE7, -0.5f);
|
||||
Patch<float>(0x575DA7, -0.5f);
|
||||
|
@ -3348,12 +3219,6 @@ void Patch_SA_11()
|
|||
Patch<DWORD>(0x746BE8, desktop.bottom);
|
||||
Patch<const char*>(0x746C48, aNoDesktopMode);
|
||||
|
||||
// 1000 FPS cap
|
||||
Patch<BYTE>(AddressByRegion_11<DWORD>(0x74966E), 0x18);
|
||||
Patch<BYTE>(AddressByRegion_11<DWORD>(0x749677), 0x0F);
|
||||
InjectHook(AddressByRegion_11<DWORD>(0x749682), NoFPSLimit_11, PATCH_JUMP);
|
||||
InjectHook(AddressByRegion_11<DWORD>(0x749687), YesFPSLimit_11, PATCH_JUMP);
|
||||
|
||||
// Corrected Map screen 1px issue
|
||||
Patch<float>(0x576357, -0.5f);
|
||||
Patch<float>(0x576317, -0.5f);
|
||||
|
@ -3655,12 +3520,6 @@ void Patch_SA_Steam()
|
|||
Patch<DWORD>(0x78021E, desktop.bottom);
|
||||
Patch<const char*>(0x78027E, aNoDesktopMode);
|
||||
|
||||
// 1000 FPS cap
|
||||
Patch<BYTE>(0x782CF1, 0x18);
|
||||
Patch<BYTE>(0x782CFA, 0x0F);
|
||||
InjectHook(0x782D05, NoFPSLimit_Steam, PATCH_JUMP);
|
||||
InjectHook(0x782D0A, YesFPSLimit_Steam, PATCH_JUMP);
|
||||
|
||||
// Corrected Map screen 1px issue
|
||||
/*Patch<float>(0x575DE7, -5.0f);
|
||||
Patch<float>(0x575DA7, -5.0f);
|
||||
|
|
Loading…
Reference in a new issue