#include "CMetaAnimSequence.hpp" #include "CMetaAnimFactory.hpp" #include "CAnimTreeSequence.hpp" namespace urde { std::vector> CMetaAnimSequence::CreateSequence(CInputStream& in) { std::vector> ret; u32 seqCount = in.readUint32Big(); ret.reserve(seqCount); for (u32 i = 0; i < seqCount; ++i) ret.push_back(CMetaAnimFactory::CreateMetaAnim(in)); return ret; } CMetaAnimSequence::CMetaAnimSequence(CInputStream& in) : x4_sequence(CreateSequence(in)) {} void CMetaAnimSequence::GetUniquePrimitives(std::set& primsOut) const { for (const std::shared_ptr& anim : x4_sequence) anim->GetUniquePrimitives(primsOut); } std::shared_ptr CMetaAnimSequence::VGetAnimationTree(const CAnimSysContext& animSys, const CMetaAnimTreeBuildOrders& orders) const { if (orders.x0_recursiveAdvance) return GetAnimationTree(animSys, CMetaAnimTreeBuildOrders::PreAdvanceForAll(*orders.x0_recursiveAdvance)); #if 0 /* Originally used to generate name string */ std::vector anims; anims.reserve(anims.size()); for (const std::shared_ptr& anim : x4_sequence) { std::shared_ptr chNode = anim->GetAnimationTree(animSys, orders); anims.emplace_back(chNode->GetName()); } #endif return std::make_shared(x4_sequence, animSys, ""); } } // namespace urde