diff --git a/LEGO1/lego/legoomni/include/animstate.h b/LEGO1/lego/legoomni/include/animstate.h index 9ac03a4c..8f64790b 100644 --- a/LEGO1/lego/legoomni/include/animstate.h +++ b/LEGO1/lego/legoomni/include/animstate.h @@ -30,11 +30,11 @@ public: // AnimState::`scalar deleting destructor' private: - undefined4 m_unk0x8; - undefined4 m_unk0xc; - void* m_unk0x10; - undefined4 m_unk0x14; - void* m_unk0x18; + undefined4 m_unk0x8; // 0x08 + undefined4 m_unk0xc; // 0x0c + void* m_unk0x10; // 0x10 + undefined4 m_unk0x14; // 0x14 + void* m_unk0x18; // 0x18 }; #endif // ANIMSTATE_H diff --git a/LEGO1/lego/legoomni/include/gasstationstate.h b/LEGO1/lego/legoomni/include/gasstationstate.h index 57fd0d39..a756e783 100644 --- a/LEGO1/lego/legoomni/include/gasstationstate.h +++ b/LEGO1/lego/legoomni/include/gasstationstate.h @@ -28,13 +28,13 @@ public: // GasStationState::`scalar deleting destructor' private: - undefined4 m_unk0x08[3]; - undefined4 m_unk0x14; - undefined2 m_unk0x18; - undefined2 m_unk0x1a; - undefined2 m_unk0x1c; - undefined2 m_unk0x1e; - undefined2 m_unk0x20; + undefined4 m_unk0x08[3]; // 0x08 + undefined4 m_unk0x14; // 0x14 + undefined2 m_unk0x18; // 0x18 + undefined2 m_unk0x1a; // 0x1a + undefined2 m_unk0x1c; // 0x1c + undefined2 m_unk0x1e; // 0x1e + undefined2 m_unk0x20; // 0x20 }; #endif // GASSTATIONSTATE_H diff --git a/LEGO1/lego/legoomni/include/hospitalstate.h b/LEGO1/lego/legoomni/include/hospitalstate.h index a38cfd2e..2b141709 100644 --- a/LEGO1/lego/legoomni/include/hospitalstate.h +++ b/LEGO1/lego/legoomni/include/hospitalstate.h @@ -9,6 +9,7 @@ class HospitalState : public LegoState { public: HospitalState(); + virtual ~HospitalState() override {} // FUNCTION: LEGO1 0x10076400 inline virtual const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/infocenterstate.h b/LEGO1/lego/legoomni/include/infocenterstate.h index 8314529f..9399f8f4 100644 --- a/LEGO1/lego/legoomni/include/infocenterstate.h +++ b/LEGO1/lego/legoomni/include/infocenterstate.h @@ -10,7 +10,7 @@ class InfocenterState : public LegoState { public: InfocenterState(); - virtual ~InfocenterState(); + virtual ~InfocenterState() override; // FUNCTION: LEGO1 0x10071840 inline virtual const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/legoact2state.h b/LEGO1/lego/legoomni/include/legoact2state.h index b2ae4b7e..e37af2dc 100644 --- a/LEGO1/lego/legoomni/include/legoact2state.h +++ b/LEGO1/lego/legoomni/include/legoact2state.h @@ -7,6 +7,8 @@ // SIZE 0x10 class LegoAct2State : public LegoState { public: + virtual ~LegoAct2State() override {} + // FUNCTION: LEGO1 0x1000df80 inline virtual const char* ClassName() const override // vtable+0x0c { diff --git a/LEGO1/lego/legoomni/include/legoentity.h b/LEGO1/lego/legoomni/include/legoentity.h index 99813972..b9c58977 100644 --- a/LEGO1/lego/legoomni/include/legoentity.h +++ b/LEGO1/lego/legoomni/include/legoentity.h @@ -9,7 +9,7 @@ #include "roi/legoroi.h" // VTABLE: LEGO1 0x100d4858 -// SIZE 0x68 (probably) +// SIZE 0x68 class LegoEntity : public MxEntity { public: enum { @@ -17,7 +17,6 @@ public: c_bit2 = 0x02 }; - // Inlined at 0x100853f7 inline LegoEntity() { Init(); } // FUNCTION: LEGO1 0x1000c290 @@ -38,22 +37,23 @@ public: return !strcmp(p_name, LegoEntity::ClassName()) || MxEntity::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction); // vtable+0x18 - virtual void Destroy(MxBool p_fromDestructor); // vtable+0x1c - virtual void ParseAction(char*); // vtable+0x20 - virtual void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2); // vtable+0x24 - virtual void SetWorldTransform(const Vector3& p_loc, const Vector3& p_dir, - const Vector3& p_up); // vtable+0x28 - virtual void ResetWorldTransform(MxBool p_inVehicle); // vtable+0x2c + virtual MxResult Create(MxDSAction& p_dsAction); // vtable+0x18 + virtual void Destroy(MxBool p_fromDestructor); // vtable+0x1c + virtual void ParseAction(char*); // vtable+0x20 + virtual void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2); // vtable+0x24 + virtual void SetWorldTransform(const Vector3& p_loc, const Vector3& p_dir, const Vector3& p_up); // vtable+0x28 + virtual void ResetWorldTransform(MxBool p_inVehicle); // vtable+0x2c + // FUNCTION: LEGO1 0x10001090 virtual void SetWorldSpeed(MxFloat p_worldSpeed) { m_worldSpeed = p_worldSpeed; } // vtable+0x30 - virtual void VTable0x34(); // vtable+0x34 - virtual void VTable0x38(); // vtable+0x38 - virtual void VTable0x3c(); // vtable+0x3c - virtual void VTable0x40(); // vtable+0x40 - virtual void VTable0x44(); // vtable+0x44 - virtual void VTable0x48(); // vtable+0x48 - virtual void VTable0x4c(); // vtable+0x4c + + virtual void VTable0x34(); // vtable+0x34 + virtual void VTable0x38(); // vtable+0x38 + virtual void VTable0x3c(); // vtable+0x3c + virtual void VTable0x40(); // vtable+0x40 + virtual void VTable0x44(); // vtable+0x44 + virtual void VTable0x48(); // vtable+0x48 + virtual void VTable0x4c(); // vtable+0x4c void FUN_10010c30(); void SetLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up, MxBool); diff --git a/LEGO1/lego/legoomni/include/legostate.h b/LEGO1/lego/legoomni/include/legostate.h index e6d11bd1..41942312 100644 --- a/LEGO1/lego/legoomni/include/legostate.h +++ b/LEGO1/lego/legoomni/include/legostate.h @@ -7,9 +7,11 @@ #include "mxstring.h" // VTABLE: LEGO1 0x100d46c0 +// SIZE 0x08 class LegoState : public MxCore { public: - virtual ~LegoState() override; // vtable+0x00 + // FUNCTION: LEGO1 0x10005f40 + virtual ~LegoState() override {} // FUNCTION: LEGO1 0x100060d0 inline virtual const char* ClassName() const override // vtable+0x0c @@ -24,9 +26,20 @@ public: return !strcmp(p_name, LegoState::ClassName()) || MxCore::IsA(p_name); } - virtual MxBool VTable0x14(); // vtable+0x14 - virtual MxBool SetFlag(); // vtable+0x18 - virtual MxResult VTable0x1c(LegoFile* p_legoFile); // vtable+0x1C + // FUNCTION: LEGO1 0x10005f90 + virtual MxBool VTable0x14() { return TRUE; } // vtable+0x14 + + // FUNCTION: LEGO1 0x10005fa0 + virtual MxBool SetFlag() { return FALSE; } // vtable+0x18 + + // FUNCTION: LEGO1 0x10005fb0 + virtual MxResult VTable0x1c(LegoFile* p_legoFile) + { + if (p_legoFile->IsWriteMode()) { + p_legoFile->FUN_10006030(this->ClassName()); + } + return SUCCESS; + } // vtable+0x1c // SYNTHETIC: LEGO1 0x10006160 // LegoState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legovehiclebuildstate.h b/LEGO1/lego/legoomni/include/legovehiclebuildstate.h index a155595e..b0463448 100644 --- a/LEGO1/lego/legoomni/include/legovehiclebuildstate.h +++ b/LEGO1/lego/legoomni/include/legovehiclebuildstate.h @@ -6,7 +6,7 @@ #include "mxstring.h" // VTABLE: LEGO1 0x100d66e0 -// SIZE 0x50 (from 1000acd7) +// SIZE 0x50 class LegoVehicleBuildState : public LegoState { public: LegoVehicleBuildState(char* p_classType); @@ -30,10 +30,10 @@ public: public: struct UnkStruct { - undefined4 m_unk0x00; - undefined2 m_unk0x04; - undefined2 m_unk0x06; - undefined2 m_unk0x08; + undefined4 m_unk0x00; // 0x00 + undefined2 m_unk0x04; // 0x04 + undefined2 m_unk0x06; // 0x06 + undefined2 m_unk0x08; // 0x08 UnkStruct(); }; diff --git a/LEGO1/lego/legoomni/include/pizzamissionstate.h b/LEGO1/lego/legoomni/include/pizzamissionstate.h index 7c792ed4..3987bd26 100644 --- a/LEGO1/lego/legoomni/include/pizzamissionstate.h +++ b/LEGO1/lego/legoomni/include/pizzamissionstate.h @@ -3,6 +3,7 @@ #include "legostate.h" +// SIZE 0x20 struct PizzaMissionStateEntry { public: undefined2 m_unk0x0; @@ -13,6 +14,7 @@ public: }; // VTABLE: LEGO1 0x100d7408 +// SIZE 0xb0 class PizzaMissionState : public LegoState { public: // FUNCTION: LEGO1 0x10039290 @@ -39,9 +41,9 @@ private: PizzaMissionStateEntry* GetState(MxU8 p_id); protected: - undefined4 m_unk0x8; - undefined4 m_unk0xc; - PizzaMissionStateEntry m_state[5]; + undefined4 m_unk0x8; // 0x08 + undefined4 m_unk0xc; // 0x0c + PizzaMissionStateEntry m_state[5]; // 0x10 }; #endif // PIZZAMISSIONSTATE_H diff --git a/LEGO1/lego/legoomni/include/policestate.h b/LEGO1/lego/legoomni/include/policestate.h index 77005cef..bd73cdbd 100644 --- a/LEGO1/lego/legoomni/include/policestate.h +++ b/LEGO1/lego/legoomni/include/policestate.h @@ -9,6 +9,7 @@ class PoliceState : public LegoState { public: PoliceState(); + virtual ~PoliceState() override {} // FUNCTION: LEGO1 0x1005e860 inline virtual const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/racestate.h b/LEGO1/lego/legoomni/include/racestate.h index 7d2de4f6..0104d7a4 100644 --- a/LEGO1/lego/legoomni/include/racestate.h +++ b/LEGO1/lego/legoomni/include/racestate.h @@ -41,9 +41,9 @@ private: RaceStateEntry* GetState(MxU8 p_id); protected: - RaceStateEntry m_state[5]; - undefined2 m_unk0x26[2]; - undefined4 m_unk0x28; + RaceStateEntry m_state[5]; // 0x08 + undefined2 m_unk0x26[2]; // 0x26 + undefined4 m_unk0x28; // 0x28 }; #endif // RACESTATE_H diff --git a/LEGO1/lego/legoomni/include/scorestate.h b/LEGO1/lego/legoomni/include/scorestate.h index fde33e1a..ad8c26f7 100644 --- a/LEGO1/lego/legoomni/include/scorestate.h +++ b/LEGO1/lego/legoomni/include/scorestate.h @@ -30,7 +30,7 @@ public: // ScoreState::`scalar deleting destructor' private: - MxBool m_playCubeTutorial; + MxBool m_playCubeTutorial; // 0x08 }; #endif // SCORESTATE_H diff --git a/LEGO1/lego/legoomni/include/towtrackmissionstate.h b/LEGO1/lego/legoomni/include/towtrackmissionstate.h index ef5bacda..9e3b78f3 100644 --- a/LEGO1/lego/legoomni/include/towtrackmissionstate.h +++ b/LEGO1/lego/legoomni/include/towtrackmissionstate.h @@ -21,6 +21,7 @@ public: { return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name); } + virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C inline MxU16 GetColor(MxU8 p_id) diff --git a/LEGO1/lego/legoomni/src/common/legostate.cpp b/LEGO1/lego/legoomni/src/common/legostate.cpp index 16beb159..c9946492 100644 --- a/LEGO1/lego/legoomni/src/common/legostate.cpp +++ b/LEGO1/lego/legoomni/src/common/legostate.cpp @@ -1,29 +1,3 @@ #include "legostate.h" -DECOMP_SIZE_ASSERT(LegoState, 0x08); - -// FUNCTION: LEGO1 0x10005f40 -LegoState::~LegoState() -{ -} - -// FUNCTION: LEGO1 0x10005f90 -MxBool LegoState::VTable0x14() -{ - return TRUE; -} - -// FUNCTION: LEGO1 0x10005fa0 -MxBool LegoState::SetFlag() -{ - return FALSE; -} - -// FUNCTION: LEGO1 0x10005fb0 -MxResult LegoState::VTable0x1c(LegoFile* p_legoFile) -{ - if (p_legoFile->IsWriteMode()) { - p_legoFile->FUN_10006030(this->ClassName()); - } - return SUCCESS; -} +DECOMP_SIZE_ASSERT(LegoState, 0x08)