diff options
Diffstat (limited to 'src/entities')
-rw-r--r-- | src/entities/Building.cpp | 17 | ||||
-rw-r--r-- | src/entities/Dummy.cpp | 16 | ||||
-rw-r--r-- | src/entities/Entity.cpp | 55 | ||||
-rw-r--r-- | src/entities/Physical.cpp | 57 | ||||
-rw-r--r-- | src/entities/Treadable.cpp | 12 |
5 files changed, 5 insertions, 152 deletions
diff --git a/src/entities/Building.cpp b/src/entities/Building.cpp index 7813c87f..aad2d402 100644 --- a/src/entities/Building.cpp +++ b/src/entities/Building.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Building.h" #include "Streaming.h" #include "Pools.h" @@ -20,18 +20,3 @@ CBuilding::ReplaceWithNewModel(int32 id) if(m_level == LEVEL_NONE || m_level == CGame::currLevel) CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE); } - -#include <new> - -class CBuilding_ : public CBuilding -{ -public: - CBuilding *ctor(void) { return ::new (this) CBuilding(); } - void dtor(void) { CBuilding::~CBuilding(); } -}; - -STARTPATCHES - InjectHook(0x4057D0, &CBuilding_::ctor, PATCH_JUMP); - InjectHook(0x405800, &CBuilding_::dtor, PATCH_JUMP); - InjectHook(0x405850, &CBuilding::ReplaceWithNewModel, PATCH_JUMP); -ENDPATCHES diff --git a/src/entities/Dummy.cpp b/src/entities/Dummy.cpp index 176e5682..8a4bfd5f 100644 --- a/src/entities/Dummy.cpp +++ b/src/entities/Dummy.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "Pools.h" #include "World.h" #include "Dummy.h" @@ -50,17 +50,3 @@ CDummy::Remove(void) m_entryInfoList.DeleteNode(node); } } - -class CDummy_ : public CDummy -{ -public: - void Add_(void) { CDummy::Add(); } - void Remove_(void) { CDummy::Remove(); } - void dtor(void) { CDummy::~CDummy(); } -}; - -STARTPATCHES - InjectHook(0x473810, &CDummy_::dtor, PATCH_JUMP); - InjectHook(0x473860, &CDummy_::Add_, PATCH_JUMP); - InjectHook(0x473AD0, &CDummy_::Remove_, PATCH_JUMP); -ENDPATCHES diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 0efee4e7..3dce53da 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "General.h" #include "ModelIndices.h" #include "Timer.h" @@ -874,56 +874,3 @@ CEntity::AddSteamsFromGround(CPtrList& list) pNode = pNode->next; } } - -#include <new> - -class CEntity_ : public CEntity -{ -public: - CEntity *ctor(void) { return ::new (this) CEntity(); } - void dtor(void) { this->CEntity::~CEntity(); } - void Add_(void) { CEntity::Add(); } - void Remove_(void) { CEntity::Remove(); } - void SetModelIndex_(uint32 i) { CEntity::SetModelIndex(i); } - void CreateRwObject_(void) { CEntity::CreateRwObject(); } - void DeleteRwObject_(void) { CEntity::DeleteRwObject(); } - CRect GetBoundRect_(void) { return CEntity::GetBoundRect(); } - void PreRender_(void) { CEntity::PreRender(); } - void Render_(void) { CEntity::Render(); } - bool SetupLighting_(void) { return CEntity::SetupLighting(); } -}; - -STARTPATCHES - InjectHook(0x473C30, &CEntity_::ctor, PATCH_JUMP); - InjectHook(0x473E40, &CEntity_::dtor, PATCH_JUMP); - InjectHook(0x473E70, &CEntity_::SetModelIndex_, PATCH_JUMP); - InjectHook(0x475080, &CEntity_::Add_, PATCH_JUMP); - InjectHook(0x475310, &CEntity_::Remove_, PATCH_JUMP); - InjectHook(0x473EA0, &CEntity_::CreateRwObject_, PATCH_JUMP); - InjectHook(0x473F90, &CEntity_::DeleteRwObject_, PATCH_JUMP); - InjectHook(0x474000, &CEntity_::GetBoundRect_, PATCH_JUMP); - InjectHook(0x474350, &CEntity_::PreRender_, PATCH_JUMP); - InjectHook(0x474BD0, &CEntity_::Render_, PATCH_JUMP); - InjectHook(0x4A7C60, &CEntity_::SetupLighting_, PATCH_JUMP); - - InjectHook(0x4742C0, (void (CEntity::*)(CVector&))&CEntity::GetBoundCentre, PATCH_JUMP); - InjectHook(0x474310, &CEntity::GetBoundRadius, PATCH_JUMP); - InjectHook(0x474C10, &CEntity::GetIsTouching, PATCH_JUMP); - InjectHook(0x474CC0, &CEntity::GetIsOnScreen, PATCH_JUMP); - InjectHook(0x474D20, &CEntity::GetIsOnScreenComplex, PATCH_JUMP); - InjectHook(0x474CA0, &CEntity::IsVisible, PATCH_JUMP); - InjectHook(0x474330, &CEntity::UpdateRwFrame, PATCH_JUMP); - InjectHook(0x4755E0, &CEntity::SetupBigBuilding, PATCH_JUMP); - InjectHook(0x4A7480, &CEntity::RegisterReference, PATCH_JUMP); - InjectHook(0x4A74E0, &CEntity::ResolveReferences, PATCH_JUMP); - InjectHook(0x4A7530, &CEntity::PruneReferences, PATCH_JUMP); - - InjectHook(0x473F10, &CEntity::AttachToRwObject, PATCH_JUMP); - InjectHook(0x473F60, &CEntity::DetachFromRwObject, PATCH_JUMP); - - InjectHook(0x475A20, &CEntity::PreRenderForGlassWindow, PATCH_JUMP); - InjectHook(0x50CE40, (void (CEntity::*)(CVector*))& CEntity::AddSteamsFromGround, PATCH_JUMP); - InjectHook(0x475670, &CEntity::ModifyMatrixForTreeInWind, PATCH_JUMP); - InjectHook(0x475830, &CEntity::ModifyMatrixForBannerInWind, PATCH_JUMP); - InjectHook(0x4FA530, &CEntity::ProcessLightsForEntity, PATCH_JUMP); -ENDPATCHES diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index bbdf68f5..445cd83f 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "World.h" #include "Timer.h" #include "ModelIndices.h" @@ -1933,58 +1933,3 @@ CPhysical::ProcessCollision(void) bIsInSafePosition = true; RemoveAndAdd(); } - -class CPhysical_ : public CPhysical -{ -public: - void dtor(void) { CPhysical::~CPhysical(); } - void Add_(void) { CPhysical::Add(); } - void Remove_(void) { CPhysical::Remove(); } - CRect GetBoundRect_(void) { return CPhysical::GetBoundRect(); } - void ProcessControl_(void) { CPhysical::ProcessControl(); } - void ProcessShift_(void) { CPhysical::ProcessShift(); } - void ProcessCollision_(void) { CPhysical::ProcessCollision(); } - int32 ProcessEntityCollision_(CEntity *ent, CColPoint *point) { return CPhysical::ProcessEntityCollision(ent, point); } -}; - -STARTPATCHES - InjectHook(0x495130, &CPhysical_::dtor, PATCH_JUMP); - InjectHook(0x4951F0, &CPhysical_::Add_, PATCH_JUMP); - InjectHook(0x4954B0, &CPhysical_::Remove_, PATCH_JUMP); - InjectHook(0x495540, &CPhysical_::RemoveAndAdd, PATCH_JUMP); - InjectHook(0x495F10, &CPhysical_::ProcessControl_, PATCH_JUMP); - InjectHook(0x496F10, &CPhysical_::ProcessShift_, PATCH_JUMP); - InjectHook(0x4961A0, &CPhysical_::ProcessCollision_, PATCH_JUMP); - InjectHook(0x49F790, &CPhysical_::ProcessEntityCollision_, PATCH_JUMP); - InjectHook(0x4958F0, &CPhysical::AddToMovingList, PATCH_JUMP); - InjectHook(0x495940, &CPhysical::RemoveFromMovingList, PATCH_JUMP); - InjectHook(0x497180, &CPhysical::AddCollisionRecord, PATCH_JUMP); - InjectHook(0x4970C0, &CPhysical::AddCollisionRecord_Treadable, PATCH_JUMP); - InjectHook(0x497240, &CPhysical::GetHasCollidedWith, PATCH_JUMP); - InjectHook(0x49F820, &CPhysical::RemoveRefsToEntity, PATCH_JUMP); - InjectHook(0x49F890, &CPhysical::PlacePhysicalRelativeToOtherPhysical, PATCH_JUMP); - -#define F3 float, float, float - InjectHook(0x495B10, &CPhysical::ApplyMoveSpeed, PATCH_JUMP); - InjectHook(0x497280, &CPhysical::ApplyTurnSpeed, PATCH_JUMP); - InjectHook(0x4959A0, (void (CPhysical::*)(F3))&CPhysical::ApplyMoveForce, PATCH_JUMP); - InjectHook(0x495A10, (void (CPhysical::*)(F3, F3))&CPhysical::ApplyTurnForce, PATCH_JUMP); - InjectHook(0x495D90, (void (CPhysical::*)(F3))&CPhysical::ApplyFrictionMoveForce, PATCH_JUMP); - InjectHook(0x495E10, (void (CPhysical::*)(F3, F3))&CPhysical::ApplyFrictionTurnForce, PATCH_JUMP); - InjectHook(0x499890, &CPhysical::ApplySpringCollision, PATCH_JUMP); - InjectHook(0x499990, &CPhysical::ApplySpringDampening, PATCH_JUMP); - InjectHook(0x495B50, &CPhysical::ApplyGravity, PATCH_JUMP); - InjectHook(0x495B80, (void (CPhysical::*)(void))&CPhysical::ApplyFriction, PATCH_JUMP); - InjectHook(0x495C20, &CPhysical::ApplyAirResistance, PATCH_JUMP); - - InjectHook(0x4973A0, &CPhysical::ApplyCollision, PATCH_JUMP); - InjectHook(0x4992A0, &CPhysical::ApplyCollisionAlt, PATCH_JUMP); - InjectHook(0x499BE0, (bool (CPhysical::*)(float, CColPoint&))&CPhysical::ApplyFriction, PATCH_JUMP); - InjectHook(0x49A180, (bool (CPhysical::*)(CPhysical*, float, CColPoint&))&CPhysical::ApplyFriction, PATCH_JUMP); - - InjectHook(0x49DA10, &CPhysical::ProcessShiftSectorList, PATCH_JUMP); - InjectHook(0x49E790, &CPhysical::ProcessCollisionSectorList_SimpleCar, PATCH_JUMP); - InjectHook(0x49B620, &CPhysical::ProcessCollisionSectorList, PATCH_JUMP); - InjectHook(0x496E50, &CPhysical::CheckCollision, PATCH_JUMP); - InjectHook(0x496EB0, &CPhysical::CheckCollision_SimpleCar, PATCH_JUMP); -ENDPATCHES diff --git a/src/entities/Treadable.cpp b/src/entities/Treadable.cpp index ea949f00..00abbe13 100644 --- a/src/entities/Treadable.cpp +++ b/src/entities/Treadable.cpp @@ -1,18 +1,8 @@ #include "common.h" -#include "patcher.h" + #include "rpworld.h" #include "Treadable.h" #include "Pools.h" void *CTreadable::operator new(size_t sz) { return CPools::GetTreadablePool()->New(); } void CTreadable::operator delete(void *p, size_t sz) { CPools::GetTreadablePool()->Delete((CTreadable*)p); } - -class CTreadable_ : public CTreadable -{ -public: - void dtor(void) { CTreadable::~CTreadable(); } -}; - -STARTPATCHES - InjectHook(0x405A10, &CTreadable_::dtor, PATCH_JUMP); -ENDPATCHES |