mirror of https://github.com/PrimeDecomp/prime.git
Match and link CPASAnimInfo
This commit is contained in:
parent
89e39a7677
commit
a51e53a6f9
|
@ -492,7 +492,7 @@ LIBS = [
|
|||
"Kyoto/Animation/CMetaTransPhaseTrans",
|
||||
"Kyoto/Animation/CMetaTransSnap",
|
||||
"Kyoto/Animation/CMetaTransTrans",
|
||||
"Kyoto/Animation/CPASAnimInfo",
|
||||
["Kyoto/Animation/CPASAnimInfo", True],
|
||||
["Kyoto/Animation/CPASAnimParm", True],
|
||||
"Kyoto/Animation/CPASAnimState",
|
||||
"Kyoto/Animation/CPASDatabase",
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef _CPASANIMINFO
|
||||
#define _CPASANIMINFO
|
||||
|
||||
#include "Kyoto/Animation/CPASAnimParm.hpp"
|
||||
|
||||
#include "rstl/reserved_vector.hpp"
|
||||
|
||||
class CPASAnimInfo {
|
||||
public:
|
||||
CPASAnimInfo(int id);
|
||||
CPASAnimInfo(int id, const rstl::reserved_vector<CPASAnimParm::UParmValue, 8>& parms);
|
||||
|
||||
int GetAnimId() const { return x0_id; }
|
||||
CPASAnimParm GetAnimParmData(uint idx, CPASAnimParm::EParmType type) const;
|
||||
const CPASAnimParm::UParmValue& GetAnimParmValue(uint idx) const;
|
||||
private:
|
||||
uint x0_id;
|
||||
rstl::reserved_vector< CPASAnimParm::UParmValue, 8 > x4_parms;
|
||||
};
|
||||
|
||||
#endif // _CPASANIMINFO
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "Kyoto/Animation/CPASAnimInfo.hpp"
|
||||
#include "Kyoto/Animation/CPASAnimParm.hpp"
|
||||
#include "Kyoto/Animation/CPASParmInfo.hpp"
|
||||
#include "Kyoto/Animation/CharacterCommon.hpp"
|
||||
|
@ -10,12 +11,6 @@
|
|||
#include "rstl/reserved_vector.hpp"
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
class CPASAnimInfo {
|
||||
private:
|
||||
uint x0_id;
|
||||
rstl::reserved_vector< CPASAnimParm::UParmValue, 8 > x4_parms;
|
||||
};
|
||||
|
||||
class CPASAnimState {
|
||||
public:
|
||||
CPASAnimParm GetAnimParmData(int, unsigned int) const;
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#include "Kyoto/Animation/CPASAnimInfo.hpp"
|
||||
|
||||
CPASAnimInfo::CPASAnimInfo(int id) : x0_id(id) {}
|
||||
|
||||
CPASAnimInfo::CPASAnimInfo(int id,
|
||||
const rstl::reserved_vector< CPASAnimParm::UParmValue, 8 >& parms)
|
||||
: x0_id(id), x4_parms(parms) {}
|
||||
|
||||
CPASAnimParm CPASAnimInfo::GetAnimParmData(uint idx, CPASAnimParm::EParmType type) const {
|
||||
const CPASAnimParm::UParmValue& parm = x4_parms[idx];
|
||||
|
||||
switch (type) {
|
||||
case CPASAnimParm::kPT_Int32:
|
||||
return CPASAnimParm::FromInt32(parm.m_int);
|
||||
case CPASAnimParm::kPT_UInt32:
|
||||
return CPASAnimParm::FromUint32(parm.m_uint);
|
||||
case CPASAnimParm::kPT_Float:
|
||||
return CPASAnimParm::FromReal32(parm.m_float);
|
||||
case CPASAnimParm::kPT_Bool:
|
||||
return CPASAnimParm::FromBool(parm.m_bool);
|
||||
case CPASAnimParm::kPT_Enum:
|
||||
return CPASAnimParm::FromEnum(parm.m_int);
|
||||
default:
|
||||
return CPASAnimParm::NoParameter();
|
||||
}
|
||||
}
|
||||
|
||||
const CPASAnimParm::UParmValue& CPASAnimInfo::GetAnimParmValue(uint idx) const {
|
||||
return x4_parms[idx];
|
||||
}
|
Loading…
Reference in New Issue