2022-10-14 08:46:50 +00:00
|
|
|
#ifndef _CBODYCONTROLLER
|
|
|
|
#define _CBODYCONTROLLER
|
|
|
|
|
|
|
|
#include "MetroidPrime/BodyState/CBodyStateCmdMgr.hpp"
|
2022-10-25 15:43:42 +00:00
|
|
|
#include "MetroidPrime/BodyState/CBodyStateInfo.hpp"
|
|
|
|
|
|
|
|
#include "Kyoto/Math/CQuaternion.hpp"
|
2022-10-14 08:46:50 +00:00
|
|
|
|
|
|
|
class CActor;
|
2022-10-14 13:36:01 +00:00
|
|
|
class CPASDatabase;
|
2022-10-24 23:29:11 +00:00
|
|
|
class CQuaternion;
|
|
|
|
class CAnimPlaybackParms;
|
2022-10-28 11:34:03 +00:00
|
|
|
class CPASAnimParmData;
|
|
|
|
class CRandom16;
|
2022-10-14 08:46:50 +00:00
|
|
|
|
|
|
|
class CBodyController {
|
|
|
|
public:
|
2022-10-14 13:36:01 +00:00
|
|
|
CActor& GetOwner() const { return x0_actor; }
|
2022-10-14 08:46:50 +00:00
|
|
|
CBodyStateCmdMgr& CommandMgr() { return x4_cmdMgr; }
|
2022-10-24 23:29:11 +00:00
|
|
|
const CBodyStateCmdMgr& GetCommandMgr() const { return x4_cmdMgr; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
const CPASDatabase& GetPASDatabase() const;
|
2022-10-24 23:29:11 +00:00
|
|
|
float GetAnimTimeRemaining() const;
|
|
|
|
void SetDeltaRotation(const CQuaternion& q);
|
|
|
|
void SetCurrentAnimation(const CAnimPlaybackParms& parms, bool loop, bool noTrans);
|
2022-10-25 19:35:44 +00:00
|
|
|
void FaceDirection(const CVector3f& v0, float dt);
|
2022-10-28 08:57:00 +00:00
|
|
|
void EnableAnimation(bool enable);
|
2022-10-28 11:34:03 +00:00
|
|
|
void PlayBestAnimation(const CPASAnimParmData& parms, CRandom16& r);
|
2022-11-11 12:55:40 +00:00
|
|
|
void LoopBestAnimation(const CPASAnimParmData& parms, CRandom16& r);
|
2022-10-28 12:33:10 +00:00
|
|
|
bool HasIceBreakoutState();
|
2022-10-28 21:42:35 +00:00
|
|
|
void Activate(CStateManager& mgr);
|
2022-10-29 04:22:07 +00:00
|
|
|
void SetLocomotionType(pas::ELocomotionType type);
|
|
|
|
float GetPercentageFrozen() const;
|
2022-10-24 23:29:11 +00:00
|
|
|
|
2022-10-28 09:17:39 +00:00
|
|
|
void SetFallState(pas::EFallState state); // { x2f0_fallState = state; }
|
2022-10-28 21:42:35 +00:00
|
|
|
pas::EFallState GetFallState() const; // { return x2f0_fallState; }
|
2022-10-29 04:22:07 +00:00
|
|
|
const CBodyStateInfo& GetBodyStateInfo() const { return x2a4_bodyStateInfo; }
|
2022-10-28 09:17:39 +00:00
|
|
|
int GetCurrentAnimId() const { return x2f8_curAnim; }
|
2022-10-25 15:43:42 +00:00
|
|
|
pas::ELocomotionType GetLocomotionType() const { return x2ec_locomotionType; }
|
2022-10-28 08:57:00 +00:00
|
|
|
bool IsAnimationOver() const { return x300_24_animationOver; }
|
|
|
|
bool ShouldPlayDeathAnims() const { return x300_28_playDeathAnims; }
|
2022-10-28 21:42:35 +00:00
|
|
|
float GetRestrictedFlyerMoveSpeed() const { return x330_restrictedFlyerMoveSpeed; }
|
|
|
|
void SetRestrictedFlyerMoveSpeed(float speed) { x330_restrictedFlyerMoveSpeed = speed; }
|
2022-10-24 23:29:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
CActor& x0_actor;
|
|
|
|
CBodyStateCmdMgr x4_cmdMgr;
|
2022-10-25 15:43:42 +00:00
|
|
|
CBodyStateInfo x2a4_bodyStateInfo;
|
|
|
|
CQuaternion x2dc_rot;
|
2022-10-28 21:42:35 +00:00
|
|
|
pas::ELocomotionType x2ec_locomotionType;
|
|
|
|
pas::EFallState x2f0_fallState;
|
2022-10-25 15:43:42 +00:00
|
|
|
EBodyType x2f4_bodyType;
|
2022-10-28 21:42:35 +00:00
|
|
|
int x2f8_curAnim;
|
2022-10-24 23:29:11 +00:00
|
|
|
float x2fc_turnSpeed;
|
|
|
|
bool x300_24_animationOver : 1;
|
2022-10-28 08:57:00 +00:00
|
|
|
bool x300_25_active : 1;
|
|
|
|
bool x300_26_frozen : 1;
|
|
|
|
bool x300_27_hasBeenFrozen : 1;
|
|
|
|
bool x300_28_playDeathAnims : 1;
|
2022-10-28 21:42:35 +00:00
|
|
|
float x304_intoFreezeDur;
|
|
|
|
float x308_frozenDur;
|
|
|
|
float x30c_breakoutDur;
|
|
|
|
float x310_timeFrozen;
|
|
|
|
CVector3f x314_backedUpForce;
|
|
|
|
float x320_fireDur;
|
|
|
|
float x324_electrocutionDur;
|
|
|
|
float x328_timeOnFire;
|
|
|
|
float x32c_timeElectrocuting;
|
|
|
|
float x330_restrictedFlyerMoveSpeed;
|
2022-10-14 08:46:50 +00:00
|
|
|
};
|
2022-10-28 21:42:35 +00:00
|
|
|
CHECK_SIZEOF(CBodyController, 0x334)
|
2022-10-14 08:46:50 +00:00
|
|
|
|
|
|
|
#endif // _CBODYCONTROLLER
|