cleaned up patching of virtual functions; started CAutomobile

This commit is contained in:
aap
2019-07-08 08:46:42 +02:00
parent 6ec421fe7b
commit 12af85ca3d
64 changed files with 771 additions and 278 deletions

View File

@@ -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");