#ifndef CSTATEMANAGER_HPP #define CSTATEMANAGER_HPP #include #include /** note - avoid using this macro - not portable between game versions */ #define gpStateManager ((CStateManager *) 0x8045A1A8) class CPlayer; class CPlayerState; class CWorld; class CStateManager { public: enum EInitPhase { kInit_LoadWorld = 0, kInit_LoadFirstArea = 1, kInit_Done = 2 }; void InitializeState(uint WorldAssetId, TAreaId AreaId, uint AreaAssetId); inline CPlayer* GetPlayer() const { return *GetField(this, 0x84C); } inline CWorld* GetWorld() const { return *GetField(this, 0x850); } inline CPlayerState* GetPlayerState() const { return **GetField(this, 0x8b8); } inline EInitPhase GetInitPhase() const { return *GetField(this, 0xB3C); } }; #endif