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
|
|
|
|
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
rstl::optional_object< CAABox > GetTouchBounds() const override;
|
|
|
|
void Touch(CActor&, CStateManager&) override;
|
|
|
|
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
|