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) {}
|
2022-10-28 11:25:08 +00:00
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
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
|
|
|
//
|
|
|
|
|
2022-10-28 11:25:08 +00:00
|
|
|
class CBCScriptedCmd : public CBodyStateCmd {
|
|
|
|
s32 x8_anim;
|
|
|
|
bool xc_24_loopAnim : 1;
|
|
|
|
bool xc_25_timedLoop : 1;
|
|
|
|
float x10_loopDur;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CBCScriptedCmd()
|
|
|
|
: CBodyStateCmd(kBSC_Scripted)
|
|
|
|
, x8_anim(-1)
|
|
|
|
, xc_24_loopAnim(false)
|
|
|
|
, xc_25_timedLoop(false)
|
|
|
|
, x10_loopDur(0.f) {}
|
2022-10-28 11:34:03 +00:00
|
|
|
|
2022-10-28 11:25:08 +00:00
|
|
|
explicit CBCScriptedCmd(int i, bool b1, bool b2, float f)
|
|
|
|
: CBodyStateCmd(kBSC_Scripted)
|
|
|
|
, x8_anim(i)
|
|
|
|
, xc_24_loopAnim(b1)
|
|
|
|
, xc_25_timedLoop(b2)
|
|
|
|
, x10_loopDur(f) {}
|
|
|
|
|
|
|
|
int GetAnimId() const { return x8_anim; }
|
|
|
|
bool IsLooped() const { return xc_24_loopAnim; }
|
|
|
|
bool GetUseLoopDuration() const { return xc_25_timedLoop; }
|
|
|
|
float GetLoopDuration() const { return x10_loopDur; }
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 11:41:31 +00:00
|
|
|
class CBCStepCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
explicit CBCStepCmd()
|
|
|
|
: CBodyStateCmd(kBSC_Step), x8_dir(pas::kSD_Invalid), xc_type(pas::kStep_Normal) {}
|
|
|
|
|
|
|
|
explicit CBCStepCmd(pas::EStepDirection dir, pas::EStepType type)
|
|
|
|
: CBodyStateCmd(kBSC_Step), x8_dir(dir), xc_type(type) {}
|
|
|
|
|
|
|
|
pas::EStepDirection GetStepDirection() const { return x8_dir; }
|
|
|
|
pas::EStepType GetStepType() const { return xc_type; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EStepDirection x8_dir;
|
|
|
|
pas::EStepType xc_type;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 11:34:03 +00:00
|
|
|
class CBCTauntCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
explicit CBCTauntCmd() : CBodyStateCmd(kBSC_Taunt), x8_type(pas::kTT_Invalid) {}
|
|
|
|
explicit CBCTauntCmd(pas::ETauntType type) : CBodyStateCmd(kBSC_Taunt), x8_type(type) {}
|
|
|
|
pas::ETauntType GetTauntType() const { return x8_type; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ETauntType x8_type;
|
|
|
|
};
|
2022-10-28 09:17:39 +00:00
|
|
|
|
2022-10-28 11:34:03 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
class CBCGetupCmd : public CBodyStateCmd {
|
2022-10-28 09:17:39 +00:00
|
|
|
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-28 11:34:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EGetupType x8_type;
|
2022-10-28 09:17:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 12:33:10 +00:00
|
|
|
class CBCAdditiveReactionCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
explicit CBCAdditiveReactionCmd()
|
|
|
|
: CBodyStateCmd(kBSC_AdditiveReaction)
|
|
|
|
, x8_weight(1.f)
|
|
|
|
, xc_type(pas::kART_Invalid)
|
|
|
|
, x10_active(false) {}
|
|
|
|
|
|
|
|
explicit CBCAdditiveReactionCmd(pas::EAdditiveReactionType type, float weight, bool active)
|
|
|
|
: CBodyStateCmd(kBSC_AdditiveReaction), x8_weight(weight), xc_type(type), x10_active(active) {}
|
|
|
|
|
|
|
|
pas::EAdditiveReactionType GetType() const { return xc_type; }
|
|
|
|
float GetWeight() const { return x8_weight; }
|
|
|
|
bool GetIsActive() const { return x10_active; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
float x8_weight;
|
|
|
|
pas::EAdditiveReactionType xc_type;
|
|
|
|
bool x10_active;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
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
|