#pragma once #include "DataSpec/DNACommon/DNACommon.hpp" #include "DataSpec/DNACommon/PAK.hpp" #include "DataSpec/DNAMP1/DNAMP1.hpp" #include "DataSpec/DNAMP2/DNAMP2.hpp" #include "DataSpec/DNAMP3/DNAMP3.hpp" namespace DataSpec::DNAPATH { template struct RegionPointers {}; template <> struct RegionPointers : BigDNA { AT_DECL_DNA Value regionIdxPtr; }; template <> struct RegionPointers : BigDNA { AT_DECL_DNA Value unk0; Value unk1; Value unk2; Value regionIdxPtr; }; template <> struct RegionPointers : BigDNA { AT_DECL_DNA Value unk0; Value unk1; Value unk2; Value regionIdxPtr; }; template struct AT_SPECIALIZE_PARMS(DataSpec::DNAMP1::PAKBridge, DataSpec::DNAMP2::PAKBridge, DataSpec::DNAMP3::PAKBridge) PATH : BigDNA { using PathMesh = hecl::blender::PathMesh; AT_DECL_DNA Value version; struct Node : BigDNA { AT_DECL_DNA Value position; Value normal; }; Value nodeCount; Vector nodes; struct Link : BigDNA { AT_DECL_DNA Value nodeIdx; Value regionIdx; Value width2d; Value oneOverWidth2d; }; Value linkCount; Vector links; struct Region : BigDNA { AT_DECL_DNA Value nodeCount; Value nodeStart; Value linkCount; Value linkStart; Value meshIndexMask; Value meshTypeMask; Value height; Value normal; Value regionIdx; Value centroid; Value aabb[2]; Value> pointers; }; Value regionCount; Vector regions; Vector bitmap1; Vector bitmap2; /* Unused in all games, removed in MP3 */ Vector ? 0 : (((((regionCount * regionCount) + 31) / 32) - bitmap1.size()) * 2))> bitmap3; Value octreeRegionLookupCount; Vector octreeRegionLookup; struct OctreeNode : BigDNA { AT_DECL_DNA Value isLeaf; Value aabb[2]; Value centroid; Value children[8]; Value regionCount; Value regionStart; }; Value octreeNodeCount; Vector octree; void sendToBlender(hecl::blender::Connection& conn, std::string_view entryName, const zeus::CMatrix4f* xf, const std::string& areaPath); static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath, PAKRouter& pakRouter, const typename PAKBridge::PAKType::Entry& entry, bool force, hecl::blender::Token& btok, std::function fileChanged); static bool Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPath, const PathMesh& mesh, hecl::blender::Token& btok); }; } // namespace DataSpec::DNAPATH