Implement/match InfocenterState::InfocenterState (#515)

* Implement LegoState::Shuffle

* Remove unused params

* Move ctor

* Asm generate hotfix

---------

Co-authored-by: MS <disinvite@users.noreply.github.com>
This commit is contained in:
Christian Semmler
2024-02-01 18:08:56 -05:00
committed by GitHub
parent fce90ed8d8
commit a7acf8c607
9 changed files with 167 additions and 50 deletions

View File

@@ -146,6 +146,15 @@ public:
c_leaveInfoCenterDialogue3 = 564,
c_leaveInfoCenterDialogue4 = 565,
c_unk566 = 566,
c_unk567 = 567,
c_unk568 = 568,
c_unk569 = 569,
c_unk570 = 570,
c_unk571 = 571,
c_unk572 = 572,
c_registerToContinueDialogue = 573,
c_bricksterDialogue = 574,

View File

@@ -30,9 +30,9 @@ public:
inline MxS16 GetInfocenterBufferSize() { return sizeof(m_buffer) / sizeof(m_buffer[0]); }
inline MxStillPresenter* GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; }
inline StateStruct& GetUnknown0x08() { return m_unk0x08; }
inline StateStruct& GetUnknown0x14() { return m_unk0x14; }
inline StateStruct& GetUnknown0x68() { return m_unk0x68; }
inline Shuffle& GetUnknown0x08() { return m_unk0x08; }
inline Shuffle& GetUnknown0x14() { return m_unk0x14; }
inline Shuffle& GetUnknown0x68() { return m_unk0x68; }
inline MxU32 GetUnknown0x74() { return m_unk0x74; }
inline void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
@@ -41,11 +41,11 @@ public:
// InfocenterState::`scalar deleting destructor'
private:
StateStruct m_unk0x08; // 0x08
StateStruct m_unk0x14; // 0x14
StateStruct m_unk0x20[3]; // 0x20
StateStruct m_unk0x44[3]; // 0x44
StateStruct m_unk0x68; // 0x68
Shuffle m_unk0x08; // 0x08
Shuffle m_unk0x14; // 0x14
Shuffle m_unk0x20[3]; // 0x20
Shuffle m_unk0x44[3]; // 0x44
Shuffle m_unk0x68; // 0x68
MxU32 m_unk0x74; // 0x74
MxStillPresenter* m_buffer[7]; // 0x78
};

View File

@@ -45,23 +45,45 @@ public:
// LegoState::`scalar deleting destructor'
// SIZE 0x0c
struct StateStruct {
void* m_unk0x00; // 0x00
undefined2 m_unk0x04; // 0x04
undefined2 m_unk0x06; // 0x06
MxU16 m_unk0x08; // 0x08
class Shuffle {
public:
// FUNCTION: LEGO1 0x10017c00
StateStruct()
Shuffle()
{
m_unk0x04 = 0;
m_unk0x00 = NULL;
m_objectIds = NULL;
m_length = 0;
m_unk0x06 = 0;
m_unk0x08 = 0;
}
Shuffle(MxU32* p_objectIds, MxU16 p_length)
{
m_objectIds = p_objectIds;
m_length = p_length;
m_unk0x06 = 0;
m_unk0x08 = 0;
}
// FUNCTION: LEGO1 0x10071800
Shuffle& operator=(const Shuffle& p_shuffle)
{
m_objectIds = p_shuffle.m_objectIds;
m_length = p_shuffle.m_length;
m_unk0x08 = p_shuffle.m_unk0x08;
m_unk0x06 = p_shuffle.m_unk0x06;
return *this;
}
MxU32 FUN_10014d00();
MxBool FUN_10014de0(MxU32 p_objectId);
inline void SetUnknown0x08(MxU16 p_unk0x08) { m_unk0x08 = p_unk0x08; }
private:
MxU32* m_objectIds; // 0x00
MxU16 m_length; // 0x04
undefined2 m_unk0x06; // 0x06
MxU16 m_unk0x08; // 0x08
};
};

View File

@@ -29,7 +29,7 @@ public:
// LegoVehicleBuildState::`scalar deleting destructor'
private:
StateStruct m_unk0x08[4]; // 0x08
Shuffle m_unk0x08[4]; // 0x08
// This can be one of the following:
// * LegoRaceCarBuildState

View File

@@ -36,9 +36,9 @@ public:
MxBool FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId);
private:
StateStruct m_unk0x08[3]; // 0x08
MxS16 m_unk0x2c; // 0x2c
MxBool m_active; // 0x2e
Shuffle m_unk0x08[3]; // 0x08
MxS16 m_unk0x2c; // 0x2c
MxBool m_active; // 0x2e
};
#endif // RADIOSTATE_H