#ifndef __DNAMP2_MLVL_HPP__ #define __DNAMP2_MLVL_HPP__ #include "../DNACommon/PAK.hpp" #include "../DNACommon/MLVL.hpp" #include "DNAMP2.hpp" namespace DataSpec::DNAMP2 { struct MLVL : BigDNA { AT_DECL_DNA_YAML Value magic; Value version; UniqueID32 worldNameId; UniqueID32 darkWorldNameId; Value unk; UniqueID32 saveWorldId; UniqueID32 worldSkyboxId; Value areaCount; struct Area : BigDNA { AT_DECL_DNA_YAML UniqueID32 areaNameId; Value transformMtx[3]; Value aabb[2]; UniqueID32 areaMREAId; Value areaId; Value attachedAreaCount; Vector attachedAreas; Value padding; Value depCount; struct Dependency : BigDNA { AT_DECL_DNA_YAML UniqueID32 id; DNAFourCC type; }; Vector deps; Value depLayerCount; Vector depLayers; Value dockCount; struct Dock : BigDNA { AT_DECL_DNA_YAML Value endpointCount; struct Endpoint : BigDNA { AT_DECL_DNA_YAML Value areaIdx; Value dockIdx; }; Vector endpoints; Value planeVertCount; Vector planeVerts; }; Vector docks; Value relCount; Vector, AT_DNA_COUNT(relCount)> relFilenames; Value relOffsetCount; Vector relOffsets; String<-1> internalAreaName; }; Vector areas; UniqueID32 worldMap; Value unknown2; Value unknown3; Value layerFlagCount; struct LayerFlags : BigDNA { AT_DECL_DNA_YAML Value layerCount; Value flags; }; Vector layerFlags; Value layerNameCount; Vector, AT_DNA_COUNT(layerNameCount)> layerNames; Value layerNameOffsetCount; Vector layerNameOffsets; static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath, PAKRouter& pakRouter, const DNAMP1::PAK::Entry& entry, bool force, hecl::blender::Token& btok, std::function fileChanged) { MLVL mlvl; mlvl.read(rs); athena::io::FileWriter writer(outPath.getWithExtension(_S(".yaml"), true).getAbsolutePath()); athena::io::ToYAMLStream(mlvl, writer); hecl::blender::Connection& conn = btok.getBlenderConnection(); return DNAMLVL::ReadMLVLToBlender(conn, mlvl, outPath, pakRouter, entry, force, fileChanged); } }; } #endif // __DNAMP2_MLVL_HPP__