2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 17:51:21 +00:00
metaforce/Runtime/Character/CAnimationDatabaseGame.cpp
Lioncash 1cb289f243 RuntimeCommon: Normalize cpp inclusions
Normalizes the headers for the cpp files in the RuntimeCommon target.
Now all headers and source files within the RuntimeCommon/RuntimeCommonB
targets are normalized and consistent with one another.
2020-01-15 09:15:47 -05:00

38 lines
1.3 KiB
C++

#include "Runtime/Character/CAnimationDatabaseGame.hpp"
#include "Runtime/Character/CAnimation.hpp"
#include "Runtime/Character/CPrimitive.hpp"
#include "Runtime/Character/IMetaAnim.hpp"
namespace urde {
CAnimationDatabaseGame::CAnimationDatabaseGame(const std::vector<CAnimation>& anims) {
x10_anims.reserve(anims.size());
for (const CAnimation& anim : anims)
x10_anims.emplace_back(anim.GetMetaAnim());
}
const std::shared_ptr<IMetaAnim>& CAnimationDatabaseGame::GetMetaAnim(s32 idx) const { return x10_anims[idx]; }
u32 CAnimationDatabaseGame::GetNumMetaAnims() const { return x10_anims.size(); }
const char* CAnimationDatabaseGame::GetMetaAnimName(s32 idx) const {
return "Meta-animation name unavailable in Release mode.";
}
void CAnimationDatabaseGame::GetAllUniquePrimitives(std::vector<CPrimitive>& primsOut) const {
std::set<CPrimitive> primitives;
for (const std::shared_ptr<IMetaAnim>& anim : x10_anims)
anim->GetUniquePrimitives(primitives);
primsOut.reserve(primitives.size());
for (const CPrimitive& prim : primitives)
primsOut.push_back(prim);
}
void CAnimationDatabaseGame::GetUniquePrimitivesFromMetaAnim(std::set<CPrimitive>& primsOut,
std::string_view name) const {
// Empty
}
} // namespace urde