mirror of
https://github.com/open-goal/jak-project
synced 2026-07-09 06:53:45 -04:00
[game] pc port progress menu (#1281)
* fix typo * more typo * shorten discord rpc text * allow expanding enums after the fact (untested) * make `game_text` work similar to subtitles * update progress decomp * update some types + `do-not-decompile` in bitfield * fixes and fall back to original progress code * update `progress` decomp with new enums * update config files * fix enums and debug menu * always allocate (but not use) a lot of particles * small rework to display mode options * revert resolution/aspect-ratio symbol mess * begin the override stuff * make `progress-draw` more readable * more fixes * codacy good boy points * first step overriding code * finish progress overrides, game options menu fully functional! * minor fixes * Update game.gp * Update sparticle-launcher.gc * clang * change camera controls text * oops * some cleanup * derp * nice job * implement menu scrolling lol * make scrollable menus less cramped, fix arrows * make some carousell things i guess * add msaa carousell to test * oops * Update progress-pc.gc * make `pc-get-screen-size` (untested) * resolution menu * input fixes * return when selecting resolution * scroll fixes * Update progress-pc.gc * add "fit to screen" button * bug * complete resolutions menu * aspect ratio menu * subtitles language * subtitle speaker * final adjustments * ref test * fix tests * fix ref! * reduce redundancy a bit * fix mem leaks? * save settings on progress exit * fix init reorder * remove unused code * rename goal project-like files to the project extension * sha display toggle * aspect ratio settings fixes * dont store text db's in compiler * properly save+load native aspect stuff
This commit is contained in:
@@ -153,8 +153,12 @@ std::string write_game_text(
|
||||
|
||||
// write!
|
||||
std::string result; // = "\xEF\xBB\xBF"; // UTF-8 encode (don't need this anymore)
|
||||
result += fmt::format("(language-count {})\n", languages.size());
|
||||
result += "(group-name \"common\")\n";
|
||||
result += "(language-id";
|
||||
for (auto lang : languages) {
|
||||
result += fmt::format(" {}", lang);
|
||||
}
|
||||
result += ")\n";
|
||||
for (auto& x : text_by_id) {
|
||||
result += fmt::format("(#x{:04x}\n ", x.first);
|
||||
for (auto& y : x.second) {
|
||||
@@ -163,28 +167,6 @@ std::string write_game_text(
|
||||
result += ")\n\n";
|
||||
}
|
||||
|
||||
// add our own custom text additions from new_strings.jsonc
|
||||
// - first add the strings that are the same across all languages
|
||||
for (auto const& [key, val] : cfg.new_strings_same_across_langs) {
|
||||
result += fmt::format("(#x{}\n ", key);
|
||||
for (u32 i = 0; i < languages.size(); i++) {
|
||||
result += fmt::format("\"{}\"\n ", val);
|
||||
}
|
||||
result += ")\n\n";
|
||||
}
|
||||
// - now add the ones that are different, if they do not have all languages defined, pad with
|
||||
// placeholders
|
||||
for (auto const& [key, val] : cfg.new_strings_different_across_langs) {
|
||||
result += fmt::format("(#x{}\n ", key);
|
||||
for (auto const& str : val) {
|
||||
result += fmt::format("\"{}\"\n ", str);
|
||||
}
|
||||
for (u32 i = 0; i < languages.size() - val.size(); i++) {
|
||||
result += fmt::format("\"{}\"\n ", "TODO");
|
||||
}
|
||||
result += ")\n\n";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
} // namespace decompiler
|
||||
|
||||
Reference in New Issue
Block a user