Use undefined where applicable

This commit is contained in:
Mark Langen 2023-07-16 23:29:11 -07:00
parent cccd21dc20
commit 28f1683375
4 changed files with 44 additions and 39 deletions

View File

@ -1,5 +1,7 @@
#include "infocenterstate.h" #include "infocenterstate.h"
DECOMP_SIZE_ASSERT(InfocenterState, 0x94);
// OFFSET: LEGO1 0x10071600 STUB // OFFSET: LEGO1 0x10071600 STUB
InfocenterState::InfocenterState() InfocenterState::InfocenterState()
{ {

View File

@ -3,6 +3,8 @@
#include "legostate.h" #include "legostate.h"
#include "decomp.h"
// VTABLE 0x100d93a8 // VTABLE 0x100d93a8
// SIZE 0x94 // SIZE 0x94
class InfocenterState : public LegoState class InfocenterState : public LegoState
@ -24,36 +26,34 @@ class InfocenterState : public LegoState
return !strcmp(name, InfocenterState::ClassName()) || LegoState::IsA(name); return !strcmp(name, InfocenterState::ClassName()) || LegoState::IsA(name);
} }
inline MxU32 GetSomething(int p_index) { return m_buffer[p_index]; } inline MxU32 GetInfocenterBufferElement(int p_index) { return m_buffer[p_index]; }
inline void SetSomething(int p_index, MxU32 p_value) { m_buffer[p_index] = p_value; }
private: private:
// Size: 0xC // Size: 0xC
struct SomeStruct struct SomeStruct
{ {
MxU32 unk1; undefined4 unk1;
MxU16 unk2; undefined2 unk2;
MxU16 unk3; undefined2 unk3;
MxU16 unk4; undefined2 unk4;
MxU16 padding;
}; };
MxU16 unk1; undefined2 unk1;
MxU16 unk2; undefined2 unk2;
MxU32 unk3; undefined4 unk3;
MxU32 padding1; undefined4 padding1;
void *unk4; void *unk4;
MxU16 unk5; undefined2 unk5;
MxU16 unk6; undefined2 unk6;
MxU16 unk7; undefined2 unk7;
MxU16 padding2; undefined2 padding2;
void *unk8; void *unk8;
MxU16 unk9; undefined2 unk9;
MxU16 unk10; undefined2 unk10;
MxU16 unk11; undefined2 unk11;
MxU16 padding3; undefined2 padding3;
SomeStruct unk12[6]; SomeStruct unk12[6];
MxU32 unk13; undefined4 unk13;
MxU32 m_buffer[7]; MxU32 m_buffer[7];
}; };

View File

@ -5,6 +5,7 @@
#include "mxstring.h" #include "mxstring.h"
#include "legostream.h" #include "legostream.h"
#include "mxomni.h" #include "mxomni.h"
#include "decomp.h"
// OFFSET: LEGO1 0x10039550 STUB // OFFSET: LEGO1 0x10039550 STUB
LegoGameState::LegoGameState() LegoGameState::LegoGameState()
@ -124,30 +125,30 @@ struct LegoSaveDataEntry3
int m_savePart1; int m_savePart1;
int m_savePart2; int m_savePart2;
MxU8 m_savePart3; MxU8 m_savePart3;
MxU8 padding1[3]; undefined padding1[3];
MxU8 unk1[24]; undefined unk1[24];
MxU8 m_frameOffsetInDwords; MxU8 m_frameOffsetInDwords;
int *m_pFrameData; int *m_pFrameData;
MxU8 m_currentFrame; MxU8 m_currentFrame;
MxU8 padding2[3]; undefined padding2[3];
MxU8 unk2[8]; undefined unk2[8];
MxU8 m_savePart5; MxU8 m_savePart5;
MxU8 padding3[3]; undefined padding3[3];
MxU8 unk3[20]; undefined unk3[20];
MxU8 m_savePart6; MxU8 m_savePart6;
MxU8 padding4[3]; undefined padding4[3];
MxU8 unk4[44]; undefined unk4[44];
MxU8 m_savePart7; MxU8 m_savePart7;
MxU8 padding5[3]; undefined padding5[3];
MxU8 unk5[20]; undefined unk5[20];
MxU8 m_savePart8; MxU8 m_savePart8;
MxU8 padding6[3]; undefined padding6[3];
MxU8 unk6[68]; undefined unk6[68];
MxU8 m_savePart9; MxU8 m_savePart9;
MxU8 padding7[3]; undefined padding7[3];
MxU8 unk7[20]; undefined unk7[20];
MxU8 m_savePart10; MxU8 m_savePart10;
MxU8 padding8[3]; undefined padding8[3];
}; };
DECOMP_SIZE_ASSERT(LegoSaveDataEntry3, 0x108); DECOMP_SIZE_ASSERT(LegoSaveDataEntry3, 0x108);
@ -206,7 +207,7 @@ MxResult LegoGameState::Save(MxULong p_slot)
{ {
MxResult result; MxResult result;
InfocenterState *infocenterState = (InfocenterState *)GameState()->GetState("InfocenterState"); InfocenterState *infocenterState = (InfocenterState *)GameState()->GetState("InfocenterState");
if (infocenterState == NULL || infocenterState->GetSomething(0) == 0) if (infocenterState == NULL || infocenterState->GetInfocenterBufferElement(0) == 0)
{ {
result = SUCCESS; result = SUCCESS;
} }

View File

@ -3,6 +3,8 @@
#include "mxtypes.h" #include "mxtypes.h"
#include "decomp.h"
class LegoState; class LegoState;
class MxVariable; class MxVariable;
class MxString; class MxString;
@ -29,12 +31,12 @@ class LegoGameState
private: private:
char *m_savePath; char *m_savePath;
MxS16 m_stateCount; MxS16 m_stateCount;
MxU16 padding1; undefined2 padding1;
LegoState **m_stateArray; LegoState **m_stateArray;
MxU8 m_someModeSwitch; MxU8 m_someModeSwitch;
MxU8 padding2[3]; undefined padding2[3];
MxU32 m_someEnumState; MxU32 m_someEnumState;
MxU32 unk1; undefined4 unk1;
MxVariable *m_backgroundColor; MxVariable *m_backgroundColor;
MxVariable *m_tempBackgroundColor; MxVariable *m_tempBackgroundColor;
MxVariable *m_fsMovieVariable; MxVariable *m_fsMovieVariable;