2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CPASANIMSTATE
|
|
|
|
#define _CPASANIMSTATE
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-10-24 23:29:11 +00:00
|
|
|
#include "Kyoto/Animation/CharacterCommon.hpp"
|
|
|
|
|
2022-10-06 21:07:41 +00:00
|
|
|
#include "rstl/reserved_vector.hpp"
|
2022-10-09 05:13:17 +00:00
|
|
|
#include "rstl/vector.hpp"
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
class CPASAnimParm {
|
|
|
|
public:
|
|
|
|
enum EParmType {
|
|
|
|
kPT_None = -1,
|
|
|
|
kPT_Int32 = 0,
|
|
|
|
kPT_UInt32 = 1,
|
|
|
|
kPT_Float = 2,
|
|
|
|
kPT_Bool = 3,
|
|
|
|
kPT_Enum = 4,
|
|
|
|
};
|
|
|
|
union UParmValue {
|
2022-09-05 04:01:13 +00:00
|
|
|
int m_int;
|
|
|
|
uint m_uint;
|
2022-10-09 05:37:23 +00:00
|
|
|
float m_float;
|
2022-08-14 18:38:41 +00:00
|
|
|
bool m_bool;
|
|
|
|
};
|
2022-10-09 05:13:17 +00:00
|
|
|
CPASAnimParm(const CPASAnimParm& other) : x0_value(other.x0_value), x4_type(other.x4_type) {}
|
2022-08-14 18:38:41 +00:00
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static CPASAnimParm FromEnum(int val);
|
2022-10-06 23:10:07 +00:00
|
|
|
static CPASAnimParm FromBool(bool val);
|
|
|
|
static CPASAnimParm FromReal32(float val);
|
2022-10-09 05:37:23 +00:00
|
|
|
static CPASAnimParm FromUint32(uint val);
|
|
|
|
static CPASAnimParm FromInt32(int val);
|
2022-10-06 23:10:07 +00:00
|
|
|
static CPASAnimParm NoParameter();
|
|
|
|
|
2022-10-08 22:03:50 +00:00
|
|
|
int GetInt32Value() const;
|
2022-10-24 23:29:11 +00:00
|
|
|
float GetReal32Value() const;
|
2022-10-08 22:03:50 +00:00
|
|
|
|
2022-08-14 18:38:41 +00:00
|
|
|
private:
|
|
|
|
UParmValue x0_value;
|
|
|
|
EParmType x4_type;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CPASParmInfo {
|
|
|
|
public:
|
|
|
|
enum EWeightFunction {
|
|
|
|
kWF_ExactMatch,
|
|
|
|
kWF_PercentError,
|
|
|
|
kWF_AngularPercent,
|
|
|
|
kWF_NoWeight,
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CPASAnimParm::EParmType x0_type;
|
|
|
|
EWeightFunction x4_weightFunction;
|
|
|
|
float x8_weight;
|
|
|
|
CPASAnimParm::UParmValue xc_min;
|
|
|
|
CPASAnimParm::UParmValue x10_max;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CPASAnimInfo {
|
|
|
|
private:
|
2022-09-05 04:01:13 +00:00
|
|
|
uint x0_id;
|
2022-08-14 18:38:41 +00:00
|
|
|
rstl::reserved_vector< CPASAnimParm::UParmValue, 8 > x4_parms;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CPASAnimState {
|
2022-10-08 22:03:50 +00:00
|
|
|
public:
|
|
|
|
CPASAnimParm GetAnimParmData(int, unsigned int) const;
|
2022-10-09 05:13:17 +00:00
|
|
|
|
2022-08-14 18:38:41 +00:00
|
|
|
private:
|
|
|
|
pas::EAnimationState x0_id;
|
|
|
|
rstl::vector< CPASParmInfo > x4_parms;
|
|
|
|
rstl::vector< CPASAnimInfo > x14_anims;
|
2022-09-05 04:01:13 +00:00
|
|
|
rstl::vector< int > x24_selectionCache;
|
2022-08-14 18:38:41 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CPASAnimState, 0x34)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CPASANIMSTATE
|