mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 22:29:53 +00:00
decomp: add a new config flag to disable var-name casts (#3338)
This is handy when you want to try comparing the decompiler's output across games (ie. for checking if only naming differs)
This commit is contained in:
parent
3eb6cfcb17
commit
7ef2c2fac3
@ -97,6 +97,9 @@ Config make_config_via_json(nlohmann::json& json) {
|
||||
if (json.contains("read_spools")) {
|
||||
config.read_spools = json.at("read_spools").get<bool>();
|
||||
}
|
||||
if (json.contains("ignore_var_name_casts")) {
|
||||
config.ignore_var_name_casts = json.at("ignore_var_name_casts").get<bool>();
|
||||
}
|
||||
if (json.contains("old_all_types_file")) {
|
||||
config.old_all_types_file = json.at("old_all_types_file").get<std::string>();
|
||||
}
|
||||
@ -156,6 +159,7 @@ Config make_config_via_json(nlohmann::json& json) {
|
||||
config.anon_function_types_by_obj_by_id[obj_file_name][id] = type_name;
|
||||
}
|
||||
}
|
||||
if (!config.ignore_var_name_casts) {
|
||||
auto var_names_json = read_json_file_from_config(json, "var_names_file");
|
||||
for (auto& kv : var_names_json.items()) {
|
||||
auto& function_name = kv.key();
|
||||
@ -182,6 +186,7 @@ Config make_config_via_json(nlohmann::json& json) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto label_types_json = read_json_file_from_config(json, "label_types_file");
|
||||
if (json.contains("label_types_merge_file")) {
|
||||
|
@ -121,6 +121,7 @@ struct Config {
|
||||
bool extract_collision = false;
|
||||
bool find_functions = false;
|
||||
bool read_spools = false;
|
||||
bool ignore_var_name_casts = false;
|
||||
|
||||
bool write_hex_near_instructions = false;
|
||||
bool hexdump_code = false;
|
||||
|
Loading…
Reference in New Issue
Block a user