#include "STRG.hpp" #include "DNAMP3.hpp" namespace Retro { namespace DNAMP3 { void STRG::_read(Athena::io::IStreamReader& reader) { atUint32 langCount = reader.readUint32(); atUint32 strCount = reader.readUint32(); atUint32 nameCount = reader.readUint32(); atUint32 nameTableSz = reader.readUint32(); if (nameTableSz) { std::unique_ptr nameTableBuf(new uint8_t[nameTableSz]); reader.readUBytesToBuf(nameTableBuf.get(), nameTableSz); struct NameIdxEntry { atUint32 nameOff; atUint32 strIdx; }* nameIndex = (NameIdxEntry*)nameTableBuf.get(); for (atUint32 n=0 ; n readLangs; readLangs.reserve(langCount); for (atUint32 l=0 ; l strOffs(new atUint32[langCount * strCount]); for (atUint32 l=0 ; l strs; for (atUint32 s=0 ; s= lang.second.size()) { writer.writeUint32(1); writer.writeUByte(0); } else { const std::string& str = lang.second[s]; writer.writeUint32(str.size() + 1); writer.writeString(str); } } } } bool STRG::readAngelScript(const AngelScript::asIScriptModule& in) { } void STRG::writeAngelScript(std::ofstream& out) const { } } }