mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Continued work on LegoGameState (#596)
* Continued work on LegoGameState * Fixes/matches/refactor --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -41,16 +41,18 @@ public:
|
||||
virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x10002d00
|
||||
virtual MxU8 VTable0x60() { return m_unk0x74; } // vtable+0x60
|
||||
virtual MxU8 GetActorId() { return m_actorId; } // vtable+0x60
|
||||
|
||||
// FUNCTION: LEGO1 0x10002d10
|
||||
virtual void VTable0x64(MxU8 p_unk0x74) { m_unk0x74 = p_unk0x74; } // vtable+0x64
|
||||
virtual void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } // vtable+0x64
|
||||
|
||||
static const char* GetActorName(MxU8 p_id);
|
||||
|
||||
private:
|
||||
MxFloat m_unk0x68; // 0x68
|
||||
LegoCacheSound* m_sound; // 0x6c
|
||||
MxFloat m_unk0x70; // 0x70
|
||||
MxU8 m_unk0x74; // 0x74
|
||||
MxU8 m_actorId; // 0x74
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1002d300
|
||||
|
@@ -63,6 +63,7 @@ public:
|
||||
inline MxU8 GetFlags() { return m_flags; }
|
||||
|
||||
inline void SetFlags(MxU8 p_flags) { m_flags = p_flags; }
|
||||
inline void ClearFlag(MxU8 p_flag) { m_flags &= ~p_flag; }
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
@@ -88,8 +88,10 @@ public:
|
||||
};
|
||||
|
||||
// SIZE 0x0c
|
||||
struct ScoreName {
|
||||
ScoreName* operator=(const ScoreName* p_other);
|
||||
struct Username {
|
||||
Username();
|
||||
MxResult ReadWrite(LegoStorage* p_storage);
|
||||
Username* operator=(const Username* p_other);
|
||||
|
||||
MxS16 m_letters[7]; // 0x00
|
||||
};
|
||||
@@ -97,13 +99,14 @@ public:
|
||||
// SIZE 0x2c
|
||||
struct ScoreItem {
|
||||
undefined2 m_unk0x00; // 0x00
|
||||
MxU8 m_state[25]; // 0x02
|
||||
ScoreName m_name; // 0x1c
|
||||
MxU8 m_state[5][5]; // 0x02
|
||||
Username m_name; // 0x1c
|
||||
undefined2 m_unk0x2a; // 0x2a
|
||||
};
|
||||
|
||||
// SIZE 0x372
|
||||
struct Scores {
|
||||
struct History {
|
||||
History();
|
||||
void WriteScoreHistory();
|
||||
void FUN_1003ccf0(LegoFile&);
|
||||
|
||||
@@ -111,6 +114,7 @@ public:
|
||||
|
||||
MxS16 m_count; // 0x00
|
||||
ScoreItem m_scores[20]; // 0x02
|
||||
undefined2 m_unk0x372; // 0x372
|
||||
};
|
||||
|
||||
LegoGameState();
|
||||
@@ -129,47 +133,49 @@ public:
|
||||
void StopArea(Area p_area);
|
||||
void SwitchArea(Area p_area);
|
||||
|
||||
inline MxU8 GetUnknownC() { return m_unk0x0c; }
|
||||
inline MxU8 GetActorId() { return m_actorId; }
|
||||
inline Act GetCurrentAct() { return m_currentAct; }
|
||||
inline Act GetLoadedAct() { return m_loadedAct; }
|
||||
inline Area GetCurrentArea() { return m_currentArea; }
|
||||
inline Area GetPreviousArea() { return m_previousArea; }
|
||||
inline MxU32 GetUnknown0x41c() { return m_unk0x41c; }
|
||||
inline Area GetUnknown0x42c() { return m_unk0x42c; }
|
||||
inline Scores* GetScores() { return &m_unk0xa6; }
|
||||
inline History* GetHistory() { return &m_history; }
|
||||
|
||||
inline void SetDirty(MxBool p_dirty) { m_isDirty = p_dirty; }
|
||||
inline void SetCurrentArea(Area p_currentArea) { m_currentArea = p_currentArea; }
|
||||
inline void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
|
||||
inline void SetUnknown0x0c(MxU8 p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
|
||||
inline void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
|
||||
inline void SetUnknown0x41c(undefined4 p_unk0x41c) { m_unk0x41c = p_unk0x41c; }
|
||||
inline void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
|
||||
|
||||
void SetCurrentAct(Act p_currentAct);
|
||||
void FindLoadedAct();
|
||||
void FUN_10039780(MxU8);
|
||||
void SetActor(MxU8 p_actorId);
|
||||
void FUN_10039940();
|
||||
|
||||
private:
|
||||
void RegisterState(LegoState* p_state);
|
||||
MxResult WriteVariable(LegoStorage* p_stream, MxVariableTable* p_from, const char* p_variableName);
|
||||
MxResult WriteEndOfVariables(LegoStorage* p_stream);
|
||||
MxS32 ReadVariable(LegoStorage* p_stream, MxVariableTable* p_to);
|
||||
MxResult WriteVariable(LegoStorage* p_storage, MxVariableTable* p_from, const char* p_variableName);
|
||||
MxResult WriteEndOfVariables(LegoStorage* p_storage);
|
||||
MxS32 ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to);
|
||||
void SetColors();
|
||||
void SetROIHandlerFunction();
|
||||
|
||||
char* m_savePath; // 0x00
|
||||
MxS16 m_stateCount; // 0x04
|
||||
LegoState** m_stateArray; // 0x08
|
||||
MxU8 m_unk0x0c; // 0x0c
|
||||
MxU8 m_actorId; // 0x0c
|
||||
Act m_currentAct; // 0x10
|
||||
Act m_loadedAct; // 0x14
|
||||
LegoBackgroundColor* m_backgroundColor; // 0x18
|
||||
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
|
||||
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
|
||||
MxU16 m_unk0x24; // 0x24
|
||||
undefined m_unk0x26[128]; // 0x26
|
||||
Scores m_unk0xa6; // 0xa6
|
||||
undefined4 m_unk0x418; // 0x418
|
||||
undefined2 m_unk0x26; // 0x26
|
||||
Username m_players[9]; // 0x28
|
||||
History m_history; // 0xa6
|
||||
undefined2 m_unk0x41a; // 0x41a
|
||||
undefined4 m_unk0x41c; // 0x41c
|
||||
MxBool m_isDirty; // 0x420
|
||||
Area m_currentArea; // 0x424
|
||||
@@ -179,4 +185,7 @@ private:
|
||||
|
||||
MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1003c860
|
||||
// LegoGameState::ScoreItem::ScoreItem
|
||||
|
||||
#endif // LEGOGAMESTATE_H
|
||||
|
@@ -216,7 +216,7 @@ public:
|
||||
ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; }
|
||||
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
||||
LegoNavController* GetNavController() { return m_navController; }
|
||||
IslePathActor* GetCurrentVehicle() { return m_currentVehicle; }
|
||||
IslePathActor* GetCurrentActor() { return m_currentActor; }
|
||||
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
|
||||
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
|
||||
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
|
||||
@@ -228,6 +228,7 @@ public:
|
||||
LegoWorldList* GetWorldList() { return m_worldList; }
|
||||
|
||||
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
||||
inline void SetCurrentActor(IslePathActor* p_currentActor) { m_currentActor = p_currentActor; }
|
||||
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
||||
|
||||
@@ -245,7 +246,7 @@ private:
|
||||
LegoWorld* m_currentWorld; // 0x7c
|
||||
MxBool m_exit; // 0x80
|
||||
LegoNavController* m_navController; // 0x84
|
||||
IslePathActor* m_currentVehicle; // 0x88
|
||||
IslePathActor* m_currentActor; // 0x88
|
||||
LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c
|
||||
LegoPlantManager* m_plantManager; // 0x90
|
||||
LegoAnimationManager* m_animationManager; // 0x94
|
||||
@@ -271,7 +272,7 @@ LegoAnimationManager* AnimationManager();
|
||||
LegoNavController* NavController();
|
||||
LegoBuildingManager* BuildingManager();
|
||||
LegoControlManager* ControlManager();
|
||||
IslePathActor* CurrentVehicle();
|
||||
IslePathActor* CurrentActor();
|
||||
ViewManager* GetViewManager();
|
||||
LegoPlantManager* PlantManager();
|
||||
LegoWorld* CurrentWorld();
|
||||
@@ -280,6 +281,7 @@ LegoTextureContainer* TextureContainer();
|
||||
ViewLODListManager* GetViewLODListManager();
|
||||
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
||||
void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c);
|
||||
void SetCurrentActor(IslePathActor* p_currentActor);
|
||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
LegoROI* FindROI(const char* p_name);
|
||||
MxDSAction& GetCurrentAction();
|
||||
|
@@ -65,13 +65,18 @@ public:
|
||||
// FUNCTION: LEGO1 0x10002de0
|
||||
virtual void VTable0xc8(MxU8 p_unk0x148) { m_unk0x148 = p_unk0x148; } // vtable+0xc8
|
||||
|
||||
inline MxU32 GetUnknown88() { return m_unk0x88; }
|
||||
|
||||
inline void SetUnknown88(MxU32 p_unk0x88) { m_unk0x88 = p_unk0x88; }
|
||||
inline void SetUnknownDC(MxU32 p_unk0xdc) { m_unk0xdc = p_unk0xdc; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1002d800
|
||||
// LegoPathActor::`scalar deleting destructor'
|
||||
|
||||
protected:
|
||||
undefined m_unk0x78[0x64]; // 0x78
|
||||
undefined m_unk0x78[0x10]; // 0x78
|
||||
MxU32 m_unk0x88; // 0x88
|
||||
undefined m_unk0x8c[0x50]; // 0x8c
|
||||
MxU32 m_unk0xdc; // 0xdc
|
||||
undefined m_unk0xe0[0xa]; // 0xe0
|
||||
MxU8 m_unk0xea; // 0xea
|
||||
|
@@ -55,8 +55,8 @@ class LegoUnkSaveDataWriter {
|
||||
public:
|
||||
LegoUnkSaveDataWriter();
|
||||
|
||||
MxResult WriteSaveData3(LegoStorage* p_stream);
|
||||
LegoROI* FUN_10083500(char*, MxBool);
|
||||
MxResult WriteSaveData3(LegoStorage* p_storage);
|
||||
LegoROI* FUN_10083500(const char*, MxBool);
|
||||
|
||||
static void InitSaveData();
|
||||
static void SetCustomizeAnimFile(const char* p_value);
|
||||
|
Reference in New Issue
Block a user