2020-01-15 12:07:48 +00:00
|
|
|
#include "Runtime/Character/CAnimationSet.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/Character/CMetaTransFactory.hpp"
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
|
2022-02-18 07:37:54 +00:00
|
|
|
CAnimationSet::CAnimationSet(CInputStream& in) : x0_tableCount(in.ReadShort()) {
|
|
|
|
u32 animationCount = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
x4_animations.reserve(animationCount);
|
|
|
|
for (u32 i = 0; i < animationCount; ++i)
|
|
|
|
x4_animations.emplace_back(in);
|
|
|
|
|
2022-02-18 07:37:54 +00:00
|
|
|
u32 transitionCount = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
x14_transitions.reserve(transitionCount);
|
|
|
|
for (u32 i = 0; i < transitionCount; ++i)
|
|
|
|
x14_transitions.emplace_back(in);
|
|
|
|
|
|
|
|
x24_defaultTransition = CMetaTransFactory::CreateMetaTrans(in);
|
|
|
|
|
|
|
|
if (x0_tableCount > 1) {
|
2022-02-18 07:37:54 +00:00
|
|
|
u32 additiveAnimCount = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
x28_additiveInfo.reserve(additiveAnimCount);
|
|
|
|
for (u32 i = 0; i < additiveAnimCount; ++i) {
|
2022-02-18 07:37:54 +00:00
|
|
|
u32 id = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
x28_additiveInfo.emplace_back(id, in);
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
2018-12-08 05:30:43 +00:00
|
|
|
x38_defaultAdditiveInfo.read(in);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (x0_tableCount > 2) {
|
2022-02-18 07:37:54 +00:00
|
|
|
u32 halfTransitionCount = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
x40_halfTransitions.reserve(halfTransitionCount);
|
|
|
|
for (u32 i = 0; i < halfTransitionCount; ++i)
|
|
|
|
x40_halfTransitions.emplace_back(in);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (x0_tableCount > 3) {
|
2022-02-18 07:37:54 +00:00
|
|
|
u32 animResourcesCount = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
x50_animRes.reserve(animResourcesCount);
|
|
|
|
for (u32 i = 0; i < animResourcesCount; ++i) {
|
2022-02-19 13:04:45 +00:00
|
|
|
CAssetId anim = in.Get<CAssetId>();
|
|
|
|
CAssetId evnt = in.Get<CAssetId>();
|
2018-12-08 05:30:43 +00:00
|
|
|
x50_animRes.emplace_back(anim, evnt);
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
2018-12-08 05:30:43 +00:00
|
|
|
}
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|