mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
plugin-sdk compatibility fix
This commit is contained in:
parent
7fa464818b
commit
f5ea953e95
1 changed files with 8 additions and 5 deletions
|
@ -1711,11 +1711,14 @@ WRAPPER RwBool _rpD3D9VertexDeclarationInstColor(RwUInt8 *mem,
|
||||||
|
|
||||||
WRAPPER bool IsVisionFXActive() { EAXJMP(0x7034F0); }
|
WRAPPER bool IsVisionFXActive() { EAXJMP(0x7034F0); }
|
||||||
|
|
||||||
|
static BOOL (*IsAlreadyRunning)();
|
||||||
|
static void (*TheScriptsLoad)();
|
||||||
|
static bool (*InitialiseRenderWare)();
|
||||||
|
|
||||||
bool ShaderAttach()
|
bool ShaderAttach()
|
||||||
{
|
{
|
||||||
// CGame::InitialiseRenderWare
|
// CGame::InitialiseRenderWare
|
||||||
// TODO: EXEs
|
if ( InitialiseRenderWare() )
|
||||||
if ( ((bool(*)())0x5BD600)() )
|
|
||||||
{
|
{
|
||||||
RwD3D9CreateVertexShader(reinterpret_cast<const RwUInt32*>(g_vs20_NVC_vertex_shader), reinterpret_cast<void**>(&pNVCShader));
|
RwD3D9CreateVertexShader(reinterpret_cast<const RwUInt32*>(g_vs20_NVC_vertex_shader), reinterpret_cast<void**>(&pNVCShader));
|
||||||
return true;
|
return true;
|
||||||
|
@ -2001,9 +2004,6 @@ void __declspec(naked) LightMaterialsFix()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL (*IsAlreadyRunning)();
|
|
||||||
static void (*TheScriptsLoad)();
|
|
||||||
|
|
||||||
static unsigned char* ScriptSpace = *(unsigned char**)0x5D5380;
|
static unsigned char* ScriptSpace = *(unsigned char**)0x5D5380;
|
||||||
static int* ScriptParams = *(int**)0x48995B;
|
static int* ScriptParams = *(int**)0x48995B;
|
||||||
|
|
||||||
|
@ -2132,6 +2132,9 @@ BOOL InjectDelayedPatches_10()
|
||||||
if ( !bSAMP && GetPrivateProfileIntW(L"SilentPatch", L"NVCShader", TRUE, wcModulePath) != FALSE )
|
if ( !bSAMP && GetPrivateProfileIntW(L"SilentPatch", L"NVCShader", TRUE, wcModulePath) != FALSE )
|
||||||
{
|
{
|
||||||
// Shaders!
|
// Shaders!
|
||||||
|
// plugin-sdk compatibility
|
||||||
|
InitialiseRenderWare = (bool(*)())(*(int*)0x5BF3A2 + 0x5BF3A1 + 5);
|
||||||
|
|
||||||
InjectHook(0x5DA743, SetShader);
|
InjectHook(0x5DA743, SetShader);
|
||||||
InjectHook(0x5D66F1, SetShader2);
|
InjectHook(0x5D66F1, SetShader2);
|
||||||
InjectHook(0x5D6116, UsageIndex1, PATCH_JUMP);
|
InjectHook(0x5D6116, UsageIndex1, PATCH_JUMP);
|
||||||
|
|
Loading…
Reference in a new issue