#ifndef __DNAMP2_MLVL_HPP__ #define __DNAMP2_MLVL_HPP__ #include "../DNACommon/PAK.hpp" namespace Retro { namespace DNAMP2 { struct MLVL : BigYAML { DECL_YAML Value magic; Value version; UniqueID32 worldNameId; UniqueID32 darkWorldNameId; Value unk; UniqueID32 saveWorldId; UniqueID32 worldSkyboxId; Value areaCount; struct Area : BigYAML { DECL_YAML UniqueID32 areaNameId; Value transformMtx[3]; Value aabb[2]; UniqueID32 areaMREAId; UniqueID32 areaId; Value attachedAreaCount; Vector attachedAreas; Value padding; Value depCount; struct Dependency : BigYAML { DECL_YAML UniqueID32 id; DNAFourCC type; }; Vector deps; Value depLayerCount; Vector depLayers; Value dockCount; struct Dock : BigYAML { DECL_YAML Value endpointCount; struct Endpoint : BigYAML { DECL_YAML Value areaIdx; Value dockIdx; }; Vector endpoints; Value planeVertCount; Vector planeVerts; }; Vector docks; Value relCount; Vector, DNA_COUNT(relCount)> relFilenames; Value relOffsetCount; Vector relOffsets; String<-1> internalAreaName; }; Vector areas; UniqueID32 worldMap; Value unknown2; Value unknown3; Value layerFlagCount; struct LayerFlags : BigYAML { DECL_YAML Value layerCount; Value flags; }; Vector layerFlags; Value layerNameCount; Vector, DNA_COUNT(layerNameCount)> layerNames; Value layerNameOffsetCount; Vector layerNameOffsets; static bool Extract(PAKEntryReadStream& rs, const HECL::ProjectPath& outPath) { MLVL mlvl; mlvl.read(rs); FILE* fp = HECL::Fopen(outPath.getAbsolutePath().c_str(), _S("wb")); mlvl.toYAMLFile(fp); fclose(fp); return true; } }; } } #endif // __DNAMP2_MLVL_HPP__