#include "ATBL.hpp" namespace DataSpec { namespace DNAAudio { bool ATBL::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { size_t idxCount = rs.length() / 2; athena::io::YAMLDocWriter w("ATBL"); for (size_t i=0 ; im_mapChildren) { unsigned long i = strtoul(pair.first.c_str(), nullptr, 0); maxI = std::max(maxI, i); } std::vector vecOut; vecOut.resize(maxI + 1, 0xffff); for (const auto& pair : dr.getRootNode()->m_mapChildren) { unsigned long i = strtoul(pair.first.c_str(), nullptr, 0); vecOut[i] = hecl::SBig(uint16_t(strtoul(pair.second->m_scalarString.c_str(), nullptr, 0))); } athena::io::FileWriter w(outPath.getAbsolutePath()); if (w.hasError()) return false; w.writeBytes(vecOut.data(), vecOut.size() * 2); return true; } } }