mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 02:27:43 +00:00
AuxiliaryID32 implemented for sub-resources
This commit is contained in:
@@ -381,10 +381,23 @@ void ANCS::AnimationSet::read(athena::io::IStreamReader& reader)
|
||||
atUint16 sectionCount = reader.readUint16Big();
|
||||
|
||||
atUint32 animationCount = reader.readUint32Big();
|
||||
reader.enumerate(animations, animationCount);
|
||||
animations.clear();
|
||||
animations.reserve(animationCount);
|
||||
for (atUint32 i=0 ; i<animationCount ; ++i)
|
||||
{
|
||||
animations.emplace_back(m_ancsId);
|
||||
animations.back().read(reader);
|
||||
}
|
||||
|
||||
atUint32 transitionCount = reader.readUint32Big();
|
||||
reader.enumerate(transitions, transitionCount);
|
||||
transitions.clear();
|
||||
transitions.reserve(transitionCount);
|
||||
for (atUint32 i=0 ; i<transitionCount ; ++i)
|
||||
{
|
||||
transitions.emplace_back(m_ancsId);
|
||||
transitions.back().read(reader);
|
||||
}
|
||||
|
||||
defaultTransition.read(reader);
|
||||
|
||||
additiveAnims.clear();
|
||||
@@ -399,8 +412,14 @@ void ANCS::AnimationSet::read(athena::io::IStreamReader& reader)
|
||||
halfTransitions.clear();
|
||||
if (sectionCount > 2)
|
||||
{
|
||||
atUint32 halfTransitionCount = reader.readUint32Big();
|
||||
reader.enumerate(halfTransitions, halfTransitionCount);
|
||||
atUint32 halfTransitionCount = reader.readUint32Big();
|
||||
halfTransitions.clear();
|
||||
halfTransitions.reserve(halfTransitionCount);
|
||||
for (atUint32 i=0 ; i<halfTransitionCount ; ++i)
|
||||
{
|
||||
halfTransitions.emplace_back(m_ancsId);
|
||||
halfTransitions.back().read(reader);
|
||||
}
|
||||
}
|
||||
|
||||
evnts.clear();
|
||||
@@ -498,9 +517,32 @@ void ANCS::AnimationSet::read(athena::io::YAMLDocReader& reader)
|
||||
{
|
||||
atUint16 sectionCount = reader.readUint16("sectionCount");
|
||||
|
||||
reader.enumerate("animations", animations);
|
||||
size_t animationCount;
|
||||
reader.enterSubVector("animations", animationCount);
|
||||
animations.clear();
|
||||
animations.reserve(animationCount);
|
||||
for (size_t i=0 ; i<animationCount ; ++i)
|
||||
{
|
||||
animations.emplace_back(m_ancsId);
|
||||
reader.enterSubRecord(nullptr);
|
||||
animations.back().read(reader);
|
||||
reader.leaveSubRecord();
|
||||
}
|
||||
reader.leaveSubVector();
|
||||
|
||||
size_t transitionCount;
|
||||
reader.enterSubVector("transitions", transitionCount);
|
||||
transitions.clear();
|
||||
transitions.reserve(transitionCount);
|
||||
for (size_t i=0 ; i<transitionCount ; ++i)
|
||||
{
|
||||
transitions.emplace_back(m_ancsId);
|
||||
reader.enterSubRecord(nullptr);
|
||||
transitions.back().read(reader);
|
||||
reader.leaveSubRecord();
|
||||
}
|
||||
reader.leaveSubVector();
|
||||
|
||||
reader.enumerate("transitions", transitions);
|
||||
reader.enumerate("defaultTransition", defaultTransition);
|
||||
|
||||
additiveAnims.clear();
|
||||
@@ -514,7 +556,17 @@ void ANCS::AnimationSet::read(athena::io::YAMLDocReader& reader)
|
||||
halfTransitions.clear();
|
||||
if (sectionCount > 2)
|
||||
{
|
||||
reader.enumerate("halfTransitions", halfTransitions);
|
||||
size_t halfTransitionCount;
|
||||
reader.enterSubVector("halfTransitions", halfTransitionCount);
|
||||
halfTransitions.reserve(halfTransitionCount);
|
||||
for (size_t i=0 ; i<halfTransitionCount ; ++i)
|
||||
{
|
||||
halfTransitions.emplace_back(m_ancsId);
|
||||
reader.enterSubRecord(nullptr);
|
||||
halfTransitions.back().read(reader);
|
||||
reader.leaveSubRecord();
|
||||
}
|
||||
reader.leaveSubVector();
|
||||
}
|
||||
|
||||
evnts.clear();
|
||||
|
||||
Reference in New Issue
Block a user