mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 20:27:42 +00:00
Added binarySize method to DNA implementations
This commit is contained in:
@@ -199,6 +199,10 @@ struct MaterialSet : BigDNA
|
||||
writer.writeUBytes((atUint8*)§ion->m_type, 4);
|
||||
section->write(writer);
|
||||
}
|
||||
size_t binarySize(size_t __isz) const
|
||||
{
|
||||
return section->binarySize(__isz + 4);
|
||||
}
|
||||
};
|
||||
std::vector<SectionFactory> sections;
|
||||
void read(Athena::io::IStreamReader& reader)
|
||||
@@ -218,6 +222,13 @@ struct MaterialSet : BigDNA
|
||||
section.write(writer);
|
||||
writer.writeUBytes((atUint8*)"END ", 4);
|
||||
}
|
||||
size_t binarySize(size_t __isz) const
|
||||
{
|
||||
__isz = header.binarySize(__isz);
|
||||
for (const SectionFactory& section : sections)
|
||||
__isz = section.binarySize(__isz);
|
||||
return __isz + 4;
|
||||
}
|
||||
};
|
||||
Vector<Material, DNA_COUNT(materialCount)> materials;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user