diff options
Diffstat (limited to 'src/render')
29 files changed, 29 insertions, 445 deletions
diff --git a/src/render/Antennas.cpp b/src/render/Antennas.cpp index d564c196..452069a0 100644 --- a/src/render/Antennas.cpp +++ b/src/render/Antennas.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Antennas.h" CAntenna CAntennas::aAntennas[NUMANTENNAS]; @@ -123,17 +123,3 @@ CAntenna::Update(CVector dir, CVector basepos) pos[i] = newpos; } } - -STARTPATCHES - InjectHook(0x4F64D0, &CAntennas::Init, PATCH_JUMP); - InjectHook(0x4F6550, &CAntennas::Update, PATCH_JUMP); - InjectHook(0x4F66C0, &CAntennas::RegisterOne, PATCH_JUMP); - InjectHook(0x4F6590, &CAntennas::Render, PATCH_JUMP); - InjectHook(0x4F6830, &CAntenna::Update, PATCH_JUMP); - - // give to cheetah for testing -// Patch<int>(0x535B50+1, 105); -// Patch<float>(0x535B57+7, -0.84); -// Patch<float>(0x535B74+7, 0.78); -// Patch<float>(0x535B69+7, 0.24); -ENDPATCHES diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp index 02035896..58dc3f93 100644 --- a/src/render/Clouds.cpp +++ b/src/render/Clouds.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Sprite.h" #include "Sprite2d.h" #include "General.h" @@ -430,12 +430,3 @@ CClouds::RenderHorizon(void) CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2), ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop); } - -STARTPATCHES - InjectHook(0x4F6C10, CClouds::Init, PATCH_JUMP); - InjectHook(0x4F6CA0, CClouds::Shutdown, PATCH_JUMP); - InjectHook(0x4F6CE0, CClouds::Update, PATCH_JUMP); - InjectHook(0x4F6D90, CClouds::Render, PATCH_JUMP); - InjectHook(0x4F7F00, CClouds::RenderBackground, PATCH_JUMP); - InjectHook(0x4F85F0, CClouds::RenderHorizon, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Console.cpp b/src/render/Console.cpp index bfdb2701..5ae5d763 100644 --- a/src/render/Console.cpp +++ b/src/render/Console.cpp @@ -1,6 +1,6 @@ #include "common.h" #include <stdarg.h> -#include "patcher.h" + #include "Console.h" #include "Font.h" #include "Timer.h" diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp index d70f70d6..b21e087b 100644 --- a/src/render/Coronas.cpp +++ b/src/render/Coronas.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "General.h" #include "TxdStore.h" @@ -572,17 +572,3 @@ CRegisteredCorona::Update(void) firstUpdate = false; registeredThisFrame = false; } - -STARTPATCHES - InjectHook(0x4F9F90, CCoronas::Init, PATCH_JUMP); - InjectHook(0x4FA050, CCoronas::Shutdown, PATCH_JUMP); - InjectHook(0x4F8EC0, CCoronas::Update, PATCH_JUMP); - InjectHook(0x4FA0E0, (void (*)(uint32, uint8, uint8, uint8, uint8, const CVector&, float, float, RwTexture*, int8, uint8, uint8, uint8, float))CCoronas::RegisterCorona, PATCH_JUMP); - InjectHook(0x4FA080, (void (*)(uint32, uint8, uint8, uint8, uint8, const CVector&, float, float, uint8, int8, uint8, uint8, uint8, float))CCoronas::RegisterCorona, PATCH_JUMP); - InjectHook(0x4FA2D0, CCoronas::UpdateCoronaCoors, PATCH_JUMP); - InjectHook(0x4F8FB0, CCoronas::Render, PATCH_JUMP); - InjectHook(0x4F9B40, CCoronas::RenderReflections, PATCH_JUMP); - InjectHook(0x4FA380, CCoronas::DoSunAndMoon, PATCH_JUMP); - - InjectHook(0x4F8C40, &CRegisteredCorona::Update, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Credits.cpp b/src/render/Credits.cpp index 25f7bbcf..dc0b0252 100644 --- a/src/render/Credits.cpp +++ b/src/render/Credits.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Timer.h" #include "Font.h" #include "Frontend.h" @@ -497,13 +497,3 @@ bool CCredits::AreCreditsDone(void) { return !bCreditsGoing; } - -STARTPATCHES - InjectHook(0x4FE7A0, CCredits::Init, PATCH_JUMP); - InjectHook(0x4FE760, CCredits::Start, PATCH_JUMP); - InjectHook(0x4FE780, CCredits::Stop, PATCH_JUMP); - InjectHook(0x4FE790, CCredits::AreCreditsDone, PATCH_JUMP); - InjectHook(0x4FADF0, CCredits::Render, PATCH_JUMP); - InjectHook(0x4FE710, CCredits::PrintCreditSpace, PATCH_JUMP); - InjectHook(0x4FE620, CCredits::PrintCreditText, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index dcbb6342..b31cc624 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Draw.h" #include "Frontend.h" #include "Camera.h" @@ -66,10 +66,3 @@ CDraw::SetFOV(float fov) ms_fFOV = fov; #endif } - -STARTPATCHES - InjectHook(0x4FE7B0, CDraw::SetFOV, PATCH_JUMP); - - Nop(0x46B618, 2); - Patch<float>(0x5F0A64, 1.3333334f); -ENDPATCHES diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp index e2899532..e068747e 100644 --- a/src/render/Fluff.cpp +++ b/src/render/Fluff.cpp @@ -1,6 +1,6 @@ #include "common.h" #include "main.h" -#include "patcher.h" + #include "Entity.h" #include "Fluff.h" #include "Camera.h" @@ -864,31 +864,3 @@ void CDigitalClock::Render() CSprite::FlushSpriteBuffer(); } } - -STARTPATCHES -InjectHook(0x4FF290, &CMovingThing::Update, PATCH_JUMP); -InjectHook(0x4FF320, &CMovingThing::AddToList, PATCH_JUMP); -InjectHook(0x4FF340, &CMovingThing::RemoveFromList, PATCH_JUMP); - -InjectHook(0x4FE7C0, &CMovingThings::Init, PATCH_JUMP); -InjectHook(0x4FF020, &CMovingThings::Shutdown, PATCH_JUMP); -InjectHook(0x4FF0D0, &CMovingThings::Update, PATCH_JUMP); -InjectHook(0x4FF210, &CMovingThings::Render, PATCH_JUMP); - -InjectHook(0x4FF360, &FindTunnelMessage, PATCH_JUMP); -InjectHook(0x4FF390, &FindBridgeMessage, PATCH_JUMP); -InjectHook(0x4FF3C0, &FindTimeMessage, PATCH_JUMP); -InjectHook(0x4FF450, &FindDigitalClockMessage, PATCH_JUMP); - -InjectHook(0x4FF610, &CScrollBar::Init, PATCH_JUMP); -InjectHook(0x4FF6E0, &CScrollBar::Update, PATCH_JUMP); -InjectHook(0x4FFCE0, &CScrollBar::Render, PATCH_JUMP); - -InjectHook(0x5000D0, &CTowerClock::Init, PATCH_JUMP); -InjectHook(0x500130, &CTowerClock::Update, PATCH_JUMP); -InjectHook(0x5001D0, &CTowerClock::Render, PATCH_JUMP); - -InjectHook(0x5004F0, &CDigitalClock::Init, PATCH_JUMP); -InjectHook(0x500550, &CDigitalClock::Update, PATCH_JUMP); -InjectHook(0x5005F0, &CDigitalClock::Render, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Font.cpp b/src/render/Font.cpp index ba4c4301..14a678b8 100644 --- a/src/render/Font.cpp +++ b/src/render/Font.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Sprite2d.h" #include "TxdStore.h" #include "Font.h" @@ -589,48 +589,3 @@ CFont::character_code(uint8 c) return c; return foreign_table[c-128]; } - -STARTPATCHES - - InjectHook(0x500A40, CFont::Initialise, PATCH_JUMP); - InjectHook(0x500BA0, CFont::Shutdown, PATCH_JUMP); - InjectHook(0x500BE0, CFont::InitPerFrame, PATCH_JUMP); - InjectHook(0x500C30, CFont::PrintChar, PATCH_JUMP); - InjectHook(0x500F50, (void (*)(float, float, wchar*))CFont::PrintString, PATCH_JUMP); - InjectHook(0x501260, CFont::GetNumberLines, PATCH_JUMP); - InjectHook(0x5013B0, CFont::GetTextRect, PATCH_JUMP); - InjectHook(0x501730, (void (*)(float, float, wchar*, wchar*, float))CFont::PrintString, PATCH_JUMP); - InjectHook(0x5017E0, CFont::GetCharacterWidth, PATCH_JUMP); - InjectHook(0x501840, CFont::GetCharacterSize, PATCH_JUMP); - InjectHook(0x5018A0, CFont::GetStringWidth, PATCH_JUMP); - InjectHook(0x501960, CFont::GetNextSpace, PATCH_JUMP); - InjectHook(0x5019A0, CFont::ParseToken, PATCH_JUMP); - InjectHook(0x501B50, CFont::DrawFonts, PATCH_JUMP); - InjectHook(0x501E80, CFont::character_code, PATCH_JUMP); - - InjectHook(0x501B80, CFont::SetScale, PATCH_JUMP); - InjectHook(0x501BA0, CFont::SetSlantRefPoint, PATCH_JUMP); - InjectHook(0x501BC0, CFont::SetSlant, PATCH_JUMP); - InjectHook(0x501BD0, CFont::SetColor, PATCH_JUMP); - InjectHook(0x501C60, CFont::SetJustifyOn, PATCH_JUMP); - InjectHook(0x501C80, CFont::SetJustifyOff, PATCH_JUMP); - InjectHook(0x501C90, CFont::SetCentreOn, PATCH_JUMP); - InjectHook(0x501CB0, CFont::SetCentreOff, PATCH_JUMP); - InjectHook(0x501CC0, CFont::SetWrapx, PATCH_JUMP); - InjectHook(0x501CD0, CFont::SetCentreSize, PATCH_JUMP); - InjectHook(0x501CE0, CFont::SetBackgroundOn, PATCH_JUMP); - InjectHook(0x501CF0, CFont::SetBackgroundOff, PATCH_JUMP); - InjectHook(0x501D00, CFont::SetBackgroundColor, PATCH_JUMP); - InjectHook(0x501D30, CFont::SetBackGroundOnlyTextOn, PATCH_JUMP); - InjectHook(0x501D40, CFont::SetBackGroundOnlyTextOff, PATCH_JUMP); - InjectHook(0x501D50, CFont::SetRightJustifyOn, PATCH_JUMP); - InjectHook(0x501D70, CFont::SetRightJustifyOff, PATCH_JUMP); - InjectHook(0x501D90, CFont::SetPropOff, PATCH_JUMP); - InjectHook(0x501DA0, CFont::SetPropOn, PATCH_JUMP); - InjectHook(0x501DB0, CFont::SetFontStyle, PATCH_JUMP); - InjectHook(0x501DC0, CFont::SetRightJustifyWrap, PATCH_JUMP); - InjectHook(0x501DD0, CFont::SetAlphaFade, PATCH_JUMP); - InjectHook(0x501DE0, CFont::SetDropColor, PATCH_JUMP); - InjectHook(0x501E70, CFont::SetDropShadowPosition, PATCH_JUMP); - -ENDPATCHES diff --git a/src/render/Glass.cpp b/src/render/Glass.cpp index ac6c1728..33e22c87 100644 --- a/src/render/Glass.cpp +++ b/src/render/Glass.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Glass.h" #include "Timer.h" #include "Object.h" @@ -708,26 +708,3 @@ CGlass::WindowRespondsToExplosion(CEntity *entity, CVector point) object->bGlassCracked = true; } } - -STARTPATCHES - InjectHook(0x501F20, CGlass::Init, PATCH_JUMP); - InjectHook(0x502050, CGlass::Update, PATCH_JUMP); - InjectHook(0x502080, &CFallingGlassPane::Update, PATCH_JUMP); - InjectHook(0x502350, CGlass::Render, PATCH_JUMP); - InjectHook(0x502490, CGlass::FindFreePane, PATCH_JUMP); - InjectHook(0x5024C0, &CFallingGlassPane::Render, PATCH_JUMP); - InjectHook(0x502AC0, CGlass::GeneratePanesForWindow, PATCH_JUMP); - InjectHook(0x5033F0, CGlass::AskForObjectToBeRenderedInGlass, PATCH_JUMP); - InjectHook(0x503420, CGlass::RenderEntityInGlass, PATCH_JUMP); - InjectHook(0x503C90, CGlass::CalcAlphaWithNormal, PATCH_JUMP); - InjectHook(0x503D60, CGlass::RenderHiLightPolys, PATCH_JUMP); - InjectHook(0x503DE0, CGlass::RenderShatteredPolys, PATCH_JUMP); - InjectHook(0x503E70, CGlass::RenderReflectionPolys, PATCH_JUMP); - InjectHook(0x503F10, CGlass::WindowRespondsToCollision, PATCH_JUMP); - InjectHook(0x504630, CGlass::WindowRespondsToSoftCollision, PATCH_JUMP); - InjectHook(0x504670, CGlass::WasGlassHitByBullet, PATCH_JUMP); - InjectHook(0x504790, CGlass::WindowRespondsToExplosion, PATCH_JUMP); - //InjectHook(0x504880, `global constructor keyed to'glass.cpp, PATCH_JUMP); - //InjectHook(0x5048D0, CFallingGlassPane::~CFallingGlassPane, PATCH_JUMP); - //InjectHook(0x5048E0, CFallingGlassPane::CFallingGlassPane, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 5bcdd450..03ffe59a 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Camera.h" #include "DMAudio.h" #include "Clock.h" @@ -1483,18 +1483,3 @@ void CHud::Shutdown() int HudTXD = CTxdStore::FindTxdSlot("hud"); CTxdStore::RemoveTxdSlot(HudTXD); } - -STARTPATCHES - InjectHook(0x5052A0, &CHud::Draw, PATCH_JUMP); - InjectHook(0x509030, &CHud::DrawAfterFade, PATCH_JUMP); - InjectHook(0x504F90, &CHud::GetRidOfAllHudMessages, PATCH_JUMP); - InjectHook(0x5048F0, &CHud::Initialise, PATCH_JUMP); - InjectHook(0x504CC0, &CHud::ReInitialise, PATCH_JUMP); - InjectHook(0x50A250, &CHud::SetBigMessage, PATCH_JUMP); - InjectHook(0x5051E0, &CHud::SetHelpMessage, PATCH_JUMP); - InjectHook(0x50A210, &CHud::SetMessage, PATCH_JUMP); - InjectHook(0x50A320, &CHud::SetPagerMessage, PATCH_JUMP); - InjectHook(0x505290, &CHud::SetVehicleName, PATCH_JUMP); - InjectHook(0x5051D0, &CHud::SetZoneName, PATCH_JUMP); - InjectHook(0x504C50, &CHud::Shutdown, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Instance.cpp b/src/render/Instance.cpp index 775341be..be6d73d6 100644 --- a/src/render/Instance.cpp +++ b/src/render/Instance.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Instance.h" void @@ -7,14 +7,3 @@ CInstance::Shutdown() { GetMatrix().Detach(); } - -class CInstance_ : public CInstance -{ -public: - void dtor() { CInstance::~CInstance(); } -}; - -STARTPATCHES - InjectHook(0x50BE90, &CInstance_::dtor, PATCH_JUMP); - InjectHook(0x50B850, &CInstance::Shutdown, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Lines.cpp b/src/render/Lines.cpp index ea433048..b5c85149 100644 --- a/src/render/Lines.cpp +++ b/src/render/Lines.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Lines.h" diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp index d15fa422..c3a25bce 100644 --- a/src/render/MBlur.cpp +++ b/src/render/MBlur.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "RwHelper.h" #include "Camera.h" #include "MBlur.h" @@ -213,11 +213,3 @@ CMBlur::OverlayRender(RwCamera *cam, RwRaster *raster, RwRGBA color, int32 type, RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); } - -STARTPATCHES - InjectHook(0x50AE40, CMBlur::MotionBlurOpen, PATCH_JUMP); - InjectHook(0x50B170, CMBlur::MotionBlurClose, PATCH_JUMP); - InjectHook(0x50A800, CMBlur::CreateImmediateModeData, PATCH_JUMP); - InjectHook(0x50AD70, CMBlur::MotionBlurRender, PATCH_JUMP); - InjectHook(0x50A9C0, CMBlur::OverlayRender, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp index eb188128..0388e779 100644 --- a/src/render/Particle.cpp +++ b/src/render/Particle.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "General.h" #include "Timer.h" #include "TxdStore.h" @@ -1849,19 +1849,3 @@ void CParticle::AddYardieDoorSmoke(CVector const &vecPos, CMatrix const &matMatr 0.3f, color, 0, 0, 0, 0); } } - -STARTPATCHES - //InjectHook(0x50C410, &CParticle::ctor, PATCH_JUMP); - //InjectHook(0x50C420, &CParticle::dtor, PATCH_JUMP); - InjectHook(0x50C430, CParticle::ReloadConfig, PATCH_JUMP); - InjectHook(0x50C570, CParticle::Initialise, PATCH_JUMP); - InjectHook(0x50CF40, CParticle::Shutdown, PATCH_JUMP); - //InjectHook(0x50D140, CParticle::AddParticle, PATCH_JUMP); - InjectHook(0x50D190, (CParticle *(*)(tParticleType, CVector const&, CVector const&, CEntity*, float, RwRGBA const&, int, int, int, int))CParticle::AddParticle, PATCH_JUMP); - InjectHook(0x50DCF0, CParticle::Update, PATCH_JUMP); - InjectHook(0x50EE20, CParticle::Render, PATCH_JUMP); - InjectHook(0x50F6E0, CParticle::RemovePSystem, PATCH_JUMP); - InjectHook(0x50F720, CParticle::RemoveParticle, PATCH_JUMP); - InjectHook(0x50F760, CParticle::AddJetExplosion, PATCH_JUMP); - InjectHook(0x50FAA0, CParticle::AddYardieDoorSmoke, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/ParticleMgr.cpp b/src/render/ParticleMgr.cpp index 7a1804de..4bfb6380 100644 --- a/src/render/ParticleMgr.cpp +++ b/src/render/ParticleMgr.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "FileMgr.h" #include "ParticleMgr.h" @@ -242,9 +242,3 @@ void cParticleSystemMgr::LoadParticleData() lineEnd++; } } - -STARTPATCHES - InjectHook(0x50FCB0, &cParticleSystemMgr::ctor, PATCH_JUMP); - InjectHook(0x50FCD0, &cParticleSystemMgr::Initialise, PATCH_JUMP); - InjectHook(0x50FDF0, &cParticleSystemMgr::LoadParticleData, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file diff --git a/src/render/PlayerSkin.cpp b/src/render/PlayerSkin.cpp index 2cba45fe..94af1fd1 100644 --- a/src/render/PlayerSkin.cpp +++ b/src/render/PlayerSkin.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "PlayerSkin.h" #include "TxdStore.h" @@ -163,12 +163,3 @@ CPlayerSkin::RenderFrontendSkinEdit(void) SetAmbientColours(&AmbientColor); RpClumpRender(gpPlayerClump); } - -STARTPATCHES -InjectHook(0x59B9B0, &CPlayerSkin::Initialise, PATCH_JUMP); -InjectHook(0x59B9E0, &CPlayerSkin::Shutdown, PATCH_JUMP); -InjectHook(0x59B9F0, &CPlayerSkin::GetSkinTexture, PATCH_JUMP); -InjectHook(0x59BC70, &CPlayerSkin::BeginFrontendSkinEdit, PATCH_JUMP); -InjectHook(0x59BCB0, &CPlayerSkin::EndFrontendSkinEdit, PATCH_JUMP); -InjectHook(0x59BCE0, &CPlayerSkin::RenderFrontendSkinEdit, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file diff --git a/src/render/PointLights.cpp b/src/render/PointLights.cpp index 92a89582..55be40b2 100644 --- a/src/render/PointLights.cpp +++ b/src/render/PointLights.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Lights.h" #include "Camera.h" @@ -284,10 +284,3 @@ CPointLights::RenderFogEffect(void) } } } - -STARTPATCHES - InjectHook(0x510790, CPointLights::AddLight, PATCH_JUMP); - InjectHook(0x510960, CPointLights::GenerateLightsAffectingObject, PATCH_JUMP); - InjectHook(0x510C20, CPointLights::RemoveLightsAffectingObject, PATCH_JUMP); - InjectHook(0x510C30, CPointLights::RenderFogEffect, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/RenderBuffer.cpp b/src/render/RenderBuffer.cpp index 4225619f..6120dfe2 100644 --- a/src/render/RenderBuffer.cpp +++ b/src/render/RenderBuffer.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "RenderBuffer.h" int32 TempBufferVerticesStored; @@ -50,10 +50,3 @@ RenderBuffer::RenderStuffInBuffer(void) } ClearRenderBuffer(); } - -STARTPATCHES - InjectHook(0x517620, RenderBuffer::ClearRenderBuffer, PATCH_JUMP); - InjectHook(0x517640, RenderBuffer::StartStoring, PATCH_JUMP); - InjectHook(0x5176B0, RenderBuffer::StopStoring, PATCH_JUMP); - InjectHook(0x5177C0, RenderBuffer::RenderStuffInBuffer, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 7b2f90e8..9c78853f 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Lights.h" #include "ModelInfo.h" @@ -1207,40 +1207,3 @@ CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset) if(reset) ReSetAmbientAndDirectionalColours(); } - -STARTPATCHES - InjectHook(0x4A7680, CRenderer::Init, PATCH_JUMP); - InjectHook(0x4A76A0, CRenderer::Shutdown, PATCH_JUMP); - - InjectHook(0x4A7B90, CRenderer::RenderOneRoad, PATCH_JUMP); - InjectHook(0x4A7BA0, CRenderer::RenderOneNonRoad, PATCH_JUMP); - InjectHook(0x4A7B20, CRenderer::RenderFirstPersonVehicle, PATCH_JUMP); - InjectHook(0x4A78B0, CRenderer::RenderRoads, PATCH_JUMP); - InjectHook(0x4A7930, CRenderer::RenderEverythingBarRoads, PATCH_JUMP); - InjectHook(0x4A7AA0, CRenderer::RenderVehiclesButNotBoats, PATCH_JUMP); - InjectHook(0x4A7AE0, CRenderer::RenderBoats, PATCH_JUMP); - InjectHook(0x4A7910, CRenderer::RenderFadingInEntities, PATCH_JUMP); - - InjectHook(0x4A9350, CRenderer::SetupEntityVisibility, PATCH_JUMP); - InjectHook(0x4A9920, CRenderer::SetupBigBuildingVisibility, PATCH_JUMP); - - InjectHook(0x4A76B0, CRenderer::ConstructRenderList, PATCH_JUMP); - InjectHook(0x4A7840, CRenderer::PreRender, PATCH_JUMP); - InjectHook(0x4A8970, CRenderer::ScanWorld, PATCH_JUMP); - InjectHook(0x4AA240, CRenderer::RequestObjectsInFrustum, PATCH_JUMP); - InjectHook(0x4A7F30, CRenderer::ScanSectorPoly, PATCH_JUMP); - InjectHook(0x4A9300, CRenderer::ScanBigBuildingList, PATCH_JUMP); - InjectHook(0x4A9BB0, CRenderer::ScanSectorList, PATCH_JUMP); - InjectHook(0x4A9E30, CRenderer::ScanSectorList_Priority, PATCH_JUMP); - InjectHook(0x4AA0A0, CRenderer::ScanSectorList_Subway, PATCH_JUMP); - InjectHook(0x4AA1D0, CRenderer::ScanSectorList_RequestModels, PATCH_JUMP); - - InjectHook(0x4AA940, CRenderer::SortBIGBuildings, PATCH_JUMP); - InjectHook(0x4AA990, CRenderer::SortBIGBuildingsForSectorList, PATCH_JUMP); - - InjectHook(0x4A9840, CRenderer::ShouldModelBeStreamed, PATCH_JUMP); - InjectHook(0x4AAA00, CRenderer::IsEntityCullZoneVisible, PATCH_JUMP); - InjectHook(0x4AAAA0, CRenderer::IsVehicleCullZoneVisible, PATCH_JUMP); - - InjectHook(0x4A7CF0, CRenderer::RemoveVehiclePedLights, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Rubbish.cpp b/src/render/Rubbish.cpp index 65d8b2dd..31110046 100644 --- a/src/render/Rubbish.cpp +++ b/src/render/Rubbish.cpp @@ -1,6 +1,6 @@ #include "common.h" #include "main.h" -#include "patcher.h" + #include "General.h" #include "Timer.h" #include "Weather.h" diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index 56a93238..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" @@ -1760,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 diff --git a/src/render/Skidmarks.cpp b/src/render/Skidmarks.cpp index 41ee5d1d..0848796b 100644 --- a/src/render/Skidmarks.cpp +++ b/src/render/Skidmarks.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "TxdStore.h" #include "Timer.h" diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index 9189a7c2..16057420 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "SpecialFX.h" #include "RenderBuffer.h" #include "Timer.h" @@ -1151,32 +1151,3 @@ CSpecialParticleStuff::UpdateBoatFoamAnimation(CMatrix* pMatrix) dZ = 2.0f; } } - -STARTPATCHES - InjectHook(0x518DE0, &CBulletTraces::Init, PATCH_JUMP); - InjectHook(0x518E90, &CBulletTraces::AddTrace, PATCH_JUMP); - InjectHook(0x518F20, &CBulletTraces::Render, PATCH_JUMP); - InjectHook(0x519240, &CBulletTraces::Update, PATCH_JUMP); - - InjectHook(0x51B070, &C3dMarker::AddMarker, PATCH_JUMP); - InjectHook(0x51B170, &C3dMarker::DeleteMarkerObject, PATCH_JUMP); - InjectHook(0x51B1B0, &C3dMarker::Render, PATCH_JUMP); - InjectHook(0x51B2B0, C3dMarkers::Init, PATCH_JUMP); - InjectHook(0x51B480, C3dMarkers::PlaceMarker, PATCH_JUMP); - InjectHook(0x51BB80, C3dMarkers::PlaceMarkerSet, PATCH_JUMP); - InjectHook(0x51B400, C3dMarkers::Render, PATCH_JUMP); - InjectHook(0x51B3B0, C3dMarkers::Shutdown, PATCH_JUMP); - - InjectHook(0x5197A0, CBrightLights::Init, PATCH_JUMP); - InjectHook(0x51A410, CBrightLights::RegisterOne, PATCH_JUMP); - InjectHook(0x5197B0, CBrightLights::Render, PATCH_JUMP); - InjectHook(0x51A3B0, CBrightLights::RenderOutGeometryBuffer, PATCH_JUMP); - - InjectHook(0x51A5A0, CShinyTexts::Init, PATCH_JUMP); - InjectHook(0x51AAB0, CShinyTexts::RegisterOne, PATCH_JUMP); - InjectHook(0x51A5B0, CShinyTexts::Render, PATCH_JUMP); - InjectHook(0x51AA50, CShinyTexts::RenderOutGeometryBuffer, PATCH_JUMP); - - InjectHook(0x51AF70, CMoneyMessages::Init, PATCH_JUMP); - InjectHook(0x51B030, CMoneyMessages::Render, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp index 57ab8f14..30eaf840 100644 --- a/src/render/Sprite.cpp +++ b/src/render/Sprite.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Draw.h" #include "Camera.h" @@ -593,19 +593,3 @@ CSprite::RenderBufferedOneXLUSprite2D_Rotate_Dimension(float x, float y, float w if(nSpriteBufferIndex >= SPRITEBUFFERSIZE) FlushSpriteBuffer(); } - -STARTPATCHES - InjectHook(0x51C4A0, CSprite::CalcHorizonCoors, PATCH_JUMP); - InjectHook(0x51C3A0, CSprite::CalcScreenCoors, PATCH_JUMP); - InjectHook(0x51C590, CSprite::InitSpriteBuffer, PATCH_JUMP); - InjectHook(0x51C5B0, CSprite::InitSpriteBuffer2D, PATCH_JUMP); - InjectHook(0x51C520, CSprite::FlushSpriteBuffer, PATCH_JUMP); - InjectHook(0x51C960, CSprite::RenderOneXLUSprite, PATCH_JUMP); - InjectHook(0x51D110, CSprite::RenderOneXLUSprite_Rotate_Aspect, PATCH_JUMP); - InjectHook(0x51C5D0, CSprite::RenderBufferedOneXLUSprite, PATCH_JUMP); - InjectHook(0x51D5B0, CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension, PATCH_JUMP); - InjectHook(0x51CCD0, CSprite::RenderBufferedOneXLUSprite_Rotate_Aspect, PATCH_JUMP); - InjectHook(0x51D9E0, CSprite::RenderBufferedOneXLUSprite_Rotate_2Colours, PATCH_JUMP); - InjectHook(0x51E3C0, CSprite::RenderBufferedOneXLUSprite2D, PATCH_JUMP); - InjectHook(0x51E490, CSprite::RenderBufferedOneXLUSprite2D_Rotate_Dimension, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp index 655fd841..52b85018 100644 --- a/src/render/Sprite2d.cpp +++ b/src/render/Sprite2d.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Draw.h" #include "Camera.h" @@ -474,37 +474,3 @@ void CSprite2d::Draw2DPolygon(float x1, float y1, float x2, float y2, float x3, RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESHADEMODE, (void*)rwSHADEMODEGOURAUD); } - -STARTPATCHES -#define C4 const CRGBA&, const CRGBA&, const CRGBA&, const CRGBA& -#define F8 float, float, float, float, float, float, float, float - - InjectHook(0x51EA20, CSprite2d::SetRecipNearClip, PATCH_JUMP); - InjectHook(0x51EAE0, CSprite2d::InitPerFrame, PATCH_JUMP); - InjectHook(0x51EB70, CSprite2d::GetBank, PATCH_JUMP); - InjectHook(0x51EBC0, CSprite2d::AddSpriteToBank, PATCH_JUMP); - InjectHook(0x51EC50, CSprite2d::DrawBank, PATCH_JUMP); - - InjectHook(0x51EA00, &CSprite2d::Delete, PATCH_JUMP); - InjectHook(0x51F950, &CSprite2d::SetRenderState, PATCH_JUMP); - InjectHook(0x51EA40, (void (CSprite2d::*)(const char*))&CSprite2d::SetTexture, PATCH_JUMP); - InjectHook(0x51EA70, (void (CSprite2d::*)(const char*,const char*))&CSprite2d::SetTexture, PATCH_JUMP); - InjectHook(0x51EAA0, &CSprite2d::SetAddressing, PATCH_JUMP); - - InjectHook(0x51EE90, (void (*)(const CRect&, C4, uint32))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F220, (void (*)(const CRect&, C4, F8))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F070, (void (*)(F8, C4))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F3E0, (void (*)(int, float*, float*, const CRGBA&))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F490, CSprite2d::SetMaskVertices, PATCH_JUMP); - InjectHook(0x51F720, (void (*)(RwIm2DVertex*, const CRect&, C4, F8))CSprite2d::SetVertices, PATCH_JUMP); - - InjectHook(0x51ECE0, (void (CSprite2d::*)(float, float, float, float, const CRGBA &))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51ED50, (void (CSprite2d::*)(const CRect &, const CRGBA &))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51ED90, (void (CSprite2d::*)(const CRect &, const CRGBA &, F8))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51EDF0, (void (CSprite2d::*)(const CRect &, C4))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51EE40, (void (CSprite2d::*)(F8, const CRGBA &))&CSprite2d::Draw, PATCH_JUMP); - - InjectHook(0x51F970, (void (*)(const CRect&, const CRGBA&))CSprite2d::DrawRect, PATCH_JUMP); - InjectHook(0x51FA00, (void (*)(const CRect&, C4))CSprite2d::DrawRect, PATCH_JUMP); - InjectHook(0x51FA80, CSprite2d::DrawRectXLU, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Timecycle.cpp b/src/render/Timecycle.cpp index 6e24a76e..e47015a0 100644 --- a/src/render/Timecycle.cpp +++ b/src/render/Timecycle.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Clock.h" #include "Weather.h" @@ -315,8 +315,3 @@ CTimeCycle::Update(void) else m_FogReduction = max(m_FogReduction-1, 0); } - -STARTPATCHES - InjectHook(0x4ABAE0, CTimeCycle::Initialise, PATCH_JUMP); - InjectHook(0x4ABF40, CTimeCycle::Update, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/WaterCannon.cpp b/src/render/WaterCannon.cpp index e848fb43..1a9b983f 100644 --- a/src/render/WaterCannon.cpp +++ b/src/render/WaterCannon.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "WaterCannon.h" #include "Vector.h" #include "General.h" @@ -304,17 +304,3 @@ void CWaterCannons::Render(void) aCannons[i].Render(); } } - -STARTPATCHES - InjectHook(0x521A30, &CWaterCannon::Init, PATCH_JUMP); - InjectHook(0x521B80, &CWaterCannon::Update_OncePerFrame, PATCH_JUMP); - InjectHook(0x521CC0, &CWaterCannon::Update_NewInput, PATCH_JUMP); - InjectHook(0x521D30, &CWaterCannon::Render, PATCH_JUMP); - InjectHook(0x5220B0, &CWaterCannon::PushPeds, PATCH_JUMP); - InjectHook(0x522440, CWaterCannons::Init, PATCH_JUMP); - InjectHook(0x522470, CWaterCannons::UpdateOne, PATCH_JUMP); - InjectHook(0x522510, CWaterCannons::Update, PATCH_JUMP); - InjectHook(0x522550, CWaterCannons::Render, PATCH_JUMP); - //InjectHook(0x522B40, `global constructor keyed to'watercannon.cpp, PATCH_JUMP); - //InjectHook(0x522B60, CWaterCannon::CWaterCannon, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index d5a54742..ad0b3ec4 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -21,7 +21,7 @@ #include "RenderBuffer.h" #include <rpworld.h> #include "WaterLevel.h" -#include "patcher.h" + float TEXTURE_ADDU; float TEXTURE_ADDV; @@ -1234,22 +1234,3 @@ CWaterLevel::FreeBoatWakeArray() nGeomUsed = 0; } - -STARTPATCHES - InjectHook(0x554EA0, &CWaterLevel::Initialise, PATCH_JUMP); - InjectHook(0x554FE0, &CWaterLevel::Shutdown, PATCH_JUMP); - InjectHook(0x555010, &CWaterLevel::CreateWavyAtomic, PATCH_JUMP); - InjectHook(0x5552A0, &CWaterLevel::DestroyWavyAtomic, PATCH_JUMP); - InjectHook(0x5552C0, (bool (*)(float,float,float,float*,bool))&CWaterLevel::GetWaterLevel, PATCH_JUMP); - InjectHook(0x555440, &CWaterLevel::GetWaterLevelNoWaves, PATCH_JUMP); - InjectHook(0x5554E0, &CWaterLevel::RenderWater, PATCH_JUMP); - InjectHook(0x556C30, &CWaterLevel::RenderOneFlatSmallWaterPoly, PATCH_JUMP); - InjectHook(0x556E80, &CWaterLevel::RenderOneFlatLargeWaterPoly, PATCH_JUMP); - InjectHook(0x5570D0, &CWaterLevel::RenderOneFlatHugeWaterPoly, PATCH_JUMP); - InjectHook(0x557320, &CWaterLevel::RenderOneFlatExtraHugeWaterPoly, PATCH_JUMP); - InjectHook(0x557570, &CWaterLevel::RenderOneWavySector, PATCH_JUMP); - InjectHook(0x557C30, &CWaterLevel::CalcDistanceToWater, PATCH_JUMP); - InjectHook(0x557EA0, &CWaterLevel::RenderAndEmptyRenderBuffer, PATCH_JUMP); - InjectHook(0x557F00, &CWaterLevel::AllocateBoatWakeArray, PATCH_JUMP); - InjectHook(0x5581C0, &CWaterLevel::FreeBoatWakeArray, PATCH_JUMP); -ENDPATCHES diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp index 1aa6be82..8bc544c6 100644 --- a/src/render/Weather.cpp +++ b/src/render/Weather.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Weather.h" #include "Camera.h" |