diff options
Diffstat (limited to 'src/objects')
-rw-r--r-- | src/objects/Object.cpp | 10 | ||||
-rw-r--r-- | src/objects/Object.h | 2 | ||||
-rw-r--r-- | src/objects/ParticleObject.cpp | 7 | ||||
-rw-r--r-- | src/objects/ParticleObject.h | 7 |
4 files changed, 20 insertions, 6 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index f3ba8087..bba4d7d9 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -8,6 +8,7 @@ WRAPPER void CObject::ObjectDamage(float amount) { EAXJMP(0x4BB240); } WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); } +WRAPPER void CObject::Init(void) { EAXJMP(0x4BAEC0); } int16 &CObject::nNoTempObjects = *(int16*)0x95CCA2; int16 &CObject::nBodyCastHealth = *(int16*)0x5F7D4C; // 1000 @@ -41,6 +42,15 @@ CObject::CObject(void) m_pCollidingEntity = nil; } +CObject::CObject(int32 mi, bool createRW) +{ + if (createRW) + SetModelIndex(mi); + else + SetModelIndexNoCreate(mi); + Init(); +} + CObject::~CObject(void) { CRadar::ClearBlipForEntity(BLIP_OBJECT, CPools::GetObjectPool()->GetIndex(this)); diff --git a/src/objects/Object.h b/src/objects/Object.h index 0ce1a3aa..21348b52 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -66,6 +66,7 @@ public: static void operator delete(void*, size_t); CObject(void); + CObject(int32, bool); ~CObject(void); void Render(void); @@ -74,6 +75,7 @@ public: void ObjectDamage(float amount); void RefModelInfo(int32 modelId); + void Init(void); static void DeleteAllTempObjectInArea(CVector, float); }; diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp index 25f223e1..f5cd4c94 100644 --- a/src/objects/ParticleObject.cpp +++ b/src/objects/ParticleObject.cpp @@ -2,9 +2,10 @@ #include "patcher.h" #include "ParticleObject.h" -WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, bool remove) { EAXJMP(0x4BC4D0); } -WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, float size, bool remove) { EAXJMP(0x4BC520); } -WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, bool remove) { EAXJMP(0x4BC570); } +WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, uint8 remove) { EAXJMP(0x4BC4D0); } +WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, float size, uint8 remove) { EAXJMP(0x4BC520); } +WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, uint8 remove) { EAXJMP(0x4BC570); } +WRAPPER void CParticleObject::AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, uint32, const RwRGBA &col, uint8 remove) { EAXJMP(0x4BC5B0); } // Converted from static void __cdecl CParticleObject::Initialise() 0x42C760 void CParticleObject::Initialise() diff --git a/src/objects/ParticleObject.h b/src/objects/ParticleObject.h index 6ec090e7..192d3703 100644 --- a/src/objects/ParticleObject.h +++ b/src/objects/ParticleObject.h @@ -29,9 +29,10 @@ enum eParticleObjectType class CParticleObject : CPlaceable { public: - static void AddObject(uint16 type, const CVector &pos, bool remove); - static void AddObject(uint16 type, const CVector &pos, float size, bool remove); - static void AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, bool remove); + static void AddObject(uint16 type, const CVector &pos, uint8 remove); + static void AddObject(uint16 type, const CVector &pos, float size, uint8 remove); + static void AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, uint8 remove); + static void AddObject(uint16 type, const CVector &pos, const CVector &dir, float size, uint32, const RwRGBA &col, uint8 remove); static void Initialise(); static void UpdateAll(); }; |