diff options
Diffstat (limited to '')
-rw-r--r-- | src/render/Shadows.cpp | 81 |
1 files changed, 18 insertions, 63 deletions
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index e14b0453..8685b93a 100644 --- a/src/render/Shadows.cpp +++ b/src/render/Shadows.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "TxdStore.h" #include "Timer.h" @@ -20,43 +20,31 @@ SETTWEAKPATH("Shadows"); TWEAKBOOL(gbPrintShite); -#if 1 RwImVertexIndex ShadowIndexList[24]; -#else -RwImVertexIndex (&ShadowIndexList)[24] = *(RwImVertexIndex (*)[24])*(int *)0x649188; -#endif -RwTexture *&gpShadowCarTex = *(RwTexture **)0x8F2C90; -RwTexture *&gpShadowPedTex = *(RwTexture **)0x8F59D0; -RwTexture *&gpShadowHeliTex = *(RwTexture **)0x8E2A90; -RwTexture *&gpShadowExplosionTex = *(RwTexture **)0x8F2A00; -RwTexture *&gpShadowHeadLightsTex = *(RwTexture **)0x95CB98; -RwTexture *&gpOutline1Tex = *(RwTexture **)0x8F1B24; -RwTexture *&gpOutline2Tex = *(RwTexture **)0x8F1B04; -RwTexture *&gpOutline3Tex = *(RwTexture **)0x8F1B08; -RwTexture *&gpBloodPoolTex = *(RwTexture **)0x9415F8; -RwTexture *&gpReflectionTex = *(RwTexture **)0x8F582C; -RwTexture *&gpGoalMarkerTex = *(RwTexture **)0x94142C; -RwTexture *&gpWalkDontTex = *(RwTexture **)0x95CB4C; -RwTexture *&gpCrackedGlassTex = *(RwTexture **)0x95CB94; -RwTexture *&gpPostShadowTex = *(RwTexture **)0x8F59D4; -RwTexture *&gpGoalTex = *(RwTexture**)0x94142C; - -#if 1 +RwTexture *gpShadowCarTex; +RwTexture *gpShadowPedTex; +RwTexture *gpShadowHeliTex; +RwTexture *gpShadowExplosionTex; +RwTexture *gpShadowHeadLightsTex; +RwTexture *gpOutline1Tex; +RwTexture *gpOutline2Tex; +RwTexture *gpOutline3Tex; +RwTexture *gpBloodPoolTex; +RwTexture *gpReflectionTex; +RwTexture *gpGoalMarkerTex; +RwTexture *gpWalkDontTex; +RwTexture *gpCrackedGlassTex; +RwTexture *gpPostShadowTex; +RwTexture *gpGoalTex; + int16 CShadows::ShadowsStoredToBeRendered; CStoredShadow CShadows::asShadowsStored [MAX_STOREDSHADOWS]; CPolyBunch CShadows::aPolyBunches [MAX_POLYBUNCHES]; CStaticShadow CShadows::aStaticShadows [MAX_STATICSHADOWS]; CPolyBunch *CShadows::pEmptyBunchList; CPermanentShadow CShadows::aPermanentShadows[MAX_PERMAMENTSHADOWS]; -#else -int16 &CShadows::ShadowsStoredToBeRendered = *(int16*)0x95CCEE; -CStoredShadow (&CShadows::asShadowsStored)[MAX_STOREDSHADOWS] = *(CStoredShadow (*)[MAX_STOREDSHADOWS])*(int *)0x779058; -CPolyBunch (&CShadows::aPolyBunches)[MAX_POLYBUNCHES] = *(CPolyBunch (*)[MAX_POLYBUNCHES])*(int *)0x86F4C8; -CStaticShadow (&CShadows::aStaticShadows)[MAX_STATICSHADOWS] = *(CStaticShadow (*)[MAX_STATICSHADOWS])*(int *)0x773BE8; -CPolyBunch *&CShadows::pEmptyBunchList = *(CPolyBunch**)0x8F435C; -CPermanentShadow (&CShadows::aPermanentShadows)[MAX_PERMAMENTSHADOWS] = *(CPermanentShadow (*)[MAX_PERMAMENTSHADOWS])*(int *)0x712040; -#endif + void CShadows::Init(void) @@ -1772,36 +1760,3 @@ CShadows::RenderIndicatorShadow(uint32 nID, uint8 ShadowType, RwTexture *pTextur 0, 128, 255, 128, 2048, 0.2f, 0); } - - -STARTPATCHES - InjectHook(0x512AB0, CShadows::Init, PATCH_JUMP); - InjectHook(0x512F20, CShadows::Shutdown, PATCH_JUMP); - InjectHook(0x512FD0, CShadows::AddPermanentShadow, PATCH_JUMP); - InjectHook(0x5130A0, CShadows::StoreStaticShadow, PATCH_JUMP); - InjectHook(0x513550, (void(*)(uint8, CVector *, float, float, float, float, int16, uint8, uint8, uint8))CShadows::StoreShadowToBeRendered, PATCH_JUMP); - InjectHook(0x513750, (void(*)(uint8, RwTexture *, CVector *, float, float, float, float, int16, uint8, uint8, uint8, float, bool, float))CShadows::StoreShadowToBeRendered, PATCH_JUMP); - InjectHook(0x513830, CShadows::StoreShadowForCar, PATCH_JUMP); - InjectHook(0x513A70, CShadows::StoreCarLightShadow, PATCH_JUMP); - InjectHook(0x513C50, CShadows::StoreShadowForPed, PATCH_JUMP); - InjectHook(0x513CB0, CShadows::StoreShadowForPedObject, PATCH_JUMP); - InjectHook(0x513E00, CShadows::StoreShadowForTree, PATCH_JUMP); - InjectHook(0x513E10, CShadows::StoreShadowForPole, PATCH_JUMP); - InjectHook(0x513FC0, CShadows::SetRenderModeForShadowType, PATCH_JUMP); - InjectHook(0x514010, CShadows::RenderStoredShadows, PATCH_JUMP); - InjectHook(0x5145F0, CShadows::RenderStaticShadows, PATCH_JUMP); - InjectHook(0x514910, CShadows::GeneratePolysForStaticShadow, PATCH_JUMP); - InjectHook(0x514C90, CShadows::CastShadowSectorList, PATCH_JUMP); - InjectHook(0x514E30, CShadows::CastShadowEntity, PATCH_JUMP); - InjectHook(0x516BE0, CShadows::UpdateStaticShadows, PATCH_JUMP); - InjectHook(0x516C40, CShadows::UpdatePermanentShadows, PATCH_JUMP); - InjectHook(0x516E70, &CStaticShadow::Free, PATCH_JUMP); - InjectHook(0x516EB0, CShadows::CalcPedShadowValues, PATCH_JUMP); - InjectHook(0x516F90, CShadows::RenderExtraPlayerShadows, PATCH_JUMP); - InjectHook(0x517570, CShadows::TidyUpShadows, PATCH_JUMP); - InjectHook(0x517810, CShadows::RenderIndicatorShadow, PATCH_JUMP); - //InjectHook(0x517900, &CPermanentShadow::CPermanentShadow, PATCH_JUMP); - //InjectHook(0x517910, &CStaticShadow::CStaticShadow, PATCH_JUMP); - //InjectHook(0x517920, &CPolyBunch::CPolyBunch, PATCH_JUMP); - //InjectHook(0x517940, &CStoredShadow::CStoredShadow, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file |