diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-14 17:35:07 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-14 17:35:07 +0200 |
commit | 6d934892ecd3c4b6f025fbe2c4e6504fd979d391 (patch) | |
tree | 2e1cd2f5b136c71ad98c5231dd2f7816791f84a3 /src | |
parent | fix CTheCarGenerators::SaveAllCarGenerators (diff) | |
download | re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.tar re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.tar.gz re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.tar.bz2 re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.tar.lz re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.tar.xz re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.tar.zst re3-6d934892ecd3c4b6f025fbe2c4e6504fd979d391.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/rw/RwMatFX.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rw/RwMatFX.cpp b/src/rw/RwMatFX.cpp index ca9a633b..3af6fabe 100644 --- a/src/rw/RwMatFX.cpp +++ b/src/rw/RwMatFX.cpp @@ -43,8 +43,16 @@ struct MatFX int effects; }; +#ifdef RWLIBS +extern "C" { + extern int MatFXMaterialDataOffset; + extern int MatFXAtomicDataOffset; + void _rpMatFXD3D8AtomicMatFXEnvRender(RxD3D8InstanceData* inst, int flags, int sel, RwTexture* texture, RwTexture* envMap); +} +#else int &MatFXMaterialDataOffset = *(int*)0x66188C; int &MatFXAtomicDataOffset = *(int*)0x66189C; +#endif #ifdef PS2_MATFX @@ -206,8 +214,13 @@ _rpMatFXD3D8AtomicMatFXEnvRender_ps2(RxD3D8InstanceData *inst, int flags, int se RwD3D8SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, 0); } + STARTPATCHES +#ifdef RWLIBS + InjectHook((uintptr)&_rpMatFXD3D8AtomicMatFXEnvRender, _rpMatFXD3D8AtomicMatFXEnvRender_ps2, PATCH_JUMP); +#else InjectHook(0x5CF6C0, _rpMatFXD3D8AtomicMatFXEnvRender_ps2, PATCH_JUMP); +#endif ENDPATCHES #endif |