From 0a467c56b52d8a6248b45056275735572772968c Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Wed, 12 Jun 2024 10:09:23 -0400 Subject: [PATCH] Fix CaveEntity class --- LEGO1/lego/legoomni/include/buildings.h | 25 +++++++++++++++++-- LEGO1/lego/legoomni/include/caveentity.h | 10 -------- LEGO1/lego/legoomni/src/actors/buildings.cpp | 14 +++++++++++ .../legoomni/src/common/legoobjectfactory.cpp | 1 - 4 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 LEGO1/lego/legoomni/include/caveentity.h diff --git a/LEGO1/lego/legoomni/include/buildings.h b/LEGO1/lego/legoomni/include/buildings.h index 39394628..9bd9ba6f 100644 --- a/LEGO1/lego/legoomni/include/buildings.h +++ b/LEGO1/lego/legoomni/include/buildings.h @@ -117,6 +117,28 @@ class HospitalEntity : public BuildingEntity { // HospitalEntity::`scalar deleting destructor' }; +// VTABLE: LEGO1 0x100d50c0 +// SIZE 0x68 +class CaveEntity : public BuildingEntity { + // FUNCTION: LEGO1 0x1000f1e0 + inline const char* ClassName() const override // vtable+0x0c + { + // STRING: LEGO1 0x100f0300 + return "RaceStandsEntity"; + } + + // FUNCTION: LEGO1 0x1000f1f0 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 + { + return !strcmp(p_name, CaveEntity::ClassName()) || BuildingEntity::IsA(p_name); + } + + MxLong VTable0x50(MxParam& p_param) override; + + // SYNTHETIC: LEGO1 0x1000fa50 + // CaveEntity::`scalar deleting destructor' +}; + // VTABLE: LEGO1 0x100d5200 // SIZE 0x68 class JailEntity : public BuildingEntity { @@ -133,8 +155,7 @@ class JailEntity : public BuildingEntity { return !strcmp(p_name, JailEntity::ClassName()) || BuildingEntity::IsA(p_name); } - // STUB: LEGO1 0x100154f0 - MxLong VTable0x50(MxParam& p_param) override { return 0; } + MxLong VTable0x50(MxParam& p_param) override; // SYNTHETIC: LEGO1 0x1000fac0 // JailEntity::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/caveentity.h b/LEGO1/lego/legoomni/include/caveentity.h deleted file mode 100644 index 308f35bc..00000000 --- a/LEGO1/lego/legoomni/include/caveentity.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef CAVEENTITY_H -#define CAVEENTITY_H - -#include "buildings.h" - -// No overrides, uses vtable from RaceStandsEntity -// SIZE 0x68 -class CaveEntity : public RaceStandsEntity {}; - -#endif // CAVEENTITY_H diff --git a/LEGO1/lego/legoomni/src/actors/buildings.cpp b/LEGO1/lego/legoomni/src/actors/buildings.cpp index 45cc73e1..0a51ad40 100644 --- a/LEGO1/lego/legoomni/src/actors/buildings.cpp +++ b/LEGO1/lego/legoomni/src/actors/buildings.cpp @@ -174,3 +174,17 @@ MxLong RaceStandsEntity::VTable0x50(MxParam& p_param) return 1; } + +// STUB: LEGO1 0x100154f0 +MxLong JailEntity::VTable0x50(MxParam& p_param) +{ + // TODO + return 0; +} + +// STUB: LEGO1 0x10015520 +MxLong CaveEntity::VTable0x50(MxParam& p_param) +{ + // TODO + return 0; +} diff --git a/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp b/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp index e7cdf94d..66411554 100644 --- a/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp +++ b/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp @@ -67,7 +67,6 @@ #include "act3shark.h" #include "buildings.h" #include "bumpbouy.h" -#include "caveentity.h" #include "jukebox.h" #include "jukeboxentity.h" #include "legometerpresenter.h"