2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-04-18 17:17:49 -07:00
|
|
|
|
2019-09-23 12:00:23 -07:00
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
#include "Runtime/World/CActor.hpp"
|
2016-04-18 17:17:49 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2018-12-07 21:30:43 -08:00
|
|
|
|
|
|
|
class CScriptWaypoint : public CActor {
|
|
|
|
float xe8_speed;
|
|
|
|
u32 xec_animation;
|
|
|
|
float xf0_pause;
|
|
|
|
u8 xf4_patternTranslate;
|
|
|
|
u8 xf5_patternOrient;
|
|
|
|
u8 xf6_patternFit;
|
|
|
|
u8 xf7_behaviour;
|
|
|
|
u8 xf8_behaviourOrient;
|
|
|
|
u16 xfa_behaviourModifiers;
|
2016-04-18 17:17:49 -07:00
|
|
|
|
|
|
|
public:
|
2021-05-26 07:00:57 -07:00
|
|
|
DEFINE_ENTITY
|
2018-12-07 21:30:43 -08:00
|
|
|
CScriptWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
bool active, float speed, float pause, u32 patternTranslate, u32 patternOrient, u32 patternFit,
|
|
|
|
u32 behaviour, u32 behaviourOrient, u32 behaviourModifiers, u32 animation);
|
2016-10-01 12:00:16 -07:00
|
|
|
|
2019-08-09 05:45:18 -07:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
2020-04-05 04:54:02 -07:00
|
|
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
|
2018-12-07 21:30:43 -08:00
|
|
|
TUniqueId FollowWaypoint(CStateManager& mgr) const;
|
|
|
|
TUniqueId NextWaypoint(CStateManager& mgr) const;
|
|
|
|
float GetSpeed() const { return xe8_speed; }
|
|
|
|
u32 GetAnimation() const { return xec_animation; }
|
|
|
|
float GetPause() const { return xf0_pause; }
|
|
|
|
u8 GetPatternTranslate() const { return xf4_patternTranslate; }
|
|
|
|
u8 GetPatternOrient() const { return xf5_patternOrient; }
|
|
|
|
u8 GetPatternFit() const { return xf6_patternFit; }
|
|
|
|
u8 GetBehaviour() const { return xf7_behaviour; }
|
|
|
|
u8 GetBehaviourOrient() const { return xf8_behaviourOrient; }
|
|
|
|
u16 GetBehaviourModifiers() const { return xfa_behaviourModifiers; }
|
2016-04-18 17:17:49 -07:00
|
|
|
};
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|