diff options
author | aap <aap@papnet.eu> | 2019-07-08 08:46:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-08 08:46:42 +0200 |
commit | 12af85ca3d29e155f40323ad07a77f96a4aececf (patch) | |
tree | 7a6d7c8ed51ec1c527903835bbe4ee39eef2ab8b /src/entities/Entity.h | |
parent | 6ec421fe7bc683e0d056d2a1b9d0bd0d159cf8e3 (diff) |
cleaned up patching of virtual functions; started CAutomobile
Diffstat (limited to 'src/entities/Entity.h')
-rw-r--r-- | src/entities/Entity.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 92c4c351..d055d25f 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -95,12 +95,12 @@ public: CReference *m_pFirstReference; CEntity(void); - virtual ~CEntity(void); + ~CEntity(void); virtual void Add(void); virtual void Remove(void); - virtual void SetModelIndex(uint32 i) { m_modelIndex = i; CreateRwObject(); } - virtual void SetModelIndexNoCreate(uint32 i) { m_modelIndex = i; } + virtual void SetModelIndex(uint32 id) { m_modelIndex = id; CreateRwObject(); } + virtual void SetModelIndexNoCreate(uint32 id) { m_modelIndex = id; } virtual void CreateRwObject(void); virtual void DeleteRwObject(void); virtual CRect GetBoundRect(void); @@ -145,19 +145,5 @@ public: void ModifyMatrixForTreeInWind(void); void ModifyMatrixForBannerInWind(void); void ProcessLightsForEntity(void); - - - // to make patching virtual functions possible - 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(); } }; static_assert(sizeof(CEntity) == 0x64, "CEntity: error"); |