2022-10-16 00:03:19 +00:00
|
|
|
#ifndef _CSCRIPTDOCK
|
|
|
|
#define _CSCRIPTDOCK
|
|
|
|
|
|
|
|
#include "MetroidPrime/CPhysicsActor.hpp"
|
|
|
|
|
|
|
|
class CScriptDock : public CPhysicsActor {
|
|
|
|
public:
|
2022-11-14 14:16:52 +00:00
|
|
|
CScriptDock(TUniqueId uid, const rstl::string& name, const CEntityInfo& info,
|
|
|
|
const CVector3f& position, const CVector3f& extent, int dock, TAreaId area,
|
|
|
|
bool active, int dockReferenceCount, bool loadConnected);
|
|
|
|
|
2022-10-16 00:03:19 +00:00
|
|
|
void SetDockReference(CStateManager& mgr, int);
|
2022-11-14 14:16:52 +00:00
|
|
|
|
2023-02-06 07:21:28 +00:00
|
|
|
void Accept(IVisitor& visitor);
|
|
|
|
void Think(float, CStateManager&);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
|
|
|
rstl::optional_object< CAABox > GetTouchBounds() const;
|
|
|
|
void Touch(CActor&, CStateManager&);
|
2022-11-14 14:16:52 +00:00
|
|
|
void CleanUp() {}
|
|
|
|
CPlane GetPlane(const CStateManager&) const;
|
|
|
|
TAreaId GetAreaId() const { return x260_area; }
|
|
|
|
int GetDockId() const { return x25c_dock; }
|
|
|
|
int GetDockReference(const CStateManager& mgr) const;
|
|
|
|
TAreaId GetCurrentConnectedAreaId(const CStateManager&) const;
|
|
|
|
void UpdateAreaActivateFlags(CStateManager&);
|
|
|
|
bool HasPointCrossedDock(const CStateManager&, const CVector3f&) const;
|
|
|
|
void AreaLoaded(CStateManager&);
|
|
|
|
void AreaUnloaded(CStateManager&);
|
|
|
|
void SetLoadConnected(CStateManager&, bool);
|
|
|
|
|
|
|
|
private:
|
|
|
|
enum EDockState { kDS_InSourceRoom, kDS_PlayerTouched, kDS_EnterNextArea, kDS_InNextRoom };
|
|
|
|
|
|
|
|
friend class CScriptDoor;
|
|
|
|
int x258_dockReferenceCount;
|
|
|
|
int x25c_dock;
|
|
|
|
TAreaId x260_area;
|
|
|
|
EDockState x264_dockState;
|
|
|
|
bool x268_24_dockReferenced : 1;
|
|
|
|
bool x268_25_loadConnected : 1;
|
|
|
|
bool x268_26_areaPostConstructed : 1;
|
2022-10-16 00:03:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _CSCRIPTDOCK
|