2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CGAMESTATE
|
|
|
|
#define _CGAMESTATE
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-09 23:03:51 +00:00
|
|
|
#include "MetroidPrime/Player/CGameOptions.hpp"
|
|
|
|
#include "MetroidPrime/Player/CHintOptions.hpp"
|
|
|
|
#include "MetroidPrime/Player/CPlayerState.hpp"
|
|
|
|
#include "MetroidPrime/Player/CSystemOptions.hpp"
|
|
|
|
#include "MetroidPrime/Player/CWorldState.hpp"
|
|
|
|
#include "MetroidPrime/Player/CWorldTransManager.hpp"
|
2022-07-18 22:42:58 +00:00
|
|
|
#include "MetroidPrime/TGameTypes.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#include "rstl/rc_ptr.hpp"
|
|
|
|
#include "rstl/reserved_vector.hpp"
|
|
|
|
#include "rstl/vector.hpp"
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
class CGameState {
|
|
|
|
public:
|
|
|
|
CGameState();
|
|
|
|
CGameState(CInputStream& in, int saveIdx);
|
|
|
|
|
|
|
|
rstl::rc_ptr< CPlayerState >& PlayerState();
|
2022-04-11 22:42:08 +00:00
|
|
|
CAssetId CurrentWorldAssetId();
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
CSystemOptions& SystemOptions() { return xa8_systemOptions; }
|
|
|
|
CGameOptions& GameOptions() { return x17c_gameOptions; }
|
|
|
|
CHintOptions& HintOptions() { return x1f8_hintOptions; }
|
2022-09-05 04:01:13 +00:00
|
|
|
uint& SaveIdx() { return x20c_saveIdx; }
|
2022-04-10 00:17:06 +00:00
|
|
|
u64& CardSerial() { return x210_cardSerial; }
|
2022-10-09 05:37:23 +00:00
|
|
|
rstl::vector< uchar >& BackupBuf() { return x218_backupBuf; }
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
rstl::reserved_vector< bool, 128 > x0_;
|
|
|
|
CAssetId x84_mlvlId;
|
|
|
|
rstl::vector< CWorldState > x88_worldStates;
|
|
|
|
rstl::rc_ptr< CPlayerState > x98_playerState;
|
|
|
|
rstl::rc_ptr< CWorldTransManager > x9c_transManager;
|
2022-10-09 05:37:23 +00:00
|
|
|
double xa0_playTime;
|
2022-04-10 00:17:06 +00:00
|
|
|
CSystemOptions xa8_systemOptions;
|
|
|
|
CGameOptions x17c_gameOptions;
|
|
|
|
CHintOptions x1f8_hintOptions;
|
2022-09-05 04:01:13 +00:00
|
|
|
uint x20c_saveIdx;
|
2022-04-10 00:17:06 +00:00
|
|
|
u64 x210_cardSerial;
|
2022-10-09 05:37:23 +00:00
|
|
|
rstl::vector< uchar > x218_backupBuf;
|
2022-04-10 00:17:06 +00:00
|
|
|
bool x228_24_hardMode : 1;
|
|
|
|
bool x228_25_initPowerupsAtFirstSpawn : 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern CGameState* gpGameState;
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CGAMESTATE
|