metaforce/Runtime/Character/CMetaAnimPlay.cpp

45 lines
1.4 KiB
C++
Raw Normal View History

2016-04-10 21:22:59 +00:00
#include "CMetaAnimPlay.hpp"
2016-08-27 04:54:53 +00:00
#include "CAnimSysContext.hpp"
#include "CSimplePool.hpp"
#include "CAllFormatsAnimSource.hpp"
#include "CAnimTreeAnimReaderContainer.hpp"
2016-04-10 21:22:59 +00:00
namespace urde
{
CMetaAnimPlay::CMetaAnimPlay(CInputStream& in)
2016-08-27 04:54:53 +00:00
: x4_primitive(in), x1c_startTime(in) {}
2016-04-10 21:22:59 +00:00
std::shared_ptr<CAnimTreeNode>
CMetaAnimPlay::GetAnimationTree(const CAnimSysContext& animSys,
const CMetaAnimTreeBuildOrders& orders) const
{
2016-05-21 03:02:09 +00:00
return {};
2016-04-10 21:22:59 +00:00
}
void CMetaAnimPlay::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
{
}
std::shared_ptr<CAnimTreeNode>
CMetaAnimPlay::VGetAnimationTree(const CAnimSysContext& animSys,
const CMetaAnimTreeBuildOrders& orders) const
{
2016-08-27 04:54:53 +00:00
if (orders.x0_)
{
CMetaAnimTreeBuildOrders modOrders;
modOrders.PreAdvanceForAll(*orders.x0_);
return GetAnimationTree(animSys, modOrders);
}
TLockedToken<CAllFormatsAnimSource> prim =
animSys.xc_store.GetObj(SObjectTag{FOURCC('ANIM'), x4_primitive.GetAnimResId()});
std::shared_ptr<CAnimTreeNode> ret =
std::make_shared<CAnimTreeAnimReaderContainer>(x4_primitive.GetName(),
CAllFormatsAnimSource::GetNewReader(prim, x1c_startTime),
x4_primitive.GetAnimDbIdx());
return ret;
2016-04-10 21:22:59 +00:00
}
}