prime/include/MetroidPrime/CEntity.hpp

51 lines
1.5 KiB
C++
Raw Normal View History

2022-08-09 16:03:51 -07:00
#ifndef _CENTITY_HPP
#define _CENTITY_HPP
#include "types.h"
#include "MetroidPrime/CEntityInfo.hpp"
#include "MetroidPrime/CStateManager.hpp"
#include "MetroidPrime/TCastTo.hpp"
#include "MetroidPrime/TGameTypes.hpp"
#include "rstl/string.hpp"
#include "rstl/vector.hpp"
class CEntity {
public:
virtual ~CEntity();
virtual void Accept(IVisitor& visitor) = 0;
virtual void PreThink(f32 dt, CStateManager& mgr);
virtual void Think(f32 dt, CStateManager& mgr);
2022-08-10 19:33:46 -07:00
virtual void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr);
2022-08-09 16:03:51 -07:00
virtual void SetActive(bool active);
CEntity(TUniqueId id, const CEntityInfo& info, bool active, const rstl::string& name);
2022-08-10 19:33:46 -07:00
void SendScriptMsgs(EScriptObjectState state, CStateManager& mgr, EScriptObjectMessage msg);
static inline void SendScriptMsg(CStateManager& mgr, CEntity* to, TUniqueId sender, EScriptObjectMessage msg) {
mgr.SendScriptMsg(to, sender, msg);
}
2022-08-10 19:33:46 -07:00
TUniqueId GetUniqueId() const { return x8_uid; }
TAreaId GetAreaId() const;
2022-09-13 22:24:12 -07:00
bool GetActive() const { return x30_24_active; }
const rstl::vector< SConnection >& GetConnectionList() const { return x20_conns; }
2022-08-10 19:33:46 -07:00
static rstl::vector< SConnection > NullConnectionList;
2022-08-09 16:03:51 -07:00
protected:
TAreaId x4_areaId;
TUniqueId x8_uid;
TEditorId xc_editorId;
rstl::string x10_name;
rstl::vector< SConnection > x20_conns;
2022-08-09 16:03:51 -07:00
bool x30_24_active : 1;
bool x30_25_inGraveyard : 1;
bool x30_26_scriptingBlocked : 1;
2022-08-10 19:33:46 -07:00
bool x30_27_notInArea : 1;
2022-08-09 16:03:51 -07:00
};
2022-08-12 18:26:00 -07:00
CHECK_SIZEOF(CEntity, 0x34)
2022-08-09 16:03:51 -07:00
#endif