A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
AnmMgr.cc
1#include "AnmMgr.hh"
2
3namespace Kinoko::Render {
4
6void AnmMgr::linkAnims(size_t idx, const Abstract::g3d::ResFile *resFile, const char *name,
7 AnmType anmType) {
8 // For now, we only care about Chr
9 switch (anmType) {
10 case AnmType::Chr:
11 m_anmList.emplace_back(resFile->resAnmChr(name), anmType, idx);
12 break;
13 default:
14 break;
15 }
16}
17
19void AnmMgr::playAnim(f32 /*frame*/, f32 /*rate*/, size_t idx) {
20 ASSERT(idx < m_anmList.size());
21 AnmNodeChr *&activeChrAnim = m_activeAnims[static_cast<size_t>(AnmType::Chr)];
22 activeChrAnim = &(*std::next(m_anmList.begin(), idx));
23}
24
25} // namespace Kinoko::Render
Pertains to rendering the kart model.