#include "DataSpec/DNACommon/ELSC.hpp" #include "DataSpec/DNACommon/PAK.hpp" namespace DataSpec::DNAParticle { template struct PPImpl<_ELSM>; template struct PPImpl<_ELSM>; AT_SUBSPECIALIZE_DNA_YAML(PPImpl<_ELSM>) AT_SUBSPECIALIZE_DNA_YAML(PPImpl<_ELSM>) template <> std::string_view ELSM::DNAType() { return "urde::ELSM"sv; } template <> std::string_view ELSM::DNAType() { return "urde::ELSM"sv; } template bool ExtractELSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { athena::io::FileWriter writer(outPath.getAbsolutePath()); if (writer.isOpen()) { ELSM elsm; elsm.read(rs); athena::io::ToYAMLStream(elsm, writer); return true; } return false; } template bool ExtractELSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool ExtractELSM(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool WriteELSM(const ELSM& elsm, const hecl::ProjectPath& outPath) { athena::io::FileWriter w(outPath.getAbsolutePath(), true, false); if (w.hasError()) return false; elsm.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 WriteELSM(const ELSM& gpsm, const hecl::ProjectPath& outPath); template bool WriteELSM(const ELSM& gpsm, const hecl::ProjectPath& outPath); } // namespace DataSpec::DNAParticle