2023-04-27 22:19:39 -04:00
|
|
|
#ifndef LEGOGAMESTATE_H
|
|
|
|
#define LEGOGAMESTATE_H
|
|
|
|
|
2023-09-29 16:38:08 -04:00
|
|
|
#include "decomp.h"
|
|
|
|
#include "legobackgroundcolor.h"
|
|
|
|
#include "legofullscreenmovie.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxtypes.h"
|
2023-07-02 04:05:49 -04:00
|
|
|
|
2023-10-12 12:18:24 -04:00
|
|
|
class LegoState;
|
|
|
|
class LegoStream;
|
|
|
|
class MxVariable;
|
|
|
|
class MxString;
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
struct ColorStringStruct {
|
|
|
|
const char* m_targetName;
|
|
|
|
const char* m_colorName;
|
2023-10-12 12:18:24 -04:00
|
|
|
};
|
|
|
|
|
2023-09-29 16:38:08 -04:00
|
|
|
// SIZE 0x430 (at least)
|
2023-10-24 19:38:27 -04:00
|
|
|
class LegoGameState {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
__declspec(dllexport) LegoGameState();
|
|
|
|
__declspec(dllexport) ~LegoGameState();
|
|
|
|
__declspec(dllexport) MxResult Load(MxULong);
|
2023-12-13 05:48:14 -05:00
|
|
|
__declspec(dllexport) MxResult Save(MxULong);
|
|
|
|
__declspec(dllexport) void SerializePlayersInfo(MxS16);
|
|
|
|
__declspec(dllexport) void SerializeScoreHistory(MxS16);
|
|
|
|
__declspec(dllexport) void SetSavePath(char*);
|
2023-07-03 13:25:37 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoState* GetState(COMPAT_CONST char* p_stateName);
|
|
|
|
LegoState* CreateState(COMPAT_CONST char* p_stateName);
|
2023-10-12 12:18:24 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
void GetFileSavePath(MxString* p_outPath, MxULong p_slotn);
|
2023-12-13 05:48:14 -05:00
|
|
|
void FUN_1003a720(MxU32);
|
|
|
|
void HandleAction(MxU32);
|
2023-10-23 07:16:21 -04:00
|
|
|
|
2023-12-13 05:48:14 -05:00
|
|
|
inline MxU32 GetUnknown10() { return m_unk0x10; }
|
|
|
|
inline void SetUnknown424(undefined4 p_unk0x424) { m_unk0x424 = p_unk0x424; }
|
2023-10-12 12:18:24 -04:00
|
|
|
|
2023-11-06 04:00:24 -05:00
|
|
|
void SetSomeEnumState(undefined4 p_state);
|
|
|
|
|
2023-10-12 12:18:24 -04:00
|
|
|
private:
|
2023-10-24 19:38:27 -04:00
|
|
|
void RegisterState(LegoState* p_state);
|
|
|
|
MxResult WriteEndOfVariables(LegoStream* p_stream);
|
2023-11-01 11:12:03 -04:00
|
|
|
void SetROIHandlerFunction();
|
2023-10-12 12:18:24 -04:00
|
|
|
|
2023-07-03 13:25:37 -04:00
|
|
|
private:
|
2023-10-24 19:38:27 -04:00
|
|
|
char* m_savePath; // 0x0
|
|
|
|
MxS16 m_stateCount;
|
|
|
|
LegoState** m_stateArray;
|
2023-12-13 05:48:14 -05:00
|
|
|
MxU8 m_unk0xc;
|
|
|
|
MxU32 m_unk0x10;
|
2023-10-24 19:38:27 -04:00
|
|
|
undefined4 m_unk0x14;
|
|
|
|
LegoBackgroundColor* m_backgroundColor; // 0x18
|
|
|
|
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
|
|
|
|
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
|
2023-12-13 05:48:14 -05:00
|
|
|
MxU16 m_unk0x24; // 0x24
|
|
|
|
undefined m_unk0x28[1020];
|
|
|
|
undefined4 m_unk0x424;
|
|
|
|
undefined4 m_unk0x428;
|
|
|
|
undefined4 m_unk0x42c;
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
2023-12-13 05:48:14 -05:00
|
|
|
MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen);
|
2023-11-01 11:12:03 -04:00
|
|
|
|
2023-04-27 22:19:39 -04:00
|
|
|
#endif // LEGOGAMESTATE_H
|