prime/include/MetroidPrime/BodyState/CBSLocomotion.hpp

29 lines
1.2 KiB
C++
Raw Normal View History

#ifndef _CBSLOCOMOTION
#define _CBSLOCOMOTION
#include "MetroidPrime/BodyState/CBodyState.hpp"
#include "rstl/pair.hpp"
class CBSLocomotion : public CBodyState {
protected:
pas::ELocomotionType x4_locomotionType;
float GetStartVelocityMagnitude(const CBodyController& bc) const;
void ReStartBodyState(CBodyController& bc, bool maintainVel);
float ComputeWeightPercentage(const rstl::pair<int, float>& a, const rstl::pair<int, float>& b, float f) const;
public:
bool IsMoving() const override = 0;
bool CanShoot() const override { return true; }
void Start(CBodyController& bc, CStateManager& mgr) override;
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override;
void Shutdown(CBodyController& bc) override;
virtual bool IsPitchable() const { return false; }
virtual float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const = 0;
virtual float ApplyLocomotionPhysics(float dt, CBodyController& bc);
virtual float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init) = 0;
virtual pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
};
#endif // _CBSLOCOMOTION