#ifndef __DNAMP3_MLVL_HPP__ #define __DNAMP3_MLVL_HPP__ #include "../DNACommon/PAK.hpp" #include "../DNACommon/MLVL.hpp" #include "DNAMP3.hpp" namespace Retro { namespace DNAMP3 { struct MLVL : BigYAML { DECL_YAML Value magic; Value version; UniqueID64 worldNameId; Value unk; UniqueID64 saveWorldId; UniqueID64 worldSkyboxId; Value areaCount; struct Area : BigYAML { DECL_YAML UniqueID64 areaNameId; Value transformMtx[3]; Value aabb[2]; UniqueID64 areaMREAId; UniqueID64 areaId; Value attachedAreaCount; Vector attachedAreas; 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; String<-1> internalAreaName; }; Vector areas; UniqueID64 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 layerIDCount; Vector layerIDs; Value layerNameOffsetCount; Vector layerNameOffsets; static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const HECL::ProjectPath& outPath, PAKRouter& pakRouter, const PAK::Entry& entry, bool force, std::function fileChanged) { MLVL mlvl; mlvl.read(rs); FILE* fp = HECL::Fopen(outPath.getAbsolutePath().c_str(), _S("wb")); mlvl.toYAMLFile(fp); fclose(fp); HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection(); return DNAMLVL::ReadMLVLToBlender(conn, mlvl, outPath, pakRouter, entry, force, fileChanged); } }; } } #endif // __DNAMP3_MLVL_HPP__