summaryrefslogtreecommitdiffstats
path: root/src/objects
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-17 15:31:11 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-17 15:31:11 +0200
commit599164006a9e7eb7328fc194c9bae1acbb2c887d (patch)
treec4dc5a5e2bf370e74ffc8ab4b9220ea6e066e952 /src/objects
parentMerge remote-tracking branch 'samler/world' into Standalone (diff)
downloadre3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.gz
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.bz2
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.lz
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.xz
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.tar.zst
re3-599164006a9e7eb7328fc194c9bae1acbb2c887d.zip
Diffstat (limited to 'src/objects')
-rw-r--r--src/objects/CutsceneHead.cpp19
-rw-r--r--src/objects/CutsceneObject.cpp24
-rw-r--r--src/objects/DummyObject.cpp18
-rw-r--r--src/objects/Object.cpp36
-rw-r--r--src/objects/ObjectData.cpp7
-rw-r--r--src/objects/ParticleObject.cpp38
-rw-r--r--src/objects/Projectile.cpp16
7 files changed, 7 insertions, 151 deletions
diff --git a/src/objects/CutsceneHead.cpp b/src/objects/CutsceneHead.cpp
index a7722b8a..b716e17e 100644
--- a/src/objects/CutsceneHead.cpp
+++ b/src/objects/CutsceneHead.cpp
@@ -1,6 +1,6 @@
#include "common.h"
#include <rpskin.h>
-#include "patcher.h"
+
#include "main.h"
#include "RwHelper.h"
#include "RpAnimBlend.h"
@@ -109,20 +109,3 @@ CCutsceneHead::PlayAnimation(const char *animName)
RwStreamClose(stream, nil);
}
}
-
-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(0x4BA6A0, &CCutsceneHead::PlayAnimation, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/objects/CutsceneObject.cpp b/src/objects/CutsceneObject.cpp
index 2f667a5d..cee83848 100644
--- a/src/objects/CutsceneObject.cpp
+++ b/src/objects/CutsceneObject.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "Lights.h"
#include "PointLights.h"
@@ -88,25 +88,3 @@ 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);
-ENDPATCHES
diff --git a/src/objects/DummyObject.cpp b/src/objects/DummyObject.cpp
index ba09ac3e..d5805073 100644
--- a/src/objects/DummyObject.cpp
+++ b/src/objects/DummyObject.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "DummyObject.h"
#include "Pools.h"
@@ -11,19 +11,3 @@ CDummyObject::CDummyObject(CObject *obj)
obj->DetachFromRwObject();
m_level = obj->m_level;
}
-
-#include <new>
-
-class CDummyObject_ : public CDummyObject
-{
-public:
- void dtor(void) { CDummyObject::~CDummyObject(); }
- CDummyObject *ctor(void) { return ::new (this) CDummyObject(); }
- CDummyObject *ctor(CObject *obj) { return ::new (this) CDummyObject(obj); }
-};
-
-STARTPATCHES
- InjectHook(0x4BAAF0, (CDummyObject* (CDummyObject::*)(void)) &CDummyObject_::ctor, PATCH_JUMP);
- InjectHook(0x4BAB10, (CDummyObject* (CDummyObject::*)(CObject*)) &CDummyObject_::ctor, PATCH_JUMP);
- InjectHook(0x4BAB70, &CDummyObject_::dtor, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp
index c22148e9..8968c117 100644
--- a/src/objects/Object.cpp
+++ b/src/objects/Object.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "Lights.h"
#include "Pools.h"
@@ -394,37 +394,3 @@ CObject::DeleteAllTempObjectsInArea(CVector point, float fRadius)
}
}
}
-
-#include <new>
-
-class CObject_ : public CObject
-{
-public:
- CObject *ctor(void) { return ::new (this) CObject(); }
- CObject *ctor(int32 mi, bool createRW) { return ::new (this) CObject(mi, createRW); }
- CObject *ctor(CDummyObject *dummy) { return ::new (this) CObject(dummy); }
- void dtor(void) { CObject::~CObject(); }
- void Render_(void) { CObject::Render(); }
- void ProcessControl_(void) { CObject::ProcessControl(); }
- bool SetupLighting_(void) { return CObject::SetupLighting(); }
- void RemoveLighting_(bool reset) { CObject::RemoveLighting(reset); }
-};
-
-STARTPATCHES
- InjectHook(0x4BABD0, (CObject* (CObject::*)(void)) &CObject_::ctor, PATCH_JUMP);
- InjectHook(0x4BACE0, (CObject* (CObject::*)(int32, bool)) &CObject_::ctor, PATCH_JUMP);
- InjectHook(0x4BAD50, (CObject* (CObject::*)(CDummyObject*)) &CObject_::ctor, PATCH_JUMP);
- InjectHook(0x4BAE00, &CObject_::dtor, PATCH_JUMP);
- InjectHook(0x4BB040, &CObject_::ProcessControl_, PATCH_JUMP);
- InjectHook(0x4BBDA0, &CObject::Teleport, PATCH_JUMP);
- InjectHook(0x4BB1E0, &CObject_::Render_, PATCH_JUMP);
- InjectHook(0x4A7C90, &CObject_::SetupLighting_, PATCH_JUMP);
- InjectHook(0x4A7CD0, &CObject_::RemoveLighting_, PATCH_JUMP);
- InjectHook(0x4BB240, &CObject::ObjectDamage, PATCH_JUMP);
- InjectHook(0x4BBD80, &CObject::RefModelInfo, PATCH_JUMP);
- InjectHook(0x4BAEC0, &CObject::Init, PATCH_JUMP);
- InjectHook(0x4BB010, &CObject::CanBeDeleted, PATCH_JUMP);
- InjectHook(0x4BBE60, &CObject::DeleteAllMissionObjects, PATCH_JUMP);
- InjectHook(0x4BBDF0, &CObject::DeleteAllTempObjects, PATCH_JUMP);
- InjectHook(0x4BBED0, &CObject::DeleteAllTempObjectsInArea, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/objects/ObjectData.cpp b/src/objects/ObjectData.cpp
index aa58a845..589cc3f7 100644
--- a/src/objects/ObjectData.cpp
+++ b/src/objects/ObjectData.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "ModelInfo.h"
#include "Object.h"
@@ -96,8 +96,3 @@ CObjectData::SetObjectData(int32 modelId, CObject &object)
object.bExplosionProof = true;
}
}
-
-STARTPATCHES
- InjectHook(0x4BC0E0, CObjectData::Initialise, PATCH_JUMP);
- InjectHook(0x4BC270, CObjectData::SetObjectData, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp
index 5e4ad231..fe448966 100644
--- a/src/objects/ParticleObject.cpp
+++ b/src/objects/ParticleObject.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "ParticleObject.h"
#include "Timer.h"
#include "General.h"
@@ -1099,39 +1099,3 @@ CParticleObject::MoveToList(CParticleObject **from, CParticleObject **to, CParti
if ( obj->m_pNext )
obj->m_pNext->m_pPrev = obj;
}
-
-class CParticleObject_ : public CParticleObject
-{
-public:
- void ctor() { CParticleObject::CParticleObject(); }
- void dtor() { CParticleObject::~CParticleObject(); }
-};
-
-STARTPATCHES
- InjectHook(0x4BC330, CAudioHydrant::Add, PATCH_JUMP);
- InjectHook(0x4BC390, CAudioHydrant::Remove, PATCH_JUMP);
-
- InjectHook(0x4BC3E0, &CParticleObject_::ctor, PATCH_JUMP);
- InjectHook(0x4BC420, &CParticleObject_::dtor, PATCH_JUMP);
- InjectHook(0x4BC440, CParticleObject::Initialise, PATCH_JUMP);
-
- InjectHook(0x4BC4D0, (CParticleObject *(*)(uint16, CVector const &, uint8))CParticleObject::AddObject, PATCH_JUMP);
- InjectHook(0x4BC520, (CParticleObject *(*)(uint16, CVector const &, float, uint8))CParticleObject::AddObject, PATCH_JUMP);
- InjectHook(0x4BC570, (CParticleObject *(*)(uint16, CVector const &, CVector const &, float, uint8))CParticleObject::AddObject, PATCH_JUMP);
- InjectHook(0x4BC5B0, (CParticleObject *(*)(uint16, CVector const &, CVector const &, float, uint32, RwRGBA const &, uint8))CParticleObject::AddObject, PATCH_JUMP);
-
- InjectHook(0x4BC9F0, &CParticleObject::RemoveObject, PATCH_JUMP);
- InjectHook(0x4BCA30, CParticleObject::UpdateAll, PATCH_JUMP);
- InjectHook(0x4BCA80, &CParticleObject::UpdateClose, PATCH_JUMP);
- InjectHook(0x4BF9F0, &CParticleObject::UpdateFar, PATCH_JUMP);
- InjectHook(0x4BFA80, CParticleObject::SaveParticle, PATCH_JUMP);
- InjectHook(0x4BFB30, CParticleObject::LoadParticle, PATCH_JUMP);
- InjectHook(0x4BFC80, CParticleObject::RemoveAllParticleObjects, PATCH_JUMP);
- InjectHook(0x4BFD10, CParticleObject::MoveToList, PATCH_JUMP);
- //InjectHook(0x4BFD70, CParticleObject::~CParticleObject, PATCH_JUMP); // virtual
- //InjectHook(0x4BFDB0, `global constructor keyed to'ParticleObject.cpp, PATCH_JUMP);
- //InjectHook(0x4BFE00, CAudioHydrant::CAudioHydrant, PATCH_JUMP);
- //InjectHook(0x4BFE10, sub_4BFE10, PATCH_JUMP); // destroy gPObjectArray array
-
-
-ENDPATCHES
diff --git a/src/objects/Projectile.cpp b/src/objects/Projectile.cpp
index 32bc6bdb..fe8b0c68 100644
--- a/src/objects/Projectile.cpp
+++ b/src/objects/Projectile.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Projectile.h"
CProjectile::CProjectile(int32 model) : CObject()
@@ -13,17 +13,3 @@ CProjectile::CProjectile(int32 model) : CObject()
SetModelIndex(model);
ObjectCreatedBy = MISSION_OBJECT;
}
-
-#include <new>
-
-class CProjectile_ : public CProjectile
-{
-public:
- CProjectile* ctor(int32 model) { return ::new (this) CProjectile(model); }
- void dtor(void) { CProjectile::~CProjectile(); }
-};
-
-STARTPATCHES
- InjectHook(0x4BFE30, &CProjectile_::ctor, PATCH_JUMP);
- InjectHook(0x4BFED0, &CProjectile_::dtor, PATCH_JUMP);
-ENDPATCHES