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-05-13 03:13:34 +00:00
|
|
|
None = -1,
|
2016-04-23 18:04:49 +00:00
|
|
|
Open,
|
|
|
|
Close,
|
|
|
|
Ready,
|
2016-04-22 20:22:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2016-09-10 04:50:00 +00:00
|
|
|
bool x2a8_24_ : 1;
|
2016-04-22 20:22:45 +00:00
|
|
|
bool x2a8_25_ : 1;
|
2017-10-16 05:26:50 +00:00
|
|
|
bool x2a8_26_useConservativeCameraDistance : 1;
|
2016-04-22 20:22:45 +00:00
|
|
|
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:
|
2017-11-13 06:19:18 +00:00
|
|
|
CScriptDoor(TUniqueId, std::string_view 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&,
|
2016-12-29 21:38:59 +00:00
|
|
|
bool active, bool open, 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;
|
2017-01-15 03:07:01 +00:00
|
|
|
void Accept(IVisitor& visitor);
|
2016-04-23 00:29:55 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr);
|
2016-04-24 02:46:13 +00:00
|
|
|
void Think(float, CStateManager& mgr);
|
2016-04-23 10:51:53 +00:00
|
|
|
void AddToRenderer(const zeus::CFrustum&, CStateManager& mgr);
|
|
|
|
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__
|