Fix various state classes/missing annotations (#503)

This commit is contained in:
Christian Semmler
2024-01-29 13:54:47 -05:00
committed by GitHub
parent 96234ddc23
commit 35def3013a
14 changed files with 66 additions and 72 deletions

View File

@@ -30,11 +30,11 @@ public:
// AnimState::`scalar deleting destructor' // AnimState::`scalar deleting destructor'
private: private:
undefined4 m_unk0x8; undefined4 m_unk0x8; // 0x08
undefined4 m_unk0xc; undefined4 m_unk0xc; // 0x0c
void* m_unk0x10; void* m_unk0x10; // 0x10
undefined4 m_unk0x14; undefined4 m_unk0x14; // 0x14
void* m_unk0x18; void* m_unk0x18; // 0x18
}; };
#endif // ANIMSTATE_H #endif // ANIMSTATE_H

View File

@@ -28,13 +28,13 @@ public:
// GasStationState::`scalar deleting destructor' // GasStationState::`scalar deleting destructor'
private: private:
undefined4 m_unk0x08[3]; undefined4 m_unk0x08[3]; // 0x08
undefined4 m_unk0x14; undefined4 m_unk0x14; // 0x14
undefined2 m_unk0x18; undefined2 m_unk0x18; // 0x18
undefined2 m_unk0x1a; undefined2 m_unk0x1a; // 0x1a
undefined2 m_unk0x1c; undefined2 m_unk0x1c; // 0x1c
undefined2 m_unk0x1e; undefined2 m_unk0x1e; // 0x1e
undefined2 m_unk0x20; undefined2 m_unk0x20; // 0x20
}; };
#endif // GASSTATIONSTATE_H #endif // GASSTATIONSTATE_H

View File

@@ -9,6 +9,7 @@
class HospitalState : public LegoState { class HospitalState : public LegoState {
public: public:
HospitalState(); HospitalState();
virtual ~HospitalState() override {}
// FUNCTION: LEGO1 0x10076400 // FUNCTION: LEGO1 0x10076400
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c

View File

@@ -10,7 +10,7 @@
class InfocenterState : public LegoState { class InfocenterState : public LegoState {
public: public:
InfocenterState(); InfocenterState();
virtual ~InfocenterState(); virtual ~InfocenterState() override;
// FUNCTION: LEGO1 0x10071840 // FUNCTION: LEGO1 0x10071840
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c

View File

@@ -7,6 +7,8 @@
// SIZE 0x10 // SIZE 0x10
class LegoAct2State : public LegoState { class LegoAct2State : public LegoState {
public: public:
virtual ~LegoAct2State() override {}
// FUNCTION: LEGO1 0x1000df80 // FUNCTION: LEGO1 0x1000df80
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
{ {

View File

@@ -9,7 +9,7 @@
#include "roi/legoroi.h" #include "roi/legoroi.h"
// VTABLE: LEGO1 0x100d4858 // VTABLE: LEGO1 0x100d4858
// SIZE 0x68 (probably) // SIZE 0x68
class LegoEntity : public MxEntity { class LegoEntity : public MxEntity {
public: public:
enum { enum {
@@ -17,7 +17,6 @@ public:
c_bit2 = 0x02 c_bit2 = 0x02
}; };
// Inlined at 0x100853f7
inline LegoEntity() { Init(); } inline LegoEntity() { Init(); }
// FUNCTION: LEGO1 0x1000c290 // FUNCTION: LEGO1 0x1000c290
@@ -42,11 +41,12 @@ public:
virtual void Destroy(MxBool p_fromDestructor); // vtable+0x1c virtual void Destroy(MxBool p_fromDestructor); // vtable+0x1c
virtual void ParseAction(char*); // vtable+0x20 virtual void ParseAction(char*); // vtable+0x20
virtual void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2); // vtable+0x24 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, virtual void SetWorldTransform(const Vector3& p_loc, const Vector3& p_dir, const Vector3& p_up); // vtable+0x28
const Vector3& p_up); // vtable+0x28
virtual void ResetWorldTransform(MxBool p_inVehicle); // vtable+0x2c virtual void ResetWorldTransform(MxBool p_inVehicle); // vtable+0x2c
// FUNCTION: LEGO1 0x10001090 // FUNCTION: LEGO1 0x10001090
virtual void SetWorldSpeed(MxFloat p_worldSpeed) { m_worldSpeed = p_worldSpeed; } // vtable+0x30 virtual void SetWorldSpeed(MxFloat p_worldSpeed) { m_worldSpeed = p_worldSpeed; } // vtable+0x30
virtual void VTable0x34(); // vtable+0x34 virtual void VTable0x34(); // vtable+0x34
virtual void VTable0x38(); // vtable+0x38 virtual void VTable0x38(); // vtable+0x38
virtual void VTable0x3c(); // vtable+0x3c virtual void VTable0x3c(); // vtable+0x3c

View File

@@ -7,9 +7,11 @@
#include "mxstring.h" #include "mxstring.h"
// VTABLE: LEGO1 0x100d46c0 // VTABLE: LEGO1 0x100d46c0
// SIZE 0x08
class LegoState : public MxCore { class LegoState : public MxCore {
public: public:
virtual ~LegoState() override; // vtable+0x00 // FUNCTION: LEGO1 0x10005f40
virtual ~LegoState() override {}
// FUNCTION: LEGO1 0x100060d0 // FUNCTION: LEGO1 0x100060d0
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c
@@ -24,9 +26,20 @@ public:
return !strcmp(p_name, LegoState::ClassName()) || MxCore::IsA(p_name); return !strcmp(p_name, LegoState::ClassName()) || MxCore::IsA(p_name);
} }
virtual MxBool VTable0x14(); // vtable+0x14 // FUNCTION: LEGO1 0x10005f90
virtual MxBool SetFlag(); // vtable+0x18 virtual MxBool VTable0x14() { return TRUE; } // vtable+0x14
virtual MxResult VTable0x1c(LegoFile* p_legoFile); // vtable+0x1C
// 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 // SYNTHETIC: LEGO1 0x10006160
// LegoState::`scalar deleting destructor' // LegoState::`scalar deleting destructor'

View File

@@ -6,7 +6,7 @@
#include "mxstring.h" #include "mxstring.h"
// VTABLE: LEGO1 0x100d66e0 // VTABLE: LEGO1 0x100d66e0
// SIZE 0x50 (from 1000acd7) // SIZE 0x50
class LegoVehicleBuildState : public LegoState { class LegoVehicleBuildState : public LegoState {
public: public:
LegoVehicleBuildState(char* p_classType); LegoVehicleBuildState(char* p_classType);
@@ -30,10 +30,10 @@ public:
public: public:
struct UnkStruct { struct UnkStruct {
undefined4 m_unk0x00; undefined4 m_unk0x00; // 0x00
undefined2 m_unk0x04; undefined2 m_unk0x04; // 0x04
undefined2 m_unk0x06; undefined2 m_unk0x06; // 0x06
undefined2 m_unk0x08; undefined2 m_unk0x08; // 0x08
UnkStruct(); UnkStruct();
}; };

View File

@@ -3,6 +3,7 @@
#include "legostate.h" #include "legostate.h"
// SIZE 0x20
struct PizzaMissionStateEntry { struct PizzaMissionStateEntry {
public: public:
undefined2 m_unk0x0; undefined2 m_unk0x0;
@@ -13,6 +14,7 @@ public:
}; };
// VTABLE: LEGO1 0x100d7408 // VTABLE: LEGO1 0x100d7408
// SIZE 0xb0
class PizzaMissionState : public LegoState { class PizzaMissionState : public LegoState {
public: public:
// FUNCTION: LEGO1 0x10039290 // FUNCTION: LEGO1 0x10039290
@@ -39,9 +41,9 @@ private:
PizzaMissionStateEntry* GetState(MxU8 p_id); PizzaMissionStateEntry* GetState(MxU8 p_id);
protected: protected:
undefined4 m_unk0x8; undefined4 m_unk0x8; // 0x08
undefined4 m_unk0xc; undefined4 m_unk0xc; // 0x0c
PizzaMissionStateEntry m_state[5]; PizzaMissionStateEntry m_state[5]; // 0x10
}; };
#endif // PIZZAMISSIONSTATE_H #endif // PIZZAMISSIONSTATE_H

View File

@@ -9,6 +9,7 @@
class PoliceState : public LegoState { class PoliceState : public LegoState {
public: public:
PoliceState(); PoliceState();
virtual ~PoliceState() override {}
// FUNCTION: LEGO1 0x1005e860 // FUNCTION: LEGO1 0x1005e860
inline virtual const char* ClassName() const override // vtable+0x0c inline virtual const char* ClassName() const override // vtable+0x0c

View File

@@ -41,9 +41,9 @@ private:
RaceStateEntry* GetState(MxU8 p_id); RaceStateEntry* GetState(MxU8 p_id);
protected: protected:
RaceStateEntry m_state[5]; RaceStateEntry m_state[5]; // 0x08
undefined2 m_unk0x26[2]; undefined2 m_unk0x26[2]; // 0x26
undefined4 m_unk0x28; undefined4 m_unk0x28; // 0x28
}; };
#endif // RACESTATE_H #endif // RACESTATE_H

View File

@@ -30,7 +30,7 @@ public:
// ScoreState::`scalar deleting destructor' // ScoreState::`scalar deleting destructor'
private: private:
MxBool m_playCubeTutorial; MxBool m_playCubeTutorial; // 0x08
}; };
#endif // SCORESTATE_H #endif // SCORESTATE_H

View File

@@ -21,6 +21,7 @@ public:
{ {
return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name); return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name);
} }
virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C
inline MxU16 GetColor(MxU8 p_id) inline MxU16 GetColor(MxU8 p_id)

View File

@@ -1,29 +1,3 @@
#include "legostate.h" #include "legostate.h"
DECOMP_SIZE_ASSERT(LegoState, 0x08); 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;
}