#pragma once #include #include "DataSpec/DNACommon/DNACommon.hpp" #include "DataSpec/DNACommon/PAK.hpp" namespace DataSpec::DNADGRP { template struct AT_SPECIALIZE_PARMS(DataSpec::UniqueID32, DataSpec::UniqueID64) DGRP : BigDNA { AT_DECL_DNA_YAML Value dependCount; struct ObjectTag : BigDNA { AT_DECL_DNA_YAML DNAFourCC type; Value id; bool validate() const { if (!id.isValid()) return false; hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(id); return path && !path.isNone(); } }; Vector depends; void validateDeps() { std::vector newDeps; newDeps.reserve(depends.size()); for (const ObjectTag& tag : depends) if (tag.validate()) newDeps.push_back(tag); depends = std::move(newDeps); dependCount = atUint32(depends.size()); } }; template bool ExtractDGRP(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool WriteDGRP(const DGRP& dgrp, const hecl::ProjectPath& outPath); } // namespace DataSpec::DNADGRP