mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 03:47:43 +00:00
New code style refactor
This commit is contained in:
@@ -1,55 +1,47 @@
|
||||
#include "CAnimationSet.hpp"
|
||||
#include "CMetaTransFactory.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
namespace urde {
|
||||
|
||||
CAnimationSet::CAnimationSet(CInputStream& in)
|
||||
: x0_tableCount(in.readUint16Big())
|
||||
{
|
||||
u32 animationCount = in.readUint32Big();
|
||||
x4_animations.reserve(animationCount);
|
||||
for (u32 i=0 ; i<animationCount ; ++i)
|
||||
x4_animations.emplace_back(in);
|
||||
CAnimationSet::CAnimationSet(CInputStream& in) : x0_tableCount(in.readUint16Big()) {
|
||||
u32 animationCount = in.readUint32Big();
|
||||
x4_animations.reserve(animationCount);
|
||||
for (u32 i = 0; i < animationCount; ++i)
|
||||
x4_animations.emplace_back(in);
|
||||
|
||||
u32 transitionCount = in.readUint32Big();
|
||||
x14_transitions.reserve(transitionCount);
|
||||
for (u32 i=0 ; i<transitionCount ; ++i)
|
||||
x14_transitions.emplace_back(in);
|
||||
u32 transitionCount = in.readUint32Big();
|
||||
x14_transitions.reserve(transitionCount);
|
||||
for (u32 i = 0; i < transitionCount; ++i)
|
||||
x14_transitions.emplace_back(in);
|
||||
|
||||
x24_defaultTransition = CMetaTransFactory::CreateMetaTrans(in);
|
||||
x24_defaultTransition = CMetaTransFactory::CreateMetaTrans(in);
|
||||
|
||||
if (x0_tableCount > 1)
|
||||
{
|
||||
u32 additiveAnimCount = in.readUint32Big();
|
||||
x28_additiveInfo.reserve(additiveAnimCount);
|
||||
for (u32 i=0 ; i<additiveAnimCount ; ++i)
|
||||
{
|
||||
u32 id = in.readUint32Big();
|
||||
x28_additiveInfo.emplace_back(id, in);
|
||||
}
|
||||
x38_defaultAdditiveInfo.read(in);
|
||||
if (x0_tableCount > 1) {
|
||||
u32 additiveAnimCount = in.readUint32Big();
|
||||
x28_additiveInfo.reserve(additiveAnimCount);
|
||||
for (u32 i = 0; i < additiveAnimCount; ++i) {
|
||||
u32 id = in.readUint32Big();
|
||||
x28_additiveInfo.emplace_back(id, in);
|
||||
}
|
||||
x38_defaultAdditiveInfo.read(in);
|
||||
}
|
||||
|
||||
if (x0_tableCount > 2)
|
||||
{
|
||||
u32 halfTransitionCount = in.readUint32Big();
|
||||
x40_halfTransitions.reserve(halfTransitionCount);
|
||||
for (u32 i=0 ; i<halfTransitionCount ; ++i)
|
||||
x40_halfTransitions.emplace_back(in);
|
||||
}
|
||||
if (x0_tableCount > 2) {
|
||||
u32 halfTransitionCount = in.readUint32Big();
|
||||
x40_halfTransitions.reserve(halfTransitionCount);
|
||||
for (u32 i = 0; i < halfTransitionCount; ++i)
|
||||
x40_halfTransitions.emplace_back(in);
|
||||
}
|
||||
|
||||
if (x0_tableCount > 3)
|
||||
{
|
||||
u32 animResourcesCount = in.readUint32Big();
|
||||
x50_animRes.reserve(animResourcesCount);
|
||||
for (u32 i=0 ; i<animResourcesCount ; ++i)
|
||||
{
|
||||
CAssetId anim = in.readUint32Big();
|
||||
CAssetId evnt = in.readUint32Big();
|
||||
x50_animRes.emplace_back(anim, evnt);
|
||||
}
|
||||
if (x0_tableCount > 3) {
|
||||
u32 animResourcesCount = in.readUint32Big();
|
||||
x50_animRes.reserve(animResourcesCount);
|
||||
for (u32 i = 0; i < animResourcesCount; ++i) {
|
||||
CAssetId anim = in.readUint32Big();
|
||||
CAssetId evnt = in.readUint32Big();
|
||||
x50_animRes.emplace_back(anim, evnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user