2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

Added binarySize method to DNA implementations

This commit is contained in:
Jack Andersen
2015-10-17 18:08:45 -10:00
parent 6bd5c42a9e
commit 9529fad78f
21 changed files with 668 additions and 15 deletions

View File

@@ -35,6 +35,19 @@ void CHAR::AnimationInfo::EVNT::SFXEvent::write(Athena::io::IStreamWriter& write
writer.seek(35, Athena::Current);
}
size_t CHAR::AnimationInfo::EVNT::SFXEvent::binarySize(size_t __isz) const
{
__isz = EventBase::binarySize(__isz);
__isz = caudId.binarySize(__isz);
__isz += 16;
__isz += unk3Vals.size() * 4;
if (extraType == 1)
__isz += 4;
else if (extraType == 2)
__isz += 35;
return __isz;
}
void CHAR::AnimationInfo::EVNT::SFXEvent::fromYAML(Athena::io::YAMLDocReader& reader)
{
EventBase::fromYAML(reader);
@@ -105,6 +118,13 @@ void CHAR::AnimationInfo::MetaAnimFactory::write(Athena::io::IStreamWriter& writ
m_anim->write(writer);
}
size_t CHAR::AnimationInfo::MetaAnimFactory::binarySize(size_t __isz) const
{
if (!m_anim)
return __isz;
return m_anim->binarySize(__isz + 4);
}
void CHAR::AnimationInfo::MetaAnimFactory::fromYAML(Athena::io::YAMLDocReader& reader)
{
std::string type = reader.readString("type");