mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-10 06:27:41 +00:00
Various rstl fixes; continue CScriptMazeNode & CScriptPlatform
Former-commit-id: 7608f27ed2
This commit is contained in:
@@ -23,6 +23,10 @@ struct SRiders {
|
||||
TUniqueId x0_uid;
|
||||
f32 x4_decayTimer;
|
||||
CTransform4f x8_transform;
|
||||
|
||||
SRiders(TUniqueId uid)
|
||||
: x0_uid(uid), x4_decayTimer(1.f / 6.f), x8_transform(CTransform4f::Identity()) {}
|
||||
bool operator==(const SRiders& other) const { return x0_uid == other.x0_uid; }
|
||||
};
|
||||
|
||||
class CScriptPlatform : public CPhysicsActor {
|
||||
@@ -60,6 +64,12 @@ public:
|
||||
virtual void SplashThink(const CAABox&, const CFluidPlane&, float, CStateManager&) const;
|
||||
virtual CQuaternion Move(float, CStateManager&);
|
||||
|
||||
TUniqueId GetWaypoint(CStateManager& mgr);
|
||||
TUniqueId GetNext(TUniqueId uid, CStateManager& mgr);
|
||||
|
||||
static void AddRider(rstl::vector< SRiders >& riders, TUniqueId riderId,
|
||||
const CPhysicsActor* ridee, CStateManager& mgr);
|
||||
|
||||
private:
|
||||
TUniqueId x258_currentWaypoint;
|
||||
TUniqueId x25a_targetWaypoint;
|
||||
|
||||
50
include/MetroidPrime/ScriptObjects/CScriptWaypoint.hpp
Normal file
50
include/MetroidPrime/ScriptObjects/CScriptWaypoint.hpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef _CSCRIPTWAYPOINT_HPP
|
||||
#define _CSCRIPTWAYPOINT_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "MetroidPrime/CActor.hpp"
|
||||
|
||||
class CScriptWaypoint : public CActor {
|
||||
public:
|
||||
CScriptWaypoint(TUniqueId uid, const rstl::string& name, const CEntityInfo& info,
|
||||
const CTransform4f& xf, bool active, float speed, float pause,
|
||||
uint patternTranslate, uint patternOrient, uint patternFit, uint behaviour,
|
||||
uint behaviourOrient, uint behaviourModifiers, uint animation);
|
||||
|
||||
// CEntity
|
||||
~CScriptWaypoint() override;
|
||||
void Accept(IVisitor& visitor) override;
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||
|
||||
// CActor
|
||||
void AddToRenderer(const CFrustumPlanes&, const CStateManager&) const override;
|
||||
void Render(const CStateManager&) const override;
|
||||
|
||||
// CScriptWaypoint
|
||||
TUniqueId NextWaypoint(const CStateManager& mgr) const;
|
||||
void FollowWaypoint(const CStateManager& mgr) const;
|
||||
|
||||
f32 GetSpeed() const { return xe8_speed; }
|
||||
uint GetAnimation() const { return xec_animation; }
|
||||
f32 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; }
|
||||
|
||||
private:
|
||||
f32 xe8_speed;
|
||||
uint xec_animation;
|
||||
f32 xf0_pause;
|
||||
u8 xf4_patternTranslate;
|
||||
u8 xf5_patternOrient;
|
||||
u8 xf6_patternFit;
|
||||
u8 xf7_behaviour;
|
||||
u8 xf8_behaviourOrient;
|
||||
u16 xfa_behaviourModifiers;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user