metaforce/Runtime/World/CScriptDoor.hpp

73 lines
1.8 KiB
C++
Raw Normal View History

2016-04-19 21:25:26 +00:00
#ifndef __URDE_CSCRIPTDOOR_HPP__
#define __URDE_CSCRIPTDOOR_HPP__
#include "CPhysicsActor.hpp"
namespace urde
{
class CScriptDoor : public CPhysicsActor
{
2016-04-22 20:22:45 +00:00
public:
enum class EDoorAnimType
{
2016-04-23 18:04:49 +00:00
Open,
Close,
Ready,
2016-04-22 20:22:45 +00:00
Three
};
float x25c_;
2016-04-23 18:04:49 +00:00
EDoorAnimType x260_doorState = EDoorAnimType::Open;
2016-04-22 20:22:45 +00:00
zeus::CAABox x264_;
2016-04-23 18:04:49 +00:00
TUniqueId x27c_partner = kInvalidUniqueId;
TUniqueId x280_ = kInvalidUniqueId;
2016-04-23 00:29:55 +00:00
TUniqueId x282_dockId = kInvalidUniqueId;
2016-04-23 18:04:49 +00:00
zeus::CAABox x284_modelBounds;
2016-04-22 20:22:45 +00:00
2016-04-23 00:29:55 +00:00
zeus::CVector3f x29c_;
2016-04-22 20:22:45 +00:00
union
{
struct
{
bool x2a0_25_ : 1;
bool x2a0_26_ : 1;
};
u32 dummy1 = 0;
};
union
{
struct
{
bool x2a8_25_ : 1;
bool x2a8_26_ : 1;
bool x2a8_27_ : 1;
2016-04-23 18:04:49 +00:00
bool x2a8_28_ : 1;
bool x2a8_29_ballDoor : 1;
2016-04-22 20:22:45 +00:00
bool x2a8_30_ : 1;
};
u32 dummy2 = 0;
};
2016-04-19 21:25:26 +00:00
public:
CScriptDoor(TUniqueId, const std::string& name, const CEntityInfo& info,
2016-04-22 20:22:45 +00:00
const zeus::CTransform&, CModelData&&, const CActorParameters&,
2016-04-19 21:25:26 +00:00
const zeus::CVector3f&, const zeus::CAABox&,
bool active, bool material, bool, float, bool ballDoor);
2016-04-22 20:22:45 +00:00
2016-04-23 00:29:55 +00:00
zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr);
2016-04-23 10:51:53 +00:00
void AddToRenderer(const zeus::CFrustum&, CStateManager& mgr);
zeus::CAABox GetTouchBounds() const {}
void Render(const CStateManager&) {}
2016-04-22 20:22:45 +00:00
void ForceClosed(CStateManager&);
2016-04-23 00:29:55 +00:00
bool IsConnectedToArea(const CStateManager& mgr, TAreaId area);
2016-04-22 20:22:45 +00:00
void OpenDoor(TUniqueId, CStateManager&);
2016-04-23 00:29:55 +00:00
u32 GetDoorOpenCondition(CStateManager& mgr);
2016-04-22 20:22:45 +00:00
void SetDoorAnimation(EDoorAnimType);
2016-04-19 21:25:26 +00:00
};
}
#endif // __URDE_CSCRIPTDOOR_HPP__