2022-10-14 08:46:50 +00:00
|
|
|
#ifndef _CBODYSTATECMDMGR
|
|
|
|
#define _CBODYSTATECMDMGR
|
|
|
|
|
2022-10-24 23:29:11 +00:00
|
|
|
#include "Kyoto/Animation/CharacterCommon.hpp"
|
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
2022-10-14 08:46:50 +00:00
|
|
|
|
2022-10-14 13:36:01 +00:00
|
|
|
class CBodyStateCmd {
|
|
|
|
EBodyStateCmd x4_cmd;
|
|
|
|
|
|
|
|
public:
|
2022-10-24 23:29:11 +00:00
|
|
|
virtual ~CBodyStateCmd(){};
|
2022-10-14 13:36:01 +00:00
|
|
|
explicit CBodyStateCmd(EBodyStateCmd cmd) : x4_cmd(cmd) {}
|
|
|
|
EBodyStateCmd GetCommandId() const { return x4_cmd; }
|
|
|
|
};
|
|
|
|
|
|
|
|
class CBCAdditiveFlinchCmd : public CBodyStateCmd {
|
|
|
|
float x8_weight;
|
|
|
|
|
|
|
|
public:
|
|
|
|
float GetWeight() const { return x8_weight; }
|
|
|
|
};
|
2022-10-14 08:46:50 +00:00
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
class CBCGenerateCmd : public CBodyStateCmd {
|
|
|
|
pas::EGenerateType x8_type;
|
|
|
|
CVector3f xc_targetPos;
|
|
|
|
int x18_animId;
|
|
|
|
bool x1c_24_targetTransform : 1;
|
|
|
|
bool x1c_25_overrideAnim : 1;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CBCGenerateCmd() : CBodyStateCmd(kBSC_Generate), xc_targetPos(0.f, 0.f, 0.f) {}
|
|
|
|
|
|
|
|
explicit CBCGenerateCmd(pas::EGenerateType type)
|
|
|
|
: CBodyStateCmd(kBSC_Generate), x8_type(type), xc_targetPos(0.f, 0.f, 0.f) {}
|
2022-10-24 23:29:11 +00:00
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
explicit CBCGenerateCmd(pas::EGenerateType type, int animId)
|
|
|
|
: CBodyStateCmd(kBSC_Generate)
|
|
|
|
, x8_type(type)
|
|
|
|
, xc_targetPos(0.f, 0.f, 0.f)
|
|
|
|
, x18_animId(animId)
|
|
|
|
, x1c_25_overrideAnim(animId != -1) {}
|
|
|
|
|
|
|
|
explicit CBCGenerateCmd(pas::EGenerateType type, const CVector3f& vec,
|
|
|
|
bool targetTransform = false, bool overrideAnim = false)
|
|
|
|
: CBodyStateCmd(kBSC_Generate)
|
|
|
|
, x8_type(type)
|
|
|
|
, xc_targetPos(vec)
|
|
|
|
, x1c_24_targetTransform(targetTransform)
|
|
|
|
, x1c_25_overrideAnim(overrideAnim) {}
|
|
|
|
|
|
|
|
pas::EGenerateType GetGenerateType() const { return x8_type; }
|
|
|
|
const CVector3f& GetExitTargetPos() const { return xc_targetPos; }
|
|
|
|
bool HasExitTargetPos() const { return x1c_24_targetTransform; }
|
|
|
|
int GetSpecialAnimId() const { return x18_animId; }
|
|
|
|
bool UseSpecialAnimId() const { return x1c_25_overrideAnim; }
|
|
|
|
};
|
|
|
|
|
2022-10-28 09:17:39 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
class CBCGetupCmd : public CBodyStateCmd {
|
|
|
|
pas::EGetupType x8_type;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CBCGetupCmd() : CBodyStateCmd(kBSC_Getup), x8_type(pas::kGetup_Invalid) {}
|
|
|
|
explicit CBCGetupCmd(pas::EGetupType type) : CBodyStateCmd(kBSC_Getup), x8_type(type) {}
|
|
|
|
pas::EGetupType GetGetupType() const { return x8_type; }
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
class CBCSlideCmd : public CBodyStateCmd {
|
2022-10-24 23:29:11 +00:00
|
|
|
public:
|
2022-10-25 19:35:44 +00:00
|
|
|
explicit CBCSlideCmd()
|
|
|
|
: CBodyStateCmd(kBSC_Slide), x8_type(pas::kSlide_Invalid), xc_dir(CVector3f::Zero()) {}
|
2022-10-24 23:29:11 +00:00
|
|
|
explicit CBCSlideCmd(pas::ESlideType type, const CVector3f& dir)
|
|
|
|
: CBodyStateCmd(kBSC_Slide), x8_type(type), xc_dir(dir) {}
|
|
|
|
|
|
|
|
pas::ESlideType GetSlideType() const { return x8_type; }
|
|
|
|
const CVector3f& GetSlideDirection() const { return xc_dir; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ESlideType x8_type;
|
|
|
|
CVector3f xc_dir;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-14 08:46:50 +00:00
|
|
|
class CBodyStateCmdMgr {
|
|
|
|
public:
|
|
|
|
CBodyStateCmd* GetCmd(EBodyStateCmd cmd);
|
2022-10-25 19:35:44 +00:00
|
|
|
const CVector3f& GetTargetVector() const { return x18_target; }
|
2022-10-24 23:29:11 +00:00
|
|
|
|
|
|
|
private:
|
2022-10-25 19:35:44 +00:00
|
|
|
CVector3f x0_move;
|
|
|
|
CVector3f xc_face;
|
|
|
|
CVector3f x18_target;
|
|
|
|
CVector3f x24_additiveTarget;
|
|
|
|
uchar x30_pad[0x270];
|
2022-10-14 08:46:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _CBODYSTATECMDMGR
|