mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 11:36:26 -04:00
subtitle editor fixes + other smaller fixes (#1572)
* [extractor] validate files when extracted as folder * jp text fixes * move game text version to the text file and fix subtitle editor escape chars * make bad subtitles not crash the game * fix texscroll in lag * fix mood, fix decomp of other versions, fix text decomp * clang * fix tests * oops dammit * new fixes * shut up codacy * fix nonexistant subtitles crashing the game * fix text hacks and extractor re-use on folders
This commit is contained in:
@@ -85,7 +85,7 @@ Val* Compiler::compile_asm_text_file(const goos::Object& form, const goos::Objec
|
||||
va_check(form, args, {goos::ObjectType::SYMBOL}, {{"files", {true, goos::ObjectType::PAIR}}});
|
||||
|
||||
// list of files per text version.
|
||||
std::unordered_map<GameTextVersion, std::vector<std::string>> inputs;
|
||||
std::vector<std::string> inputs;
|
||||
|
||||
// what kind of text file?
|
||||
const auto kind = symbol_string(args.unnamed.at(0));
|
||||
@@ -101,15 +101,11 @@ Val* Compiler::compile_asm_text_file(const goos::Object& form, const goos::Objec
|
||||
|
||||
// compile files.
|
||||
if (kind == "subtitle") {
|
||||
for (auto& [ver, in] : inputs) {
|
||||
GameSubtitleDB db;
|
||||
compile_game_subtitle(in, ver, db);
|
||||
}
|
||||
GameSubtitleDB db;
|
||||
compile_game_subtitle(inputs, db);
|
||||
} else if (kind == "text") {
|
||||
for (auto& [ver, in] : inputs) {
|
||||
GameTextDB db;
|
||||
compile_game_text(in, ver, db);
|
||||
}
|
||||
GameTextDB db;
|
||||
compile_game_text(inputs, db);
|
||||
} else {
|
||||
throw_compiler_error(form, "The option {} was not recognized for asm-text-file.", kind);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user