From 12af85ca3d29e155f40323ad07a77f96a4aececf Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 8 Jul 2019 08:46:42 +0200 Subject: cleaned up patching of virtual functions; started CAutomobile --- src/entities/Entity.h | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/entities/Entity.h') 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"); -- cgit v1.2.3