mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
New code style refactor
This commit is contained in:
@@ -4,71 +4,68 @@
|
||||
#include "CharacterCommon.hpp"
|
||||
#include "CBodyStateCmdMgr.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
namespace urde {
|
||||
class CBodyController;
|
||||
class CStateManager;
|
||||
class CActor;
|
||||
class CAdditiveBodyState
|
||||
{
|
||||
class CAdditiveBodyState {
|
||||
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;
|
||||
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;
|
||||
};
|
||||
|
||||
class CABSAim : public CAdditiveBodyState
|
||||
{
|
||||
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);
|
||||
class CABSAim : public CAdditiveBodyState {
|
||||
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);
|
||||
void Start(CBodyController& bc, CStateManager& mgr);
|
||||
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
||||
void Shutdown(CBodyController& bc);
|
||||
};
|
||||
|
||||
class CABSFlinch : public CAdditiveBodyState
|
||||
{
|
||||
float x4_weight = 1.f;
|
||||
u32 x8_anim = 0;
|
||||
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
||||
class CABSFlinch : public CAdditiveBodyState {
|
||||
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) {}
|
||||
void Start(CBodyController& bc, CStateManager& mgr);
|
||||
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
||||
void Shutdown(CBodyController& bc) {}
|
||||
};
|
||||
|
||||
class CABSIdle : public CAdditiveBodyState
|
||||
{
|
||||
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
||||
class CABSIdle : public CAdditiveBodyState {
|
||||
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) {}
|
||||
void Start(CBodyController& bc, CStateManager& mgr) {}
|
||||
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
||||
void Shutdown(CBodyController& bc) {}
|
||||
};
|
||||
|
||||
class CABSReaction : public CAdditiveBodyState
|
||||
{
|
||||
float x4_weight = 1.f;
|
||||
s32 x8_anim = -1;
|
||||
pas::EAdditiveReactionType xc_type = pas::EAdditiveReactionType::Invalid;
|
||||
bool x10_active = false;
|
||||
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
|
||||
void StopAnimation(CBodyController& bc);
|
||||
class CABSReaction : public CAdditiveBodyState {
|
||||
float x4_weight = 1.f;
|
||||
s32 x8_anim = -1;
|
||||
pas::EAdditiveReactionType xc_type = pas::EAdditiveReactionType::Invalid;
|
||||
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); }
|
||||
void Start(CBodyController& bc, CStateManager& mgr);
|
||||
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr);
|
||||
void Shutdown(CBodyController& bc) { StopAnimation(bc); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user