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

Multi-intermediate MLVL path; simpler metadata yaml

This commit is contained in:
Jack Andersen
2016-09-30 16:57:09 -10:00
parent 5df7c188b0
commit 2dad2e2051
8 changed files with 49 additions and 7 deletions

View File

@@ -106,6 +106,28 @@ struct MLVL : BigYAML
Value<atUint32> layerNameOffsetCount;
Vector<atUint32, DNA_COUNT(layerNameOffsetCount)> layerNameOffsets;
void readMeta(athena::io::YAMLDocReader& __dna_docin)
{
/* worldNameId */
__dna_docin.enumerate("worldNameId", worldNameId);
/* worldSkyboxId */
__dna_docin.enumerate("worldSkyboxId", worldSkyboxId);
/* audioGroupCount squelched */
/* audioGroups */
audioGroupCount = __dna_docin.enumerate("audioGroups", audioGroups);
}
void writeMeta(athena::io::YAMLDocWriter& __dna_docout) const
{
/* worldNameId */
__dna_docout.enumerate("worldNameId", worldNameId);
/* worldSkyboxId */
__dna_docout.enumerate("worldSkyboxId", worldSkyboxId);
/* audioGroupCount squelched */
/* audioGroups */
__dna_docout.enumerate("audioGroups", audioGroups);
}
static bool Extract(const SpecBase& dataSpec,
PAKEntryReadStream& rs,
const hecl::ProjectPath& outPath,
@@ -118,7 +140,7 @@ struct MLVL : BigYAML
MLVL mlvl;
mlvl.read(rs);
athena::io::FileWriter writer(outPath.getWithExtension(_S(".yaml"), true).getAbsolutePath());
mlvl.toYAMLStream(writer);
mlvl.toYAMLStream(writer, static_cast<YAMLWriteMemFn>(&MLVL::writeMeta));
hecl::BlenderConnection& conn = btok.getBlenderConnection();
return DNAMLVL::ReadMLVLToBlender(conn, mlvl, outPath, pakRouter,
entry, force, fileChanged);