#include "DataSpec/DNACommon/PART.hpp" #include "DataSpec/DNACommon/PAK.hpp" namespace DataSpec::DNAParticle { template struct PPImpl<_GPSM>; template struct PPImpl<_GPSM>; AT_SUBSPECIALIZE_DNA_YAML(PPImpl<_GPSM>) AT_SUBSPECIALIZE_DNA_YAML(PPImpl<_GPSM>) template <> std::string_view GPSM::DNAType() { return "GPSM"sv; } template <> std::string_view GPSM::DNAType() { return "GPSM"sv; } template bool ExtractGPSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { athena::io::FileWriter writer(outPath.getAbsolutePath()); if (writer.isOpen()) { GPSM gpsm; gpsm.read(rs); athena::io::ToYAMLStream(gpsm, writer); return true; } return false; } template bool ExtractGPSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool ExtractGPSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool WriteGPSM(const GPSM& gpsm, const hecl::ProjectPath& outPath) { athena::io::FileWriter w(outPath.getAbsolutePath(), true, false); if (w.hasError()) return false; gpsm.write(w); int64_t rem = w.position() % 32; if (rem) for (int64_t i = 0; i < 32 - rem; ++i) w.writeUByte(0xff); return true; } template bool WriteGPSM(const GPSM& gpsm, const hecl::ProjectPath& outPath); template bool WriteGPSM(const GPSM& gpsm, const hecl::ProjectPath& outPath); } // namespace DataSpec::DNAParticle