prime/include/MetroidPrime/CStateManager.hpp

75 lines
2.4 KiB
C++
Raw Normal View History

2022-08-09 23:03:51 +00:00
#ifndef _CSTATEMANAGER_HPP
#define _CSTATEMANAGER_HPP
#include "types.h"
2022-08-13 01:26:00 +00:00
#include "MetroidPrime/CEntityInfo.hpp"
#include "MetroidPrime/TGameTypes.hpp"
#include "rstl/auto_ptr.hpp"
#include "rstl/list.hpp"
2022-08-16 02:14:28 +00:00
#include "rstl/rc_ptr.hpp"
2022-08-13 01:26:00 +00:00
#include "rstl/reserved_vector.hpp"
#include "rstl/single_ptr.hpp"
2022-08-16 02:14:28 +00:00
class CAABox;
class CActor;
class CActorModelParticles;
class CCameraManager;
class CEnvFxManager;
class CFluidPlaneManager;
2022-08-16 02:14:28 +00:00
class CMapWorldInfo;
2022-08-13 01:26:00 +00:00
class CObjectList;
class CPlayer;
2022-08-16 02:14:28 +00:00
class CPlayerState;
class CRumbleManager;
2022-08-16 02:14:28 +00:00
class CScriptMailbox;
2022-08-13 01:26:00 +00:00
class CStateManagerContainer;
2022-08-16 02:14:28 +00:00
class CVector3f;
class CWeaponMgr;
class CWorld;
2022-08-16 02:14:28 +00:00
class CWorldTransManager;
namespace SL {
class CSortedListManager;
} // namespace SL
2022-08-13 01:26:00 +00:00
2022-08-11 02:33:46 +00:00
class CStateManager {
public:
void SendScriptMsg(TUniqueId uid, TEditorId target, EScriptObjectMessage msg, EScriptObjectState state);
2022-08-16 02:14:28 +00:00
bool AddDrawableActor(const CActor& actor, const CVector3f& pos, const CAABox& bounds) const;
2022-08-13 01:26:00 +00:00
2022-08-16 02:14:28 +00:00
CCameraManager* CameraManager() { return x870_cameraManager; }
const CCameraManager* GetCameraManager() const { return x870_cameraManager; }
CPlayerState* PlayerState() { return x8b8_playerState.GetPtr(); }
const CPlayerState* GetPlayerState() const { return x8b8_playerState.GetPtr(); }
CWorld* World() { return x850_world.get(); }
const CWorld* GetWorld() const { return x850_world.get(); }
2022-08-13 01:26:00 +00:00
private:
u16 x0_nextFreeIndex;
rstl::reserved_vector< u16, 1024 > x8_objectIndexArray;
rstl::reserved_vector< rstl::auto_ptr< CObjectList >, 8 > x808_objectLists;
CPlayer* x84c_player;
rstl::single_ptr< CWorld > x850_world;
rstl::list< rstl::reserved_vector< TUniqueId, 32 > > x854_graveyard;
rstl::single_ptr< CStateManagerContainer > x86c_stateManagerContainer;
CCameraManager* x870_cameraManager;
SL::CSortedListManager* x874_sortedListManager;
CWeaponMgr* x878_weaponMgr;
CFluidPlaneManager* x87c_fluidPlaneManager;
CEnvFxManager* x880_envFxManager;
rstl::auto_ptr< CActorModelParticles > x884_actorModelParticles;
CRumbleManager* x88c_rumbleManager;
2022-08-16 02:14:28 +00:00
// TODO
// rstl::multimap< TEditorId, TUniqueId > x890_scriptIdMap;
// rstl::map< TEditorId, SScriptObjectStream > x8a4_loadedScriptObjects;
u8 pad[0x28];
rstl::rc_ptr< CPlayerState > x8b8_playerState;
rstl::rc_ptr< CScriptMailbox > x8bc_mailbox;
rstl::rc_ptr< CMapWorldInfo > x8c0_mapWorldInfo;
rstl::rc_ptr< CWorldTransManager > x8c4_worldTransManager;
2022-08-11 02:33:46 +00:00
};
2022-08-09 23:03:51 +00:00
#endif