#include "CPASAnimState.hpp" #include "CPASAnimParmData.hpp" namespace urde { CPASAnimState::CPASAnimState(CInputStream& in) { x0_id = in.readUint32Big(); u32 parmCount = in.readUint32Big(); u32 animCount = in.readUint32Big(); x4_parms.reserve(parmCount); x14_anims.reserve(animCount); x24_.reserve(animCount); for (u32 i=0 ; i parms; for (const CPASParmInfo& parm : x4_parms) { CPASAnimParm::UParmValue val = {}; switch (parm.GetType()) { case CPASAnimParm::EParmType::Int32: val.m_int = in.readInt32Big(); break; case CPASAnimParm::EParmType::UInt32: val.m_uint = in.readUint32Big(); break; case CPASAnimParm::EParmType::Float: val.m_float = in.readFloatBig(); break; case CPASAnimParm::EParmType::Bool: val.m_bool = in.readBool(); break; case CPASAnimParm::EParmType::Enum: val.m_int = in.readInt32Big(); break; default: break; } parms.push_back(val); } auto search = std::lower_bound(x14_anims.begin(), x14_anims.end(), id, [](const CPASAnimInfo& item, const u32& testId) -> bool {return item.GetAnimId() < testId;}); x14_anims.emplace(search, id, std::move(parms)); } } const CPASAnimParmData& CPASAnimState::GetAnimParmData(s32, u32) const { static const CPASAnimParmData badData; return badData; } std::pair CPASAnimState::FindBestAnimation(const rstl::reserved_vector&, CRandom16&, s32) const { return {}; } }