#ifndef __DNAMP3_MREA_HPP__ #define __DNAMP3_MREA_HPP__ #include "../DNACommon/DNACommon.hpp" #include "CMDLMaterials.hpp" #include "CSKR.hpp" #include "../DNAMP2/MREA.hpp" namespace DataSpec::DNAMP3 { struct MREA { struct StreamReader : DNAMP2::MREA::StreamReader { std::vector> m_secIdxs; StreamReader(athena::io::IStreamReader& source, atUint32 blkCount, atUint32 secIdxCount); std::vector>::const_iterator beginSecIdxs() { return m_secIdxs.begin(); } void writeSecIdxs(athena::io::IStreamWriter& writer) const; }; struct Header : BigDNA { AT_DECL_DNA Value magic; Value version; Value localToWorldMtx[3]; Value meshCount; Value sclyLayerCount; Value secCount; Value compressedBlockCount; Value secIndexCount; Seek<20, athena::Current> align1; Vector secSizes; atUint32 getSecOffset(atUint32 idx) const { if (idx >= secSizes.size()) return -1; atUint32 retval = 0; for (atUint32 i=0 ; i flags; } visorFlags; Value xfMtx[3]; Value aabb[2]; }; struct DEPS : BigDNA { AT_DECL_DNA Value depCount; struct Dependency : BigDNA { AT_DECL_DNA UniqueID64 id; DNAFourCC type; }; Vector deps; Value depLayerCount; Vector depLayers; }; struct BabeDeadLight : BigDNA { AT_DECL_DNA enum class LightType : atUint32 { LocalAmbient, Directional, Custom, Spot, Spot2, LocalAmbient2 }; enum class Falloff : atUint32 { Constant, Linear, Quadratic }; Value lightType; Value color; Value alpha = 1.f; Value position; Value direction; Value codirection; Value q; Value spotCutoff; Value unk7; Value castShadows; Value unk9; Value falloff; Value unk11; Value unk12; Value unk13; }; static void ReadBabeDeadToBlender_3(hecl::blender::PyOutStream& os, athena::io::IStreamReader& rs); static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath, PAKRouter& pakRouter, const PAK::Entry& entry, bool, hecl::blender::Token& btok, std::function); static bool ExtractLayerDeps(PAKEntryReadStream& rs, PAKBridge::Level::Area& areaOut); }; } #endif // __DNAMP3_MREA_HPP__