2017-07-10 04:55:51 +00:00
|
|
|
#ifndef __URDE_CADDITIVEBODYSTATE_HPP__
|
|
|
|
#define __URDE_CADDITIVEBODYSTATE_HPP__
|
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CharacterCommon.hpp"
|
|
|
|
#include "CBodyStateCmdMgr.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2017-07-11 07:17:03 +00:00
|
|
|
class CBodyController;
|
|
|
|
class CStateManager;
|
|
|
|
class CActor;
|
2017-07-10 04:55:51 +00:00
|
|
|
class CAdditiveBodyState
|
|
|
|
{
|
2017-07-11 07:17:03 +00:00
|
|
|
public:
|
|
|
|
virtual ~CAdditiveBodyState() = default;
|
|
|
|
virtual bool ApplyHeadTracking() const { return true; }
|
|
|
|
virtual bool CanShoot() const { return true; }
|
|
|
|
virtual void Start(CBodyController& bc, CStateManager& mgr) = 0;
|
|
|
|
virtual pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) = 0;
|
|
|
|
virtual void Shutdown(CBodyController& bc) = 0;
|
2017-07-10 04:55:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CABSAim : public CAdditiveBodyState
|
|
|
|
{
|
2017-07-11 07:17:03 +00:00
|
|
|
bool x4_needsIdle = false;
|
|
|
|
s32 x8_anims[4];
|
|
|
|
float x18_angles[4];
|
|
|
|
float x28_hWeight = 0.f;
|
|
|
|
float x2c_hWeightVel = 0.f;
|
|
|
|
float x30_vWeight = 0.f;
|
|
|
|
float x34_vWeightVel = 0.f;
|
|
|
|
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
|
|
|
public:
|
|
|
|
void Start(CBodyController& bc, CStateManager& mgr);
|
|
|
|
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
|
|
|
void Shutdown(CBodyController& bc);
|
2017-07-10 04:55:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CABSFlinch : public CAdditiveBodyState
|
|
|
|
{
|
2017-07-11 07:17:03 +00:00
|
|
|
float x4_weight = 1.f;
|
|
|
|
u32 x8_anim = 0;
|
|
|
|
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
|
|
|
public:
|
|
|
|
void Start(CBodyController& bc, CStateManager& mgr);
|
|
|
|
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
|
|
|
void Shutdown(CBodyController& bc) {}
|
2017-07-10 04:55:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CABSIdle : public CAdditiveBodyState
|
|
|
|
{
|
2017-07-11 07:17:03 +00:00
|
|
|
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
|
|
|
public:
|
|
|
|
void Start(CBodyController& bc, CStateManager& mgr) {}
|
|
|
|
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
|
|
|
void Shutdown(CBodyController& bc) {}
|
2017-07-10 04:55:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CABSReaction : public CAdditiveBodyState
|
|
|
|
{
|
2017-07-11 07:17:03 +00:00
|
|
|
float x4_weight = 1.f;
|
|
|
|
s32 x8_anim = -1;
|
2017-07-14 05:14:19 +00:00
|
|
|
pas::EAdditiveReactionType xc_type = pas::EAdditiveReactionType::Invalid;
|
2017-07-11 07:17:03 +00:00
|
|
|
bool x10_active = false;
|
|
|
|
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
|
|
|
void StopAnimation(CBodyController& bc);
|
|
|
|
public:
|
|
|
|
void Start(CBodyController& bc, CStateManager& mgr);
|
|
|
|
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
|
|
|
void Shutdown(CBodyController& bc) { StopAnimation(bc); }
|
2017-07-10 04:55:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CADDITIVEBODYSTATE_HPP__
|