metaforce/Runtime/Character/CAnimPOIData.cpp

37 lines
1.1 KiB
C++
Raw Normal View History

#include "Runtime/Character/CAnimPOIData.hpp"
#include "Runtime/CToken.hpp"
2016-04-11 23:35:37 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2016-04-11 23:35:37 +00:00
CAnimPOIData::CAnimPOIData(CInputStream& in) : x0_version(in.ReadLong()) {
u32 boolCount = in.ReadLong();
2018-12-08 05:30:43 +00:00
x4_boolNodes.reserve(boolCount);
for (u32 i = 0; i < boolCount; ++i)
x4_boolNodes.emplace_back(in);
2016-04-12 06:15:32 +00:00
u32 int32Count = in.ReadLong();
2018-12-08 05:30:43 +00:00
x14_int32Nodes.reserve(int32Count);
for (u32 i = 0; i < int32Count; ++i)
x14_int32Nodes.emplace_back(in);
2016-04-12 06:15:32 +00:00
u32 particleCount = in.ReadLong();
2018-12-08 05:30:43 +00:00
x24_particleNodes.reserve(particleCount);
for (u32 i = 0; i < particleCount; ++i)
x24_particleNodes.emplace_back(in);
2016-04-12 06:15:32 +00:00
2018-12-08 05:30:43 +00:00
if (x0_version >= 2) {
u32 soundCount = in.ReadLong();
2018-12-08 05:30:43 +00:00
x34_soundNodes.reserve(soundCount);
for (u32 i = 0; i < soundCount; ++i)
x34_soundNodes.emplace_back(in);
}
2016-04-11 23:35:37 +00:00
}
2018-12-08 05:30:43 +00:00
CFactoryFnReturn AnimPOIDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& parms,
CObjectReference* selfRef) {
return TToken<CAnimPOIData>::GetIObjObjectFor(std::make_unique<CAnimPOIData>(in));
2016-04-11 23:35:37 +00:00
}
2021-04-10 08:42:06 +00:00
} // namespace metaforce