summaryrefslogtreecommitdiffstats
path: root/src/objects
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/objects/CutsceneHead.cpp17
-rw-r--r--src/objects/CutsceneHead.h5
-rw-r--r--src/objects/CutsceneObject.cpp26
-rw-r--r--src/objects/CutsceneObject.h20
-rw-r--r--src/objects/DummyObject.cpp10
-rw-r--r--src/objects/DummyObject.h1
-rw-r--r--src/objects/Object.cpp11
-rw-r--r--src/objects/Object.h3
-rw-r--r--src/objects/ParticleObject.cpp10
-rw-r--r--src/objects/ParticleObject.h2
-rw-r--r--src/objects/Projectile.cpp10
-rw-r--r--src/objects/Projectile.h1
12 files changed, 71 insertions, 45 deletions
diff --git a/src/objects/CutsceneHead.cpp b/src/objects/CutsceneHead.cpp
index a9c47777..c423d0b8 100644
--- a/src/objects/CutsceneHead.cpp
+++ b/src/objects/CutsceneHead.cpp
@@ -109,10 +109,19 @@ CCutsceneHead::PlayAnimation(const char *animName)
}
}
+class CCutsceneHead_ : public CCutsceneHead
+{
+public:
+ void CreateRwObject_(void) { CCutsceneHead::CreateRwObject(); }
+ void DeleteRwObject_(void) { CCutsceneHead::DeleteRwObject(); }
+ void ProcessControl_(void) { CCutsceneHead::ProcessControl(); }
+ void Render_(void) { CCutsceneHead::Render(); }
+};
+
STARTPATCHES
- InjectHook(0x4BA650, &CCutsceneHead::CreateRwObject_, PATCH_JUMP);
- InjectHook(0x4BA690, &CCutsceneHead::DeleteRwObject_, PATCH_JUMP);
- InjectHook(0x4BA760, &CCutsceneHead::ProcessControl_, PATCH_JUMP);
- InjectHook(0x4BA800, &CCutsceneHead::Render_, PATCH_JUMP);
+ InjectHook(0x4BA650, &CCutsceneHead_::CreateRwObject_, PATCH_JUMP);
+ InjectHook(0x4BA690, &CCutsceneHead_::DeleteRwObject_, PATCH_JUMP);
+ InjectHook(0x4BA760, &CCutsceneHead_::ProcessControl_, PATCH_JUMP);
+ InjectHook(0x4BA800, &CCutsceneHead_::Render_, PATCH_JUMP);
InjectHook(0x4BA6A0, &CCutsceneHead::PlayAnimation, PATCH_JUMP);
ENDPATCHES
diff --git a/src/objects/CutsceneHead.h b/src/objects/CutsceneHead.h
index de4f011f..52b66ede 100644
--- a/src/objects/CutsceneHead.h
+++ b/src/objects/CutsceneHead.h
@@ -15,10 +15,5 @@ public:
void Render(void);
void PlayAnimation(const char *animName);
-
- void CreateRwObject_(void) { CCutsceneHead::CreateRwObject(); }
- void DeleteRwObject_(void) { CCutsceneHead::DeleteRwObject(); }
- void ProcessControl_(void) { CCutsceneHead::ProcessControl(); }
- void Render_(void) { CCutsceneHead::Render(); }
};
static_assert(sizeof(CCutsceneHead) == 0x19C, "CCutsceneHead: error");
diff --git a/src/objects/CutsceneObject.cpp b/src/objects/CutsceneObject.cpp
index ede5be5b..2f667a5d 100644
--- a/src/objects/CutsceneObject.cpp
+++ b/src/objects/CutsceneObject.cpp
@@ -89,12 +89,24 @@ CCutsceneObject::RemoveLighting(bool reset)
CRenderer::RemoveVehiclePedLights(this, reset);
}
+class CCutsceneObject_ : public CCutsceneObject
+{
+public:
+ void dtor(void) { this->CCutsceneObject::~CCutsceneObject(); }
+ void SetModelIndex_(uint32 id) { CCutsceneObject::SetModelIndex(id); }
+ void ProcessControl_(void) { CCutsceneObject::ProcessControl(); }
+ void PreRender_(void) { CCutsceneObject::PreRender(); }
+ void Render_(void) { CCutsceneObject::Render(); }
+ bool SetupLighting_(void) { return CCutsceneObject::SetupLighting(); }
+ void RemoveLighting_(bool reset) { CCutsceneObject::RemoveLighting(reset); }
+};
+
STARTPATCHES
- InjectHook(0x4BA960, &CCutsceneObject::dtor, PATCH_JUMP);
- InjectHook(0x4BA980, &CCutsceneObject::SetModelIndex_, PATCH_JUMP);
- InjectHook(0x4BA9C0, &CCutsceneObject::ProcessControl_, PATCH_JUMP);
- InjectHook(0x4BAA40, &CCutsceneObject::PreRender_, PATCH_JUMP);
- InjectHook(0x4BAAA0, &CCutsceneObject::Render_, PATCH_JUMP);
- InjectHook(0x4A7E70, &CCutsceneObject::SetupLighting_, PATCH_JUMP);
- InjectHook(0x4A7F00, &CCutsceneObject::RemoveLighting_, PATCH_JUMP);
+ InjectHook(0x4BA960, &CCutsceneObject_::dtor, PATCH_JUMP);
+ InjectHook(0x4BA980, &CCutsceneObject_::SetModelIndex_, PATCH_JUMP);
+ InjectHook(0x4BA9C0, &CCutsceneObject_::ProcessControl_, PATCH_JUMP);
+ InjectHook(0x4BAA40, &CCutsceneObject_::PreRender_, PATCH_JUMP);
+ InjectHook(0x4BAAA0, &CCutsceneObject_::Render_, PATCH_JUMP);
+ InjectHook(0x4A7E70, &CCutsceneObject_::SetupLighting_, PATCH_JUMP);
+ InjectHook(0x4A7F00, &CCutsceneObject_::RemoveLighting_, PATCH_JUMP);
ENDPATCHES
diff --git a/src/objects/CutsceneObject.h b/src/objects/CutsceneObject.h
index 9360651e..31c3a528 100644
--- a/src/objects/CutsceneObject.h
+++ b/src/objects/CutsceneObject.h
@@ -7,19 +7,11 @@ class CCutsceneObject : public CObject
public:
CCutsceneObject(void);
- virtual void SetModelIndex(uint32 id);
- virtual void ProcessControl(void);
- virtual void PreRender(void);
- virtual void Render(void);
- virtual bool SetupLighting(void);
- virtual void RemoveLighting(bool reset);
-
- void dtor(void) { this->CCutsceneObject::~CCutsceneObject(); }
- void SetModelIndex_(uint32 id) { CCutsceneObject::SetModelIndex(id); }
- void ProcessControl_(void) { CCutsceneObject::ProcessControl(); }
- void PreRender_(void) { CCutsceneObject::PreRender(); }
- void Render_(void) { CCutsceneObject::Render(); }
- bool SetupLighting_(void) { return CCutsceneObject::SetupLighting(); }
- void RemoveLighting_(bool reset) { CCutsceneObject::RemoveLighting(reset); }
+ void SetModelIndex(uint32 id);
+ void ProcessControl(void);
+ void PreRender(void);
+ void Render(void);
+ bool SetupLighting(void);
+ void RemoveLighting(bool reset);
};
static_assert(sizeof(CCutsceneObject) == 0x198, "CCutsceneObject: error");
diff --git a/src/objects/DummyObject.cpp b/src/objects/DummyObject.cpp
index 1e4b2ae0..41b15129 100644
--- a/src/objects/DummyObject.cpp
+++ b/src/objects/DummyObject.cpp
@@ -12,6 +12,12 @@ CDummyObject::CDummyObject(CObject *obj)
m_level = obj->m_level;
}
+class CDummyObject_ : public CDummyObject
+{
+public:
+ void dtor(void) { CDummyObject::~CDummyObject(); }
+};
+
STARTPATCHES
- InjectHook(0x4BAB70, &CDummyObject::dtor, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ InjectHook(0x4BAB70, &CDummyObject_::dtor, PATCH_JUMP);
+ENDPATCHES
diff --git a/src/objects/DummyObject.h b/src/objects/DummyObject.h
index 10554bdd..d4dce609 100644
--- a/src/objects/DummyObject.h
+++ b/src/objects/DummyObject.h
@@ -9,6 +9,5 @@ class CDummyObject : public CDummy
public:
CDummyObject(void) {}
CDummyObject(CObject *obj);
- void dtor(void) { this->CDummyObject::~CDummyObject(); }
};
static_assert(sizeof(CDummyObject) == 0x68, "CDummyObject: error");
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp
index 6712d77b..e13a2ad0 100644
--- a/src/objects/Object.cpp
+++ b/src/objects/Object.cpp
@@ -87,7 +87,14 @@ CObject::RemoveLighting(bool reset)
WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
+class CObject_ : public CObject
+{
+public:
+ void dtor(void) { this->CObject::~CObject(); }
+ void Render_(void) { CObject::Render(); }
+};
+
STARTPATCHES
- InjectHook(0x4BAE00, &CObject::dtor, PATCH_JUMP);
- InjectHook(0x4BB1E0, &CObject::Render_, PATCH_JUMP);
+ InjectHook(0x4BAE00, &CObject_::dtor, PATCH_JUMP);
+ InjectHook(0x4BB1E0, &CObject_::Render_, PATCH_JUMP);
ENDPATCHES
diff --git a/src/objects/Object.h b/src/objects/Object.h
index de4c8e05..8afc4d0a 100644
--- a/src/objects/Object.h
+++ b/src/objects/Object.h
@@ -74,8 +74,5 @@ public:
void ObjectDamage(float amount);
static void DeleteAllTempObjectInArea(CVector, float);
-
- void dtor(void) { this->CObject::~CObject(); }
- void Render_(void) { CObject::Render(); }
};
static_assert(sizeof(CObject) == 0x198, "CObject: error");
diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp
index cf6e84bf..25f223e1 100644
--- a/src/objects/ParticleObject.cpp
+++ b/src/objects/ParticleObject.cpp
@@ -18,6 +18,12 @@ void CParticleObject::UpdateAll()
((void (__cdecl *)())0x4BCA30)();
}
+class CParticleObject_ : public CParticleObject
+{
+public:
+ void dtor() { CParticleObject::~CParticleObject(); }
+};
+
STARTPATCHES
- InjectHook(0x4BC420, &CParticleObject::dtor, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ InjectHook(0x4BC420, &CParticleObject_::dtor, PATCH_JUMP);
+ENDPATCHES
diff --git a/src/objects/ParticleObject.h b/src/objects/ParticleObject.h
index def7b7de..6ec090e7 100644
--- a/src/objects/ParticleObject.h
+++ b/src/objects/ParticleObject.h
@@ -34,6 +34,4 @@ public:
static void AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, bool remove);
static void Initialise();
static void UpdateAll();
-
- void dtor() { this->CParticleObject::~CParticleObject(); }
};
diff --git a/src/objects/Projectile.cpp b/src/objects/Projectile.cpp
index e21323de..c6c2d6e1 100644
--- a/src/objects/Projectile.cpp
+++ b/src/objects/Projectile.cpp
@@ -2,6 +2,12 @@
#include "patcher.h"
#include "Projectile.h"
+class CProjectile_ : public CProjectile
+{
+public:
+ void dtor(void) { CProjectile::~CProjectile(); }
+};
+
STARTPATCHES
- InjectHook(0x4BFED0, &CProjectile::dtor, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ InjectHook(0x4BFED0, &CProjectile_::dtor, PATCH_JUMP);
+ENDPATCHES
diff --git a/src/objects/Projectile.h b/src/objects/Projectile.h
index a8e826b6..4d5041f8 100644
--- a/src/objects/Projectile.h
+++ b/src/objects/Projectile.h
@@ -7,5 +7,4 @@
class CProjectile : public CObject
{
public:
- void dtor(void) { this->CProjectile::~CProjectile(); }
};