2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 00:27:42 +00:00

ANCS fixes and cleanup

This commit is contained in:
Jack Andersen
2015-08-08 13:24:17 -10:00
parent e0bf3a7024
commit 2d18e95a91
11 changed files with 155 additions and 638 deletions

View File

@@ -147,41 +147,5 @@ void STRG::write(Athena::io::IStreamWriter& writer) const
}
}
bool STRG::readAngelScript(const AngelScript::asIScriptModule& in)
{
return false;
}
void STRG::writeAngelScript(std::ofstream& out) const
{
for (const std::pair<FourCC, std::vector<std::string>>& lang : langs)
{
out << "STRG::Language " << lang.first.toString() << "({";
bool comma = false;
unsigned idx = 0;
for (const std::string& str : lang.second)
{
if (comma)
out << ",";
out << "\n/* " << idx++ << " */ \"";
out << str << "\"";
comma = true;
}
out << "\n});\n";
}
out << "STRG::Names NAMES({";
bool comma = false;
for (const std::pair<std::string, int32_t>& name : names)
{
if (comma)
out << ",";
out << "\n ";
comma = true;
out << "{\"" << name.first << "\", " << name.second << "}";
}
out << "\n});\n";
}
}
}