mirror of
https://github.com/open-goal/jak-project
synced 2026-08-04 17:19:49 -04:00
subtitles: Add more cutscenes to subtitle editor (#1588)
* fix repl-history saving * subtitles: fix `\"` edge-case * subtitles: add almost every remaining (current) cutscene * merge: master * subtitles: fix some crashes and disable `Remove Line` as it is broken
This commit is contained in:
@@ -57,13 +57,9 @@ void ReplWrapper::add_to_history(const std::string& line) {
|
||||
}
|
||||
|
||||
void ReplWrapper::save_history() {
|
||||
std::filesystem::path path = file_util::get_user_config_dir();
|
||||
file_util::create_dir_if_needed(path);
|
||||
if (exists(path)) {
|
||||
repl.history_save((path / ".opengoal.repl.history").string());
|
||||
} else {
|
||||
fmt::print("Couldn't save REPL history file to '{}'", path.string());
|
||||
}
|
||||
std::filesystem::path path = file_util::get_user_config_dir() / ".opengoal.repl.history";
|
||||
file_util::create_dir_if_needed_for_file(path.string());
|
||||
repl.history_save(path.string());
|
||||
}
|
||||
|
||||
void ReplWrapper::load_history() {
|
||||
@@ -71,7 +67,7 @@ void ReplWrapper::load_history() {
|
||||
if (std::filesystem::exists(path)) {
|
||||
repl.history_load(path.string());
|
||||
} else {
|
||||
fmt::print("Couldn't locate REPL history file at '{}'", path.string());
|
||||
fmt::print("Couldn't locate REPL history file at '{}'\n", path.string());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,8 @@ std::string get_file_path(const std::vector<std::string>& input) {
|
||||
|
||||
bool create_dir_if_needed(const std::filesystem::path& path) {
|
||||
if (!std::filesystem::is_directory(path)) {
|
||||
return std::filesystem::create_directories(path);
|
||||
std::filesystem::create_directories(path);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,9 @@ std::string GameTextFontBank::convert_utf8_to_game_with_escape(const std::string
|
||||
ASSERT(value < 256);
|
||||
newstr.push_back(char(value));
|
||||
i += 3;
|
||||
} else if (p == '"') {
|
||||
newstr.push_back(p);
|
||||
i += 1;
|
||||
} else {
|
||||
throw std::runtime_error("unknown string escape code");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user