Updated language gen tool to match vn scene gen style and rollup

This commit is contained in:
2023-02-18 09:57:13 -08:00
parent 3b3b97294c
commit 589a2c4c95
21 changed files with 556 additions and 194 deletions

View File

@ -26,6 +26,7 @@ int32_t GeneratedLanguages::start() {
// Now process each language file
std::map<std::string, std::map<std::string, std::string>> strings;
std::vector<std::string> knownKeys;
auto itFiles = files.begin();
while(itFiles != files.end()) {
@ -84,6 +85,7 @@ int32_t GeneratedLanguages::start() {
File langOut(flags["output"] + FILE_PATH_SEP + "language_" + itLang->first + ".language");
bufferOut.clear();
auto itKeys = knownKeys.begin();
while(itKeys != knownKeys.end()) {
auto key = *itKeys;
@ -97,6 +99,7 @@ int32_t GeneratedLanguages::start() {
}
// Write out.
langOut.mkdirp();
if(!langOut.writeString(bufferOut)) {
std::cout << "Failed to create output file \"" + langOut.filename + "\"" << std::endl;
return 1;