d/config: re-organize decompiler/config and eliminate most of the duplication (#2185)

Reasons for doing so include:
1. This should stop the confusion around editing the wrong config file's
flags -- when for example, extracting a level. Common settings can be in
one central place, with bespoke overrides being provided for each
version
2. Less verbose way of supporting multiple game versions. You don't have
to duplicate the entire `type_casts` file for example, just add or
override the json objects required.
3. Makes the folder structure consistent, Jak 1's `all-types` is now in
a `jak1` folder, etc.
This commit is contained in:
Tyler Wilding
2023-03-08 20:07:26 -05:00
committed by GitHub
parent 0b8b927315
commit 6d99f1bfc1
84 changed files with 1905 additions and 13241 deletions
+15 -7
View File
@@ -158,9 +158,11 @@
"projectTarget": "decompiler.exe (bin\\decompiler.exe)",
"name": "Decompiler - Jak 1",
"args": [
"${workspaceRoot}/decompiler/config/jak1_ntsc_black_label.jsonc",
"${workspaceRoot}/decompiler/config/jak1/jak1_config.jsonc",
"${workspaceRoot}/iso_data",
"${workspaceRoot}/decompiler_out"
"${workspaceRoot}/decompiler_out",
"--version",
"ntsc_v1"
]
},
{
@@ -169,9 +171,11 @@
"projectTarget": "decompiler.exe (bin\\decompiler.exe)",
"name": "Decompiler - Jak 1 PAL",
"args": [
"${workspaceRoot}/decompiler/config/jak1_pal.jsonc",
"${workspaceRoot}/decompiler/config/jak1/jak1_config.jsonc",
"${workspaceRoot}/iso_data",
"${workspaceRoot}/decompiler_out"
"${workspaceRoot}/decompiler_out",
"--version",
"pal"
]
},
{
@@ -180,9 +184,11 @@
"projectTarget": "decompiler.exe (bin\\decompiler.exe)",
"name": "Decompiler - Jak 2",
"args": [
"${workspaceRoot}/decompiler/config/jak2_ntsc_v1.jsonc",
"${workspaceRoot}/decompiler/config/jak2/jak2_config.jsonc",
"${workspaceRoot}/iso_data",
"${workspaceRoot}/decompiler_out"
"${workspaceRoot}/decompiler_out",
"--version",
"ntsc_v1"
]
},
{
@@ -191,9 +197,11 @@
"projectTarget": "decompiler.exe (bin\\decompiler.exe)",
"name": "Decompiler - Jak 2 - Extract",
"args": [
"${workspaceRoot}/decompiler/config/jak2_ntsc_v1.jsonc",
"${workspaceRoot}/decompiler/config/jak2/jak2_config.jsonc",
"${workspaceRoot}/iso_data",
"${workspaceRoot}/decompiler_out",
"--version",
"ntsc_v1",
"--config-override \"{\\\"decompile_code\\\": false}\""
]
},
+8 -8
View File
@@ -1,4 +1,4 @@
version: "3.13"
version: 3
includes:
build: ./scripts/tasks/Taskfile_{{OS}}.yml
@@ -38,7 +38,7 @@ tasks:
- sh: test -f {{.DECOMP_BIN_RELEASE_DIR}}/decompiler{{.EXE_FILE_EXTENSION}}
msg: "Couldn't locate decompiler executable in '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler'"
cmds:
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"allowed_objects\": []}'"
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"allowed_objects\": []}'"
boot-game:
desc: "Boots the game, it will fail if it's not already compiled!"
preconditions:
@@ -73,9 +73,9 @@ tasks:
cmds:
- cmd: python ./third-party/run-clang-format/run-clang-format.py -r common decompiler game goalc test tools lsp -i
# npm install -g prettier
- cmd: npx prettier --write ./decompiler/config/jak1_ntsc_black_label/*.jsonc
- cmd: npx prettier --write ./decompiler/config/jak1/**/*.jsonc
ignore_error: true
- cmd: npx prettier --write ./decompiler/config/jak2/*.jsonc
- cmd: npx prettier --write ./decompiler/config/jak2/**/*.jsonc
ignore_error: true
run-game-headless:
cmds:
@@ -83,10 +83,10 @@ tasks:
# DECOMPILING
decomp:
cmds:
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --config-override '{\"levels_extract\": false}'"
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": true, \"levels_extract\": false}'"
decomp-file:
cmds:
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --config-override '{\"levels_extract\": false, \"allowed_objects\": [\"{{.FILE}}\"]}'"
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": true, \"levels_extract\": false, \"allowed_objects\": [\"{{.FILE}}\"]}'"
decomp-clean:
cmds:
- python ./scripts/tasks/clean-decomp.py --game "{{.GAME}}"
@@ -95,10 +95,10 @@ tasks:
- python ./scripts/gsrc/lint-gsrc-file.py --game {{.GAME}} --file {{.FILE}}
update-gsrc:
cmds:
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}}
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}} --version {{.DECOMP_CONFIG_VERSION}}
update-gsrc-glob:
cmds:
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --file_pattern "{{.GLOB}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}}
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --file_pattern "{{.GLOB}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}} --version {{.DECOMP_CONFIG_VERSION}}
update-gsrc-file:
cmds:
- task: decomp-file
+110 -60
View File
@@ -16,35 +16,25 @@ namespace {
* Read an entry from cfg containing the name of a json file, and parse that file.
* Relative to jak-project directory.
*/
nlohmann::json read_json_file_from_config(const nlohmann::json& cfg, const std::string& file_key) {
auto file_name = cfg.at(file_key).get<std::string>();
nlohmann::json read_json_file_from_config(const nlohmann::json& json, const std::string& file_key) {
auto file_name = json.at(file_key).get<std::string>();
auto file_txt = file_util::read_text_file(file_util::get_file_path({file_name}));
return parse_commented_json(file_txt, file_name);
}
} // namespace
/*!
* Parse the main config file and return decompiler config.
*/
Config read_config_file(const fs::path& path_to_config_file, const std::string& override_json) {
Config make_config_via_json(nlohmann::json& json) {
Config config;
auto config_str = file_util::read_text_file(path_to_config_file);
auto cfg = parse_commented_json(config_str, path_to_config_file.string());
lg::info("Config Overide: '{}'\n", override_json);
auto cfg_override = parse_commented_json(override_json, "");
cfg.update(cfg_override);
int version_int = cfg.at("game_version").get<int>();
int version_int = json.at("game_version").get<int>();
ASSERT(version_int == 1 || version_int == 2);
config.game_version = (GameVersion)version_int;
config.text_version = cfg.at("text_version").get<GameTextVersion>();
config.game_name = cfg.at("game_name").get<std::string>();
if (cfg.contains("expected_elf_name")) {
config.expected_elf_name = cfg.at("expected_elf_name").get<std::string>();
config.text_version = json.at("text_version").get<GameTextVersion>();
config.game_name = json.at("game_name").get<std::string>();
if (json.contains("expected_elf_name")) {
config.expected_elf_name = json.at("expected_elf_name").get<std::string>();
}
config.all_types_file = cfg.at("all_types_file").get<std::string>();
config.all_types_file = json.at("all_types_file").get<std::string>();
auto inputs_json = read_json_file_from_config(cfg, "inputs_file");
auto inputs_json = read_json_file_from_config(json, "inputs_file");
config.dgo_names = inputs_json.at("dgo_names").get<std::vector<std::string>>();
config.object_file_names = inputs_json.at("object_file_names").get<std::vector<std::string>>();
config.str_file_names = inputs_json.at("str_file_names").get<std::vector<std::string>>();
@@ -52,50 +42,53 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
config.streamed_audio_file_names =
inputs_json.at("streamed_audio_file_names").get<std::vector<std::string>>();
if (cfg.contains("art_group_dump_file")) {
if (json.contains("art_group_dump_file")) {
auto json_data = file_util::read_text_file(
file_util::get_file_path({cfg.at("art_group_dump_file").get<std::string>()}));
file_util::get_file_path({json.at("art_group_dump_file").get<std::string>()}));
std::unordered_map<std::string, std::unordered_map<int, std::string>> serialized =
parse_commented_json(json_data, "art_group_dump_file");
config.art_group_info_dump = serialized;
}
if (cfg.contains("obj_file_name_map_file")) {
config.obj_file_name_map_file = cfg.at("obj_file_name_map_file").get<std::string>();
if (json.contains("obj_file_name_map_file")) {
config.obj_file_name_map_file = json.at("obj_file_name_map_file").get<std::string>();
}
config.disassemble_code = cfg.at("disassemble_code").get<bool>();
config.decompile_code = cfg.at("decompile_code").get<bool>();
config.write_hex_near_instructions = cfg.at("write_hex_near_instructions").get<bool>();
config.write_scripts = cfg.at("write_scripts").get<bool>();
config.disassemble_data = cfg.at("disassemble_data").get<bool>();
config.process_tpages = cfg.at("process_tpages").get<bool>();
config.process_game_text = cfg.at("process_game_text").get<bool>();
config.process_game_count = cfg.at("process_game_count").get<bool>();
config.process_art_groups = cfg.at("process_art_groups").get<bool>();
config.dump_art_group_info = cfg.at("dump_art_group_info").get<bool>();
config.hexdump_code = cfg.at("hexdump_code").get<bool>();
config.hexdump_data = cfg.at("hexdump_data").get<bool>();
config.find_functions = cfg.at("find_functions").get<bool>();
config.dump_objs = cfg.at("dump_objs").get<bool>();
config.print_cfgs = cfg.at("print_cfgs").get<bool>();
config.generate_symbol_definition_map = cfg.at("generate_symbol_definition_map").get<bool>();
config.is_pal = cfg.at("is_pal").get<bool>();
config.rip_levels = cfg.at("rip_levels").get<bool>();
config.extract_collision = cfg.at("extract_collision").get<bool>();
config.generate_all_types = cfg.at("generate_all_types").get<bool>();
if (cfg.contains("old_all_types_file")) {
config.old_all_types_file = cfg.at("old_all_types_file").get<std::string>();
config.disassemble_code = json.at("disassemble_code").get<bool>();
config.decompile_code = json.at("decompile_code").get<bool>();
config.write_hex_near_instructions = json.at("write_hex_near_instructions").get<bool>();
config.write_scripts = json.at("write_scripts").get<bool>();
config.disassemble_data = json.at("disassemble_data").get<bool>();
config.process_tpages = json.at("process_tpages").get<bool>();
config.process_game_text = json.at("process_game_text").get<bool>();
config.process_game_count = json.at("process_game_count").get<bool>();
config.process_art_groups = json.at("process_art_groups").get<bool>();
config.dump_art_group_info = json.at("dump_art_group_info").get<bool>();
config.hexdump_code = json.at("hexdump_code").get<bool>();
config.hexdump_data = json.at("hexdump_data").get<bool>();
config.find_functions = json.at("find_functions").get<bool>();
config.dump_objs = json.at("dump_objs").get<bool>();
config.print_cfgs = json.at("print_cfgs").get<bool>();
config.generate_symbol_definition_map = json.at("generate_symbol_definition_map").get<bool>();
config.is_pal = json.at("is_pal").get<bool>();
config.rip_levels = json.at("rip_levels").get<bool>();
config.extract_collision = json.at("extract_collision").get<bool>();
config.generate_all_types = json.at("generate_all_types").get<bool>();
if (json.contains("old_all_types_file")) {
config.old_all_types_file = json.at("old_all_types_file").get<std::string>();
}
auto allowed = cfg.at("allowed_objects").get<std::vector<std::string>>();
auto allowed = json.at("allowed_objects").get<std::vector<std::string>>();
for (const auto& x : allowed) {
config.allowed_objects.insert(x);
}
auto banned = cfg.at("banned_objects").get<std::vector<std::string>>();
auto banned = json.at("banned_objects").get<std::vector<std::string>>();
for (const auto& x : banned) {
config.banned_objects.insert(x);
}
auto type_casts_json = read_json_file_from_config(cfg, "type_casts_file");
auto type_casts_json = read_json_file_from_config(json, "type_casts_file");
if (json.contains("type_casts_merge_file")) {
type_casts_json.update(read_json_file_from_config(json, "type_casts_merge_file"));
}
for (auto& kv : type_casts_json.items()) {
auto& function_name = kv.key();
auto& casts = kv.value();
@@ -126,7 +119,10 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
}
}
auto anon_func_json = read_json_file_from_config(cfg, "anonymous_function_types_file");
auto anon_func_json = read_json_file_from_config(json, "anonymous_function_types_file");
if (json.contains("anonymous_function_types_merge_file")) {
anon_func_json.update(read_json_file_from_config(json, "anonymous_function_types_merge_file"));
}
for (auto& kv : anon_func_json.items()) {
auto& obj_file_name = kv.key();
auto& anon_types = kv.value();
@@ -136,7 +132,7 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
config.anon_function_types_by_obj_by_id[obj_file_name][id] = type_name;
}
}
auto var_names_json = read_json_file_from_config(cfg, "var_names_file");
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();
auto arg = kv.value().find("args");
@@ -163,7 +159,10 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
}
}
auto label_types_json = read_json_file_from_config(cfg, "label_types_file");
auto label_types_json = read_json_file_from_config(json, "label_types_file");
if (json.contains("label_types_merge_file")) {
label_types_json.update(read_json_file_from_config(json, "label_types_merge_file"));
}
for (auto& kv : label_types_json.items()) {
auto& obj_name = kv.key();
auto& types = kv.value();
@@ -184,7 +183,10 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
}
}
auto stack_structures_json = read_json_file_from_config(cfg, "stack_structures_file");
auto stack_structures_json = read_json_file_from_config(json, "stack_structures_file");
if (json.contains("stack_structures_merge_file")) {
stack_structures_json.update(read_json_file_from_config(json, "stack_structures_merge_file"));
}
for (auto& kv : stack_structures_json.items()) {
auto& func_name = kv.key();
auto& stack_structures = kv.value();
@@ -192,7 +194,21 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
parse_stack_structure_hints(stack_structures);
}
auto hacks_json = read_json_file_from_config(cfg, "hacks_file");
auto hacks_json = read_json_file_from_config(json, "hacks_file");
if (json.contains("hacks_merge_file")) {
// NOTE - here we merge one level deeper because it's worth doing here
// - chances are you just need to override a few individual hacks
const auto hack_overrides = read_json_file_from_config(json, "hacks_merge_file");
for (const auto& entry : hack_overrides.items()) {
if (hacks_json.contains(entry.key())) {
// If the parent json file has this, update it
hacks_json.at(entry.key()).update(entry.value());
} else {
// Otherwise, we append it
hacks_json[entry.key()] = entry.value();
}
}
}
config.hacks.hint_inline_assembly_functions =
hacks_json.at("hint_inline_assembly_functions").get<std::unordered_set<std::string>>();
config.hacks.asm_functions_by_name =
@@ -240,21 +256,21 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
}
config.levels_to_extract = inputs_json.at("levels_to_extract").get<std::vector<std::string>>();
config.levels_extract = cfg.at("levels_extract").get<bool>();
config.levels_extract = json.at("levels_extract").get<bool>();
auto art_info_json = read_json_file_from_config(cfg, "art_info_file");
auto art_info_json = read_json_file_from_config(json, "art_info_file");
config.art_groups_by_file =
art_info_json.at("files").get<std::unordered_map<std::string, std::string>>();
config.art_groups_by_function =
art_info_json.at("functions").get<std::unordered_map<std::string, std::string>>();
auto import_deps = read_json_file_from_config(cfg, "import_deps_file");
auto import_deps = read_json_file_from_config(json, "import_deps_file");
config.import_deps_by_file =
import_deps.get<std::unordered_map<std::string, std::vector<std::string>>>();
config.write_patches = cfg.at("write_patches").get<bool>();
config.apply_patches = cfg.at("apply_patches").get<bool>();
const auto& object_patches = cfg.at("object_patches");
config.write_patches = json.at("write_patches").get<bool>();
config.apply_patches = json.at("apply_patches").get<bool>();
const auto& object_patches = json.at("object_patches");
for (auto& [obj, pch] : object_patches.items()) {
ObjectPatchInfo new_pch;
new_pch.crc = (u32)std::stoull(pch.at("crc32").get<std::string>(), nullptr, 16);
@@ -265,5 +281,39 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string&
return config;
}
} // namespace
/*!
* Parse the main config file and return decompiler config.
*/
Config read_config_file(const fs::path& path_to_config_file,
const std::string& config_game_version,
const std::string& override_json) {
Config config;
auto config_str = file_util::read_text_file(path_to_config_file);
auto json = parse_commented_json(config_str, path_to_config_file.string());
// First, check if we need to update the JSON from the game versions overrides
if (json.contains("version_overrides")) {
if (!json.at("version_overrides").contains(config_game_version)) {
throw std::runtime_error(fmt::format(
"'{}' provided which doesn't correspond with a 'version_overrides", config_game_version));
}
lg::info("Game Config Overide: '{}'", config_game_version);
json.update(json.at("version_overrides").at(config_game_version));
}
// Then, update any config overrides
lg::info("Config Overide: '{}'", override_json);
auto cfg_override = parse_commented_json(override_json, "");
json.update(cfg_override);
// debugging, dump the JSON config to a file
// fs::path debug_path = path_to_config_file.parent_path() / "config-debug.jsonc";
// file_util::write_text_file(debug_path, json.dump(2));
// Lastly, update the struct via the JSON
return make_config_via_json(json);
}
} // namespace decompiler
+1
View File
@@ -169,6 +169,7 @@ struct Config {
};
Config read_config_file(const fs::path& path_to_config_file,
const std::string& config_game_version,
const std::string& override_json = "{}");
} // namespace decompiler
@@ -77,17 +77,17 @@
// CONFIG FILES
////////////////////////////
"type_casts_file": "decompiler/config/jak1_ntsc_black_label/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak1_ntsc_black_label/var_names.jsonc",
"label_types_file": "decompiler/config/jak1_ntsc_black_label/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak1_ntsc_black_label/hacks.jsonc",
"inputs_file": "decompiler/config/jak1_ntsc_black_label/inputs.jsonc",
"art_info_file": "decompiler/config/jak1_ntsc_black_label/art_info.jsonc",
"import_deps_file": "decompiler/config/jak1_ntsc_black_label/import_deps.jsonc",
"all_types_file": "decompiler/config/all-types.gc",
"art_group_dump_file": "decompiler/config/jak1_ntsc_black_label/art-group-info.min.json",
"type_casts_file": "decompiler/config/jak1/ntsc_v1/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak1/ntsc_v1/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak1/ntsc_v1/var_names.jsonc",
"label_types_file": "decompiler/config/jak1/ntsc_v1/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak1/ntsc_v1/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak1/ntsc_v1/hacks.jsonc",
"inputs_file": "decompiler/config/jak1/ntsc_v1/inputs.jsonc",
"art_info_file": "decompiler/config/jak1/ntsc_v1/art_info.jsonc",
"import_deps_file": "decompiler/config/jak1/ntsc_v1/import_deps.jsonc",
"all_types_file": "decompiler/config/jak1/all-types.gc",
"art_group_dump_file": "decompiler/config/jak1/ntsc_v1/art-group-info.min.json",
// optional: a predetermined object file name map from a file.
// this will make decompilation naming consistent even if you only run on some objects.
@@ -153,6 +153,35 @@
"in": "decompiler_out/jak1_pal/raw_obj/6COMMON.go",
"out": "game/assets/jak1/patches/6common.xd3"
}
},
"version_overrides": {
"ntsc_v1": {},
"ntsc_v2": {
"game_name": "jak1_us2",
"type_casts_merge_file": "decompiler/config/jak1/pal/type_casts.jsonc",
"label_types_merge_file": "decompiler/config/jak1/jp/label_types.jsonc",
"hacks_merge_file": "decompiler/config/jak1/pal/hacks.jsonc",
"obj_file_name_map_file": "goal_src/jak1/build/all_objs_jak1_jp.json",
"object_patches": {}
},
"jp": {
"game_name": "jak1_jp",
"expected_elf_name": "SCPS_150.21",
"type_casts_merge_file": "decompiler/config/jak1/pal/type_casts.jsonc",
"label_types_merge_file": "decompiler/config/jak1/jp/label_types.jsonc",
"hacks_merge_file": "decompiler/config/jak1/pal/hacks.jsonc",
"obj_file_name_map_file": "goal_src/jak1/build/all_objs_jak1_jp.json",
"object_patches": {}
},
"pal": {
"game_name": "jak1_pal",
"expected_elf_name": "SCES_503.61",
"is_pal": true,
"type_casts_merge_file": "decompiler/config/jak1/pal/type_casts.jsonc",
"label_types_merge_file": "decompiler/config/jak1/pal/label_types.jsonc",
"hacks_merge_file": "decompiler/config/jak1/pal/hacks.jsonc",
"obj_file_name_map_file": "goal_src/jak1/build/all_objs_jak1_pal.json",
"object_patches": {}
}
}
}
+803
View File
@@ -0,0 +1,803 @@
{
"target-handler": [
["L195", "attack-info"],
["L197", "float", true],
["L198", "float", true],
["L199", "float", true],
["L200", "float", true],
["L201", "float", true],
["L202", "float", true],
["L203", "float", true],
["L204", "float", true],
["L205", "uint64", true],
["L206", "uint64", true],
["L207", "uint64", true],
["L208", "uint64", true],
["L209", "uint64", true]
],
"water": [
["L148", "attack-info"],
["L149", "attack-info"],
["L150", "attack-info"]
],
"racer": [["L106", "vector"]],
"target-racer": [
["L237", "attack-info"],
["L238", "attack-info"],
["L240", "vector"]
],
"rolling-lightning-mole": [
["L181", "vector"],
["L185", "vector4w"],
["L186", "vector4w"],
["L187", "vector4w"],
["L189", "vector4w"],
["L195", "vector"],
["L201", "vector4w"],
["L202", "vector4w"],
["L203", "vector4w"],
["L204", "vector4w"],
["L205", "vector4w"],
["L206", "vector4w"]
],
"rolling-robber": [
["L127", "vector"],
["L139", "vector"],
["L140", "vector"],
["L145", "vector"]
],
"target-flut": [
["L399", "attack-info"],
["L406", "float", true],
["L407", "float", true],
["L408", "float", true],
["L409", "float", true],
["L410", "float", true],
["L411", "float", true],
["L412", "float", true],
["L413", "float", true],
["L414", "float", true],
["L415", "float", true],
["L416", "float", true],
["L417", "float", true],
["L418", "float", true],
["L419", "float", true],
["L420", "float", true],
["L421", "float", true],
["L422", "float", true],
["L423", "float", true],
["L424", "float", true],
["L425", "float", true],
["L426", "float", true],
["L427", "float", true],
["L428", "float", true],
["L429", "float", true],
["L430", "float", true],
["L431", "float", true],
["L432", "float", true],
["L433", "float", true],
["L434", "float", true],
["L435", "float", true],
["L436", "float", true],
["L437", "float", true],
["L438", "float", true],
["L439", "float", true],
["L440", "float", true],
["L441", "float", true],
["L442", "float", true],
["L443", "float", true],
["L444", "float", true],
["L445", "float", true],
["L446", "float", true],
["L447", "float", true],
["L448", "float", true],
["L449", "float", true],
["L450", "float", true],
["L451", "float", true],
["L452", "float", true],
["L453", "float", true],
["L454", "float", true],
["L455", "float", true],
["L456", "float", true],
["L457", "float", true],
["L458", "uint64", true],
["L459", "uint64", true],
["L460", "uint64", true],
["L461", "uint64", true],
["L462", "uint64", true],
["L463", "uint64", true],
["L464", "uint64", true],
["L465", "uint64", true],
["L483", "uint64", true],
["L484", "uint64", true]
],
"collide-shape": [
["L399", "attack-info"],
["L408", "vector"],
["L410", "vector"],
["L411", "vector"],
["L413", "attack-info"],
["L414", "attack-info"],
["L415", "attack-info"],
["L416", "attack-info"],
["L417", "vector"],
["L418", "attack-info"],
["L419", "attack-info"],
["L420", "vector"],
["L421", "vector"]
],
"collide-planes": [
["L53", "vector4w"],
["L54", "vector4w"],
["L55", "vector4w"],
["L56", "vector4w"],
["L57", "vector4w"],
["L58", "vector4w"],
["L59", "vector4w"],
["L60", "vector4w"],
["L63", "vector4w"],
["L64", "vector4w"],
["L65", "vector4w"],
["L66", "vector4w"]
],
"collide-probe": [
["L100", "vector"],
["L102", "vector"]
],
"collide-cache": [
["L304", "vector"],
["L303", "vector4w"]
],
"load-boundary-data": [["L2", "(array array)"]],
"tfrag-near": [["L1", "vu-function"]],
"snow-ram-boss": [
["L220", "attack-info"],
["L221", "attack-info"],
["L222", "attack-info"],
["L223", "attack-info"],
["L225", "attack-info"]
],
"snow-ram": [["L73", "attack-info"]],
"snow-bumper": [["L54", "attack-info"]],
"snow-ball": [
["L86", "(pointer float)", 8],
["L87", "(pointer float)", 8],
["L89", "attack-info"]
],
"puffer": [["L170", "attack-info"]],
"driller-lurker": [
["L174", "attack-info"],
["L175", "attack-info"]
],
"dark-crystal": [["L36", "attack-info"]],
"kermit": [["L164", "attack-info"]],
"swamp-blimp": [
["L177", "vector"],
["L182", "vector"],
["L187", "vector"],
["L198", "tetherrock-info"],
["L200", "tetherrock-info"],
["L203", "tetherrock-info"],
["L206", "tetherrock-info"],
["L209", "tetherrock-info"]
],
"mistycannon": [["L199", "attack-info"]],
"darkvine": [["L41", "attack-info"]],
"jungle-mirrors": [
["L325", "vector"],
["L326", "vector4w-4"]
],
"quicksandlurker": [["L111", "attack-info"]],
"voicebox": [
["L47", "vector"],
["L48", "vector"],
["L49", "vector"],
["L50", "vector"],
["L51", "vector"]
],
"mother-spider": [
["L278", "vector"],
["L279", "vector"],
["L288", "attack-info"],
["L301", "(inline-array mother-spider-leg-info)", 8],
["L302", "(inline-array mother-spider-thread)", 9]
],
"bully": [
["L90", "attack-info"],
["L91", "attack-info"],
["L93", "attack-info"]
],
"bones": [
["L159", "shadow-settings"],
["L161", "vector"],
["L162", "vu-function"]
],
"tie": [["L43", "vu-function"]],
"tie-near": [["L91", "vu-function"]],
"depth-cue": [["L17", "depth-cue-work"]],
"navigate": [
["L402", "vector"],
["L403", "vector"],
["L404", "vector"],
["L405", "vector"],
["L406", "vector"],
["L422", "vector"],
["L419", "(pointer uint8)", 4],
["L425", "float", true],
["L426", "float", true],
["L429", "float", true],
["L430", "float", true],
["L436", "float", true],
["L438", "float", true],
["L444", "float", true],
["L442", "float", true],
["L520", "vector"],
["L522", "float", true], // TODO - meters
["L523", "float", true] // TODO - meters
],
"eye": [
["L36", "eye-work"],
["L38", "float", true],
["L40", "float", true],
["L44", "uint64", true]
],
"snow-bunny": [["L190", "attack-info"]],
"ocean-vu0": [
["L8", "vu-function"],
["L9", "ocean-vu0-work"]
],
"ocean-near": [
["L35", "vu-function"],
["L37", "float", true],
["L44", "float", true]
],
"ocean-mid": [["L150", "vu-function"]],
"generic-merc": [
["L161", "(inline-array invinitdata)", 8],
["L162", "vu-function"]
],
"generic-vu0": [["L1", "vu-function"]],
"generic-vu1": [
["L8", "vector4w"],
["L9", "vector4w"],
["L10", "vu-function"]
],
"generic-effect": [["L95", "generic-consts"]],
"shadow-vu1": [
["L5", "vu-function"],
["L6", "shadow-vu1-gifbuf-template"]
],
"shrubbery": [["L133", "vu-function"]],
"credits": [
["L32", "(array int32)"],
["L33", "(array float)"]
],
"ambient": [
["L334", "vector2h"],
["L332", "vector2h"],
["L331", "vector2h"],
["L330", "vector2h"],
["L329", "vector2h"],
["L328", "vector2h"]
],
"sparticle-launcher": [["L193", "adgif-shader"]],
"load-boundary": [
["L328", "(inline-array lbvtx)", 12],
["L325", "vector"]
],
"cam-debug": [
["L172", "vector4w"],
["L173", "vector4w"],
["L174", "vector4w"],
["L175", "vector4w"],
["L176", "vector4w"],
["L207", "vector4w"],
["L208", "vector4w"],
["L209", "vector4w"],
["L210", "vector4w"],
["L211", "vector4w"],
["L212", "vector4w"],
["L213", "vector4w"],
["L214", "vector4w"],
["L215", "vector4w"],
["L216", "vector4w"],
["L217", "vector4w"],
["L218", "vector4w"],
["L219", "vector4w"],
["L220", "vector4w"],
["L221", "vector4w"],
["L222", "vector4w"],
["L223", "vector4w"],
["L224", "vector4w"],
["L225", "vector4w"],
["L226", "vector4w"],
["L227", "vector4w"],
["L228", "vector4w"],
["L229", "vector4w"],
["L230", "vector4w"],
["L231", "vector4w"],
["L232", "vector4w"],
["L237", "vector4w"],
["L238", "vector4w"],
["L239", "vector4w"],
["L240", "vector4w"],
["L241", "vector"],
["L242", "vector"],
["L243", "vector4w"],
["L244", "vector"],
["L245", "vector"],
["L252", "vector"],
["L253", "vector"],
["L254", "vector"],
["L255", "vector"],
["L261", "vector4w"]
],
"sequence-a-village1": [["L40", "vector"]],
"ogreboss": [
["L360", "attack-info"],
["L368", "attack-info"],
["L371", "attack-info"],
["L372", "attack-info"],
["L385", "float", true],
["L386", "float", true],
["L387", "float", true],
["L388", "float", true],
["L389", "float", true],
["L390", "float", true],
["L391", "float", true],
["L392", "float", true],
["L393", "float", true],
["L394", "float", true],
["L395", "float", true],
["L396", "float", true],
["L397", "float", true],
["L398", "float", true],
["L399", "float", true],
["L400", "float", true],
["L401", "float", true],
["L402", "float", true],
["L403", "float", true],
["L404", "float", true],
["L405", "float", true],
["L406", "float", true],
["L407", "float", true],
["L408", "float", true],
["L409", "float", true],
["L410", "float", true],
["L411", "float", true],
["L412", "float", true],
["L413", "float", true],
["L414", "float", true],
["L415", "float", true],
["L416", "float", true],
["L417", "float", true],
["L418", "float", true],
["L419", "float", true],
["L420", "float", true],
["L421", "float", true],
["L422", "float", true],
["L423", "float", true],
["L424", "float", true],
["L425", "float", true],
["L426", "float", true],
["L427", "float", true],
["L428", "float", true],
["L429", "float", true],
["L430", "float", true],
["L431", "float", true],
["L432", "float", true],
["L433", "float", true],
["L434", "float", true],
["L435", "float", true],
["L436", "float", true],
["L437", "float", true],
["L438", "float", true],
["L439", "float", true],
["L440", "float", true],
["L441", "float", true],
["L442", "float", true],
["L443", "float", true],
["L444", "float", true],
["L445", "float", true],
["L446", "float", true],
["L447", "float", true],
["L448", "float", true],
["L449", "float", true],
["L450", "float", true],
["L451", "float", true],
["L452", "float", true],
["L453", "float", true],
["L454", "float", true],
["L455", "float", true],
["L456", "float", true],
["L457", "float", true],
["L458", "float", true],
["L459", "float", true],
["L460", "float", true],
["L461", "float", true],
["L462", "rgba", true],
["L463", "uint64", true],
["L464", "uint64", true],
["L465", "uint64", true],
["L466", "uint64", true],
["L467", "uint64", true],
["L526", "float", true],
["L527", "uint64", true],
["L528", "uint64", true],
["L529", "uint64", true],
["L530", "uint64", true],
["L531", "uint64", true]
],
"flying-lurker": [
["L200", "attack-info"],
["L190", "vector"]
],
"target": [
["L728", "float", true],
["L729", "float", true],
["L730", "float", true],
["L731", "float", true],
["L732", "float", true],
["L733", "float", true],
["L734", "float", true],
["L735", "float", true],
["L736", "float", true],
["L737", "float", true],
["L738", "float", true],
["L739", "float", true],
["L740", "float", true],
["L741", "float", true],
["L742", "float", true],
["L743", "float", true],
["L744", "float", true],
["L745", "float", true],
["L746", "float", true],
["L747", "float", true],
["L748", "float", true],
["L749", "float", true],
["L750", "float", true],
["L751", "float", true],
["L752", "float", true],
["L753", "float", true],
["L754", "float", true],
["L755", "float", true],
["L756", "float", true],
["L757", "float", true],
["L758", "float", true],
["L759", "float", true],
["L760", "float", true],
["L761", "float", true],
["L762", "float", true],
["L763", "float", true],
["L764", "float", true],
["L765", "float", true],
["L766", "float", true],
["L767", "float", true],
["L768", "float", true],
["L769", "float", true],
["L770", "float", true],
["L771", "float", true],
["L772", "float", true],
["L773", "float", true],
["L774", "float", true],
["L775", "float", true],
["L776", "float", true],
["L777", "float", true],
["L778", "float", true],
["L779", "float", true],
["L780", "float", true],
["L781", "float", true],
["L782", "float", true],
["L783", "float", true],
["L784", "float", true],
["L785", "float", true],
["L786", "float", true],
["L787", "float", true],
["L788", "float", true],
["L789", "float", true],
["L790", "float", true],
["L791", "float", true],
["L792", "float", true],
["L793", "float", true],
["L794", "float", true],
["L795", "float", true],
["L796", "float", true],
["L797", "float", true],
["L798", "float", true],
["L799", "float", true],
["L800", "float", true],
["L801", "float", true],
["L802", "float", true],
["L803", "float", true],
["L804", "float", true],
["L805", "float", true],
["L806", "float", true],
["L807", "float", true],
["L808", "float", true],
["L809", "float", true],
["L810", "float", true],
["L811", "float", true],
["L812", "float", true],
["L813", "float", true],
["L814", "float", true],
["L815", "float", true],
["L816", "float", true],
["L817", "float", true],
["L818", "float", true],
["L819", "float", true],
["L820", "float", true],
["L821", "float", true],
["L822", "float", true],
["L823", "uint64", true],
["L824", "uint64", true]
],
"target2": [
["L615", "attack-info"],
["L656", "float", true],
["L657", "float", true],
["L658", "float", true],
["L659", "float", true],
["L660", "float", true],
["L661", "float", true],
["L662", "float", true],
["L663", "float", true],
["L664", "float", true],
["L665", "float", true],
["L666", "float", true],
["L667", "float", true],
["L668", "float", true],
["L669", "float", true],
["L670", "float", true],
["L671", "float", true],
["L672", "float", true],
["L673", "float", true],
["L674", "float", true],
["L675", "float", true],
["L676", "float", true],
["L677", "float", true],
["L678", "float", true],
["L679", "float", true],
["L680", "float", true],
["L681", "float", true],
["L682", "float", true],
["L683", "float", true],
["L684", "float", true],
["L685", "float", true],
["L686", "float", true],
["L687", "float", true],
["L688", "float", true],
["L689", "float", true],
["L690", "float", true],
["L691", "float", true],
["L692", "float", true],
["L693", "float", true],
["L694", "float", true],
["L695", "float", true],
["L696", "float", true],
["L697", "float", true],
["L698", "float", true],
["L699", "float", true],
["L700", "float", true],
["L701", "float", true],
["L702", "float", true],
["L703", "float", true],
["L704", "float", true],
["L705", "float", true],
["L706", "float", true],
["L707", "float", true],
["L708", "float", true],
["L709", "float", true],
["L710", "float", true],
["L711", "float", true],
["L712", "float", true],
["L713", "float", true],
["L714", "float", true],
["L715", "float", true],
["L716", "float", true],
["L717", "float", true],
["L718", "float", true],
["L719", "float", true],
["L720", "float", true],
["L721", "float", true],
["L722", "float", true],
["L723", "float", true],
["L724", "float", true],
["L725", "float", true],
["L726", "float", true],
["L727", "float", true],
["L728", "float", true],
["L729", "float", true],
["L730", "float", true],
["L731", "float", true],
["L732", "float", true],
["L733", "float", true],
["L734", "float", true],
["L735", "float", true],
["L736", "float", true],
["L737", "float", true],
["L738", "float", true],
["L739", "float", true],
["L740", "float", true],
["L741", "float", true],
["L742", "float", true],
["L743", "float", true],
["L744", "float", true],
["L745", "float", true],
["L746", "float", true],
["L747", "float", true],
["L748", "uint64", true],
["L759", "uint64", true]
],
"target-death": [
["L314", "vector"],
["L322", "float", true],
["L323", "float", true],
["L324", "float", true],
["L325", "float", true],
["L326", "float", true],
["L327", "float", true],
["L328", "float", true],
["L329", "float", true],
["L330", "float", true],
["L331", "float", true],
["L332", "float", true],
["L333", "float", true],
["L334", "float", true],
["L335", "float", true],
["L336", "float", true],
["L337", "float", true],
["L338", "float", true],
["L339", "float", true],
["L340", "float", true],
["L341", "float", true],
["L342", "float", true],
["L343", "float", true],
["L344", "float", true],
["L345", "float", true],
["L346", "float", true],
["L347", "float", true],
["L348", "float", true],
["L349", "float", true],
["L350", "uint64", true],
["L351", "uint64", true],
["L352", "uint64", true],
["L353", "uint64", true],
["L354", "uint64", true],
["L355", "uint64", true],
["L356", "uint64", true],
["L357", "uint64", true],
["L358", "uint64", true],
["L361", "float", true]
],
"progress": [
["L574", "vector"],
["L576", "vector"],
["L578", "vector"],
["L580", "vector"],
["L582", "vector"],
["L584", "vector"],
["L587", "float", true],
["L588", "float", true],
["L589", "float", true],
["L590", "float", true],
["L591", "float", true],
["L592", "float", true],
["L593", "float", true],
["L594", "float", true],
["L595", "float", true],
["L596", "float", true],
["L597", "float", true],
["L598", "float", true],
["L599", "float", true],
["L600", "float", true],
["L601", "float", true],
["L602", "float", true],
["L603", "float", true],
["L604", "float", true],
["L605", "float", true],
["L606", "float", true],
["L607", "float", true],
["L608", "float", true],
["L609", "float", true],
["L610", "float", true],
["L611", "float", true],
["L612", "float", true],
["L613", "float", true],
["L614", "float", true],
["L615", "float", true],
["L617", "float", true],
["L616", "float", true],
["L618", "float", true],
["L619", "float", true],
["L620", "float", true],
["L621", "float", true],
["L622", "float", true],
["L623", "float", true],
["L624", "float", true],
["L625", "float", true],
["L626", "float", true],
["L627", "float", true],
["L628", "float", true],
["L629", "float", true],
["L630", "float", true],
["L631", "float", true],
["L632", "float", true],
["L633", "float", true],
["L634", "float", true],
["L635", "float", true],
["L636", "float", true],
["L637", "uint64", true],
["L638", "uint64", true],
["L639", "uint64", true],
["L640", "uint64", true],
["L641", "uint64", true],
["L642", "uint64", true],
["L643", "uint64", true],
["L644", "uint64", true],
["L645", "uint64", true],
["L646", "uint64", true],
["L647", "uint64", true],
["L648", "uint64", true],
["L649", "uint64", true],
["L650", "uint64", true],
["L668", "uint64", true]
],
"citadel-obs": [["L267", "attack-info"]]
}
@@ -400,7 +400,6 @@
],
"(method 11 fact-info-target)": [42],
"(anon-function 9 game-save)": [3, 4, 5, 6, 7, 8, 10],
//"(anon-function 9 game-save)":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
"particle-adgif": [0, 1, 2, 3, 4, 5, 7],
"sp-launch-particles-var": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
@@ -464,7 +463,6 @@
"(method 13 collide-edge-work)": [0, 2],
"(method 17 collide-edge-work)": [0, 1, 2, 3, 4],
"(method 9 edge-grab-info)": [15, 16, 18, 19, 21, 22, 24],
// "(method 18 collide-edge-work)" : [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24],
"target-falling-anim-trans": [5, 6],
"(method 27 nav-mesh)": [8],
"(method 32 nav-control)": [12, 21, 32],
@@ -394,21 +394,8 @@
["L6270", "uint64", true],
["L6269", "uint64", true],
["L6271", "uint64", true]
// ["L6268", "(array int)", true, 1] // printed as a float
],
// "default-menu": [
// ["L519", "pair", true],
// ["L1550", "pair", true],
// ["L1552", "pair", true]
// ],
// "generic-vu1": [
// ["L12", "gif-tag64", true],
// ["L15", "gif-tag64", true],
// ["L14", "gif-tag-regs", true]
// ],
"merc-blend-shape": [["L62", "(pointer int16)", 32]],
"miners": [
@@ -2119,8 +2106,6 @@
["L162", "vu-function"]
],
"generic-vu0": [["L1", "vu-function"]],
"generic-vu1": [
["L8", "vector4w"],
["L9", "vector4w"],
@@ -2140,8 +2125,5 @@
"credits": [
["L32", "(array int32)"],
["L33", "(array float)"]
],
// please do not add things after this entry! git is dumb.
"object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": []
]
}
@@ -7714,6 +7714,5 @@
"generic-tie-execute": [
[118, "v1", "terrain-context"],
[124, "v1", "terrain-context"]
],
"placeholder-do-not-add-below": []
]
}
+12
View File
@@ -0,0 +1,12 @@
{
"blocks_ending_in_asm_branch": {
"display-loop": [44, 49, 66, 99],
"(method 11 sparticle-launch-control)": [27, 28, 38, 49, 51, 52, 80]
},
"dynamic_format_arg_counts": {
"(method 39 progress)": [
[56, 1],
[83, 1]
]
}
}
@@ -0,0 +1,800 @@
{
"target-handler": [
["L195", "attack-info"],
["L197", "float", true],
["L198", "float", true],
["L199", "float", true],
["L200", "float", true],
["L201", "float", true],
["L202", "float", true],
["L203", "float", true],
["L204", "float", true],
["L205", "uint64", true],
["L206", "uint64", true],
["L207", "uint64", true],
["L208", "uint64", true],
["L209", "uint64", true]
],
"water": [
["L148", "attack-info"],
["L149", "attack-info"],
["L150", "attack-info"]
],
"racer": [["L106", "vector"]],
"target-racer": [
["L237", "attack-info"],
["L238", "attack-info"],
["L240", "vector"]
],
"rolling-lightning-mole": [
["L181", "vector"],
["L185", "vector4w"],
["L186", "vector4w"],
["L187", "vector4w"],
["L189", "vector4w"],
["L195", "vector"],
["L201", "vector4w"],
["L202", "vector4w"],
["L203", "vector4w"],
["L204", "vector4w"],
["L205", "vector4w"],
["L206", "vector4w"]
],
"rolling-robber": [
["L127", "vector"],
["L139", "vector"],
["L140", "vector"],
["L145", "vector"]
],
"target-flut": [
["L399", "attack-info"],
["L406", "float", true],
["L407", "float", true],
["L408", "float", true],
["L409", "float", true],
["L410", "float", true],
["L411", "float", true],
["L412", "float", true],
["L413", "float", true],
["L414", "float", true],
["L415", "float", true],
["L416", "float", true],
["L417", "float", true],
["L418", "float", true],
["L419", "float", true],
["L420", "float", true],
["L421", "float", true],
["L422", "float", true],
["L423", "float", true],
["L424", "float", true],
["L425", "float", true],
["L426", "float", true],
["L427", "float", true],
["L428", "float", true],
["L429", "float", true],
["L430", "float", true],
["L431", "float", true],
["L432", "float", true],
["L433", "float", true],
["L434", "float", true],
["L435", "float", true],
["L436", "float", true],
["L437", "float", true],
["L438", "float", true],
["L439", "float", true],
["L440", "float", true],
["L441", "float", true],
["L442", "float", true],
["L443", "float", true],
["L444", "float", true],
["L445", "float", true],
["L446", "float", true],
["L447", "float", true],
["L448", "float", true],
["L449", "float", true],
["L450", "float", true],
["L451", "float", true],
["L452", "float", true],
["L453", "float", true],
["L454", "float", true],
["L455", "float", true],
["L456", "float", true],
["L457", "float", true],
["L458", "uint64", true],
["L459", "uint64", true],
["L460", "uint64", true],
["L461", "uint64", true],
["L462", "uint64", true],
["L463", "uint64", true],
["L464", "uint64", true],
["L465", "uint64", true],
["L483", "uint64", true],
["L484", "uint64", true]
],
"collide-shape": [
["L399", "attack-info"],
["L408", "vector"],
["L410", "vector"],
["L411", "vector"],
["L413", "attack-info"],
["L414", "attack-info"],
["L415", "attack-info"],
["L416", "attack-info"],
["L417", "vector"],
["L418", "attack-info"],
["L419", "attack-info"],
["L420", "vector"],
["L421", "vector"]
],
"collide-planes": [
["L53", "vector4w"],
["L54", "vector4w"],
["L55", "vector4w"],
["L56", "vector4w"],
["L57", "vector4w"],
["L58", "vector4w"],
["L59", "vector4w"],
["L60", "vector4w"],
["L63", "vector4w"],
["L64", "vector4w"],
["L65", "vector4w"],
["L66", "vector4w"]
],
"collide-probe": [
["L100", "vector"],
["L102", "vector"]
],
"collide-cache": [
["L304", "vector"],
["L303", "vector4w"]
],
"load-boundary-data": [["L2", "(array array)"]],
"tfrag-near": [["L1", "vu-function"]],
"snow-ram-boss": [
["L220", "attack-info"],
["L221", "attack-info"],
["L222", "attack-info"],
["L223", "attack-info"],
["L225", "attack-info"]
],
"snow-ram": [["L73", "attack-info"]],
"snow-bumper": [["L54", "attack-info"]],
"snow-ball": [
["L86", "(pointer float)", 8],
["L87", "(pointer float)", 8],
["L89", "attack-info"]
],
"puffer": [["L170", "attack-info"]],
"driller-lurker": [
["L174", "attack-info"],
["L175", "attack-info"]
],
"dark-crystal": [["L36", "attack-info"]],
"kermit": [["L164", "attack-info"]],
"swamp-blimp": [
["L177", "vector"],
["L182", "vector"],
["L187", "vector"],
["L198", "tetherrock-info"],
["L200", "tetherrock-info"],
["L203", "tetherrock-info"],
["L206", "tetherrock-info"],
["L209", "tetherrock-info"]
],
"mistycannon": [["L199", "attack-info"]],
"darkvine": [["L41", "attack-info"]],
"jungle-mirrors": [
["L325", "vector"],
["L326", "vector4w-4"]
],
"quicksandlurker": [["L111", "attack-info"]],
"voicebox": [
["L47", "vector"],
["L48", "vector"],
["L49", "vector"],
["L50", "vector"],
["L51", "vector"]
],
"mother-spider": [
["L278", "vector"],
["L279", "vector"],
["L288", "attack-info"],
["L301", "(inline-array mother-spider-leg-info)", 8],
["L302", "(inline-array mother-spider-thread)", 9]
],
"bully": [
["L90", "attack-info"],
["L91", "attack-info"],
["L93", "attack-info"]
],
"bones": [
["L159", "shadow-settings"],
["L161", "vector"],
["L162", "vu-function"]
],
"tie": [["L43", "vu-function"]],
"tie-near": [["L91", "vu-function"]],
"depth-cue": [["L17", "depth-cue-work"]],
"navigate": [
["L402", "vector"],
["L403", "vector"],
["L404", "vector"],
["L405", "vector"],
["L406", "vector"],
["L422", "vector"],
["L419", "(pointer uint8)", 4],
["L425", "float", true],
["L426", "float", true],
["L429", "float", true],
["L430", "float", true],
["L436", "float", true],
["L438", "float", true],
["L444", "float", true],
["L442", "float", true],
["L520", "vector"],
["L522", "float", true], // TODO - meters
["L523", "float", true] // TODO - meters
],
"eye": [
["L36", "eye-work"],
["L38", "float", true],
["L40", "float", true],
["L44", "uint64", true]
],
"snow-bunny": [["L190", "attack-info"]],
"ocean-vu0": [
["L8", "vu-function"],
["L9", "ocean-vu0-work"]
],
"ocean-near": [
["L35", "vu-function"],
["L37", "float", true],
["L44", "float", true]
],
"ocean-mid": [["L150", "vu-function"]],
"generic-merc": [
["L161", "(inline-array invinitdata)", 8],
["L162", "vu-function"]
],
"generic-vu0": [["L1", "vu-function"]],
"generic-vu1": [
["L8", "vector4w"],
["L9", "vector4w"],
["L10", "vu-function"]
],
"generic-effect": [["L95", "generic-consts"]],
"shadow-vu1": [
["L5", "vu-function"],
["L6", "shadow-vu1-gifbuf-template"]
],
"shrubbery": [["L133", "vu-function"]],
"credits": [
["L32", "(array int32)"],
["L33", "(array float)"]
],
"ambient": [
["L334", "vector2h"],
["L332", "vector2h"],
["L331", "vector2h"],
["L330", "vector2h"],
["L329", "vector2h"],
["L328", "vector2h"]
],
"sparticle-launcher": [["L193", "adgif-shader"]],
"load-boundary": [
["L328", "(inline-array lbvtx)", 12],
["L325", "vector"]
],
"cam-debug": [
["L172", "vector4w"],
["L173", "vector4w"],
["L174", "vector4w"],
["L175", "vector4w"],
["L176", "vector4w"],
["L207", "vector4w"],
["L208", "vector4w"],
["L209", "vector4w"],
["L210", "vector4w"],
["L211", "vector4w"],
["L212", "vector4w"],
["L213", "vector4w"],
["L214", "vector4w"],
["L215", "vector4w"],
["L216", "vector4w"],
["L217", "vector4w"],
["L218", "vector4w"],
["L219", "vector4w"],
["L220", "vector4w"],
["L221", "vector4w"],
["L222", "vector4w"],
["L223", "vector4w"],
["L224", "vector4w"],
["L225", "vector4w"],
["L226", "vector4w"],
["L227", "vector4w"],
["L228", "vector4w"],
["L229", "vector4w"],
["L230", "vector4w"],
["L231", "vector4w"],
["L232", "vector4w"],
["L237", "vector4w"],
["L238", "vector4w"],
["L239", "vector4w"],
["L240", "vector4w"],
["L241", "vector"],
["L242", "vector"],
["L243", "vector4w"],
["L244", "vector"],
["L245", "vector"],
["L252", "vector"],
["L253", "vector"],
["L254", "vector"],
["L255", "vector"],
["L261", "vector4w"]
],
"sequence-a-village1": [["L40", "vector"]],
"ogreboss": [
["L360", "attack-info"],
["L368", "attack-info"],
["L371", "attack-info"],
["L372", "attack-info"],
["L385", "float", true],
["L386", "float", true],
["L387", "float", true],
["L388", "float", true],
["L389", "float", true],
["L390", "float", true],
["L391", "float", true],
["L392", "float", true],
["L393", "float", true],
["L394", "float", true],
["L395", "float", true],
["L396", "float", true],
["L397", "float", true],
["L398", "float", true],
["L399", "float", true],
["L400", "float", true],
["L401", "float", true],
["L402", "float", true],
["L403", "float", true],
["L404", "float", true],
["L405", "float", true],
["L406", "float", true],
["L407", "float", true],
["L408", "float", true],
["L409", "float", true],
["L410", "float", true],
["L411", "float", true],
["L412", "float", true],
["L413", "float", true],
["L414", "float", true],
["L415", "float", true],
["L416", "float", true],
["L417", "float", true],
["L418", "float", true],
["L419", "float", true],
["L420", "float", true],
["L421", "float", true],
["L422", "float", true],
["L423", "float", true],
["L424", "float", true],
["L425", "float", true],
["L426", "float", true],
["L427", "float", true],
["L428", "float", true],
["L429", "float", true],
["L430", "float", true],
["L431", "float", true],
["L432", "float", true],
["L433", "float", true],
["L434", "float", true],
["L435", "float", true],
["L436", "float", true],
["L437", "float", true],
["L438", "float", true],
["L439", "float", true],
["L440", "float", true],
["L441", "float", true],
["L442", "float", true],
["L443", "float", true],
["L444", "float", true],
["L445", "float", true],
["L446", "float", true],
["L447", "float", true],
["L448", "float", true],
["L449", "float", true],
["L450", "float", true],
["L451", "float", true],
["L452", "float", true],
["L453", "float", true],
["L454", "float", true],
["L455", "float", true],
["L456", "float", true],
["L457", "float", true],
["L458", "float", true],
["L459", "float", true],
["L460", "float", true],
["L461", "float", true],
["L462", "rgba", true],
["L463", "uint64", true],
["L464", "uint64", true],
["L465", "uint64", true],
["L466", "uint64", true],
["L467", "uint64", true],
["L526", "float", true],
["L527", "uint64", true],
["L528", "uint64", true],
["L529", "uint64", true],
["L530", "uint64", true],
["L531", "uint64", true]
],
"flying-lurker": [
["L200", "attack-info"],
["L190", "vector"]
],
"target": [
["L728", "float", true],
["L729", "float", true],
["L730", "float", true],
["L731", "float", true],
["L732", "float", true],
["L733", "float", true],
["L734", "float", true],
["L735", "float", true],
["L736", "float", true],
["L737", "float", true],
["L738", "float", true],
["L739", "float", true],
["L740", "float", true],
["L741", "float", true],
["L742", "float", true],
["L743", "float", true],
["L744", "float", true],
["L745", "float", true],
["L746", "float", true],
["L747", "float", true],
["L748", "float", true],
["L749", "float", true],
["L750", "float", true],
["L751", "float", true],
["L752", "float", true],
["L753", "float", true],
["L754", "float", true],
["L755", "float", true],
["L756", "float", true],
["L757", "float", true],
["L758", "float", true],
["L759", "float", true],
["L760", "float", true],
["L761", "float", true],
["L762", "float", true],
["L763", "float", true],
["L764", "float", true],
["L765", "float", true],
["L766", "float", true],
["L767", "float", true],
["L768", "float", true],
["L769", "float", true],
["L770", "float", true],
["L771", "float", true],
["L772", "float", true],
["L773", "float", true],
["L774", "float", true],
["L775", "float", true],
["L776", "float", true],
["L777", "float", true],
["L778", "float", true],
["L779", "float", true],
["L780", "float", true],
["L781", "float", true],
["L782", "float", true],
["L783", "float", true],
["L784", "float", true],
["L785", "float", true],
["L786", "float", true],
["L787", "float", true],
["L788", "float", true],
["L789", "float", true],
["L790", "float", true],
["L791", "float", true],
["L792", "float", true],
["L793", "float", true],
["L794", "float", true],
["L795", "float", true],
["L796", "float", true],
["L797", "float", true],
["L798", "float", true],
["L799", "float", true],
["L800", "float", true],
["L801", "float", true],
["L802", "float", true],
["L803", "float", true],
["L804", "float", true],
["L805", "float", true],
["L806", "float", true],
["L807", "float", true],
["L808", "float", true],
["L809", "float", true],
["L810", "float", true],
["L811", "float", true],
["L812", "float", true],
["L813", "float", true],
["L814", "float", true],
["L815", "float", true],
["L816", "float", true],
["L817", "float", true],
["L818", "float", true],
["L819", "float", true],
["L820", "float", true],
["L821", "float", true],
["L822", "float", true],
["L823", "uint64", true],
["L824", "uint64", true]
],
"target2": [
["L615", "attack-info"],
["L656", "float", true],
["L657", "float", true],
["L658", "float", true],
["L659", "float", true],
["L660", "float", true],
["L661", "float", true],
["L662", "float", true],
["L663", "float", true],
["L664", "float", true],
["L665", "float", true],
["L666", "float", true],
["L667", "float", true],
["L668", "float", true],
["L669", "float", true],
["L670", "float", true],
["L671", "float", true],
["L672", "float", true],
["L673", "float", true],
["L674", "float", true],
["L675", "float", true],
["L676", "float", true],
["L677", "float", true],
["L678", "float", true],
["L679", "float", true],
["L680", "float", true],
["L681", "float", true],
["L682", "float", true],
["L683", "float", true],
["L684", "float", true],
["L685", "float", true],
["L686", "float", true],
["L687", "float", true],
["L688", "float", true],
["L689", "float", true],
["L690", "float", true],
["L691", "float", true],
["L692", "float", true],
["L693", "float", true],
["L694", "float", true],
["L695", "float", true],
["L696", "float", true],
["L697", "float", true],
["L698", "float", true],
["L699", "float", true],
["L700", "float", true],
["L701", "float", true],
["L702", "float", true],
["L703", "float", true],
["L704", "float", true],
["L705", "float", true],
["L706", "float", true],
["L707", "float", true],
["L708", "float", true],
["L709", "float", true],
["L710", "float", true],
["L711", "float", true],
["L712", "float", true],
["L713", "float", true],
["L714", "float", true],
["L715", "float", true],
["L716", "float", true],
["L717", "float", true],
["L718", "float", true],
["L719", "float", true],
["L720", "float", true],
["L721", "float", true],
["L722", "float", true],
["L723", "float", true],
["L724", "float", true],
["L725", "float", true],
["L726", "float", true],
["L727", "float", true],
["L728", "float", true],
["L729", "float", true],
["L730", "float", true],
["L731", "float", true],
["L732", "float", true],
["L733", "float", true],
["L734", "float", true],
["L735", "float", true],
["L736", "float", true],
["L737", "float", true],
["L738", "float", true],
["L739", "float", true],
["L740", "float", true],
["L741", "float", true],
["L742", "float", true],
["L743", "float", true],
["L744", "float", true],
["L745", "float", true],
["L746", "float", true],
["L747", "float", true],
["L748", "uint64", true],
["L759", "uint64", true]
],
"target-death": [
["L314", "vector"],
["L322", "float", true],
["L323", "float", true],
["L324", "float", true],
["L325", "float", true],
["L326", "float", true],
["L327", "float", true],
["L328", "float", true],
["L329", "float", true],
["L330", "float", true],
["L331", "float", true],
["L332", "float", true],
["L333", "float", true],
["L334", "float", true],
["L335", "float", true],
["L336", "float", true],
["L337", "float", true],
["L338", "float", true],
["L339", "float", true],
["L340", "float", true],
["L341", "float", true],
["L342", "float", true],
["L343", "float", true],
["L344", "float", true],
["L345", "float", true],
["L346", "float", true],
["L347", "float", true],
["L348", "float", true],
["L349", "float", true],
["L350", "uint64", true],
["L351", "uint64", true],
["L352", "uint64", true],
["L353", "uint64", true],
["L354", "uint64", true],
["L355", "uint64", true],
["L356", "uint64", true],
["L357", "uint64", true],
["L358", "uint64", true],
["L361", "float", true]
],
"progress": [
["L576", "vector"],
["L578", "vector"],
["L580", "vector"],
["L582", "vector"],
["L584", "vector"],
["L586", "vector"],
["L589", "float", true],
["L590", "float", true],
["L591", "float", true],
["L592", "float", true],
["L593", "float", true],
["L594", "float", true],
["L595", "float", true],
["L596", "float", true],
["L597", "float", true],
["L598", "float", true],
["L599", "float", true],
["L600", "float", true],
["L601", "float", true],
["L602", "float", true],
["L603", "float", true],
["L604", "float", true],
["L605", "float", true],
["L606", "float", true],
["L607", "float", true],
["L608", "float", true],
["L609", "float", true],
["L610", "float", true],
["L611", "float", true],
["L612", "float", true],
["L613", "float", true],
["L614", "float", true],
["L615", "float", true],
["L617", "float", true],
["L616", "float", true],
["L618", "float", true],
["L619", "float", true],
["L620", "float", true],
["L621", "float", true],
["L622", "float", true],
["L623", "float", true],
["L624", "float", true],
["L625", "float", true],
["L626", "float", true],
["L627", "float", true],
["L628", "float", true],
["L629", "float", true],
["L630", "float", true],
["L631", "float", true],
["L632", "float", true],
["L633", "float", true],
["L634", "float", true],
["L635", "float", true],
["L636", "float", true],
["L637", "float", true],
["L638", "float", true],
["L639", "uint64", true],
["L640", "uint64", true],
["L641", "uint64", true],
["L642", "uint64", true],
["L643", "uint64", true],
["L644", "uint64", true],
["L645", "uint64", true],
["L646", "uint64", true],
["L647", "uint64", true],
["L648", "uint64", true],
["L649", "uint64", true],
["L650", "uint64", true],
["L651", "uint64", true],
["L652", "uint64", true],
["L670", "uint64", true]
]
}
@@ -0,0 +1,28 @@
{
"(code target-title)": [
// [[23, 26], "v1", "handle"],
[[61, 69], "v1", "handle"],
[[73, 81], "v1", "handle"],
[218, "s5", "handle"]
],
"(method 10 gui-query)": [],
"(trans fisher-done)": [],
"(code target-duck-high-jump)": [[77, "v0", "sound-rpc-set-param"]],
"(trans target-duck-high-jump-jump)": [[9, "v0", "sound-rpc-set-param"]],
"(anon-function 11 target2)": [
[[15, 135], "s4", "target"] // confusing -- the parent of a target is a target?
],
"(code target-death)": [
[561, "v1", "art-joint-anim"],
[683, "v0", "int"],
[719, "v1", "process-drawable"],
[[985, 1063], "s5", "handle"]
],
"sound-set-fps": [[[3, 7], "v1", "sound-rpc-set-fps"]]
}
@@ -1,4 +1,4 @@
// TODO - this config file doesn't seem to match the others (missing many fields)
// TODO - this config file seems broken and doesn't match the others (missing many fields)
{
"game_version": 1,
-122
View File
@@ -1,122 +0,0 @@
{
"game_version": 1,
"text_version": 11,
"game_name": "jak1_jp",
"expected_elf_name": "SCPS_150.21",
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": [],
////////////////////////////
// CODE ANALYSIS OPTIONS
////////////////////////////
// set to true to generate plain .asm files with MIPS disassembly, with no fancy decompilation.
// this is fast and should succeed 100% of the time.
"disassemble_code": false,
// Run the decompiler
"decompile_code": false,
// run the first pass of the decompiler
"find_functions": true,
////////////////////////////
// DATA ANALYSIS OPTIONS
////////////////////////////
// set to true to generate plain .asm files for data files.
// this will display most data as hex, but will add labels/references/type pointers/strings
// this generates a huge amount of output if you run it on the entire game.
"disassemble_data": false,
// unpack textures to assets folder
"process_tpages": true,
// unpack game text to assets folder
"process_game_text": true,
// unpack game count to assets folder
"process_game_count": true,
// write goal imports for art groups
"process_art_groups": true,
// write out a json file containing the art info mapping, run this with all objects allowed
"dump_art_group_info": false,
///////////////////////////
// WEIRD OPTIONS
///////////////////////////
// these options are used rarely and should usually be left at false
// generate the symbol_map.json file.
// this is a guess at where each symbol is first defined/used.
"generate_symbol_definition_map": false,
// genreate the all-types file
"generate_all_types" : false,
// debug option for instruction decoder
"write_hex_near_instructions": false,
// experimental tool to extract linked lists used for region scripting in Jak 2 and Jak 3.
"write_scripts": false,
// hex dump of code/data files.
"hexdump_code": false,
"hexdump_data": false,
// dump raw obj files
"dump_objs": true,
// print control flow graph
"print_cfgs": false,
// set to true for PAL versions. this will forcefully skip files that have some data missing at the end.
"is_pal": false,
////////////////////////////
// CONFIG FILES
////////////////////////////
"type_casts_file": "decompiler/config/jak1_pal/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak1_ntsc_black_label/var_names.jsonc",
"label_types_file": "decompiler/config/jak1_jp/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak1_pal/hacks.jsonc",
"inputs_file": "decompiler/config/jak1_ntsc_black_label/inputs.jsonc",
"art_info_file": "decompiler/config/jak1_ntsc_black_label/art_info.jsonc",
"import_deps_file": "decompiler/config/jak1_ntsc_black_label/import_deps.jsonc",
"all_types_file": "decompiler/config/all-types.gc",
"art_group_dump_file": "decompiler/config/jak1_ntsc_black_label/art-group-info.min.json",
// optional: a predetermined object file name map from a file.
// this will make decompilation naming consistent even if you only run on some objects.
"obj_file_name_map_file": "goal_src/jak1/build/all_objs_jak1_jp.json",
////////////////////////////
// LEVEL EXTRACTION
////////////////////////////
// turn this on to extract level background graphics data
"levels_extract": true,
// turn this on if you want extracted levels to be saved out as .glb files
"rip_levels": false,
// should we extract collision meshes?
// these can be displayed in game, but makes the .fr3 files slightly larger
"extract_collision": true,
////////////////////////////
// PATCHING OPTIONS
////////////////////////////
// these are options related to xdelta3 patches on specific objects
// this allows us to get a more consistent input
// set to true to write new patch files
"write_patches": false,
// set to true to apply patch files
"apply_patches": true,
// what to patch an object to and the patch file is
"object_patches": {
}
}
File diff suppressed because it is too large Load Diff
-122
View File
@@ -1,122 +0,0 @@
{
"game_version": 1,
"text_version": 11,
"game_name": "jak1_pal",
"expected_elf_name": "SCES_503.61",
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": [],
////////////////////////////
// CODE ANALYSIS OPTIONS
////////////////////////////
// set to true to generate plain .asm files with MIPS disassembly, with no fancy decompilation.
// this is fast and should succeed 100% of the time.
"disassemble_code": false,
// Run the decompiler
"decompile_code": false,
// run the first pass of the decompiler
"find_functions": true,
////////////////////////////
// DATA ANALYSIS OPTIONS
////////////////////////////
// set to true to generate plain .asm files for data files.
// this will display most data as hex, but will add labels/references/type pointers/strings
// this generates a huge amount of output if you run it on the entire game.
"disassemble_data": false,
// unpack textures to assets folder
"process_tpages": true,
// unpack game text to assets folder
"process_game_text": true,
// unpack game count to assets folder
"process_game_count": true,
// write goal imports for art groups
"process_art_groups": true,
// write out a json file containing the art info mapping, run this with all objects allowed
"dump_art_group_info": false,
///////////////////////////
// WEIRD OPTIONS
///////////////////////////
// these options are used rarely and should usually be left at false
// generate the symbol_map.json file.
// this is a guess at where each symbol is first defined/used.
"generate_symbol_definition_map": false,
// genreate the all-types file
"generate_all_types" : false,
// debug option for instruction decoder
"write_hex_near_instructions": false,
// experimental tool to extract linked lists used for region scripting in Jak 2 and Jak 3.
"write_scripts": false,
// hex dump of code/data files.
"hexdump_code": false,
"hexdump_data": false,
// dump raw obj files
"dump_objs": true,
// print control flow graph
"print_cfgs": false,
// set to true for PAL versions. this will forcefully skip files that have some data missing at the end.
"is_pal": true,
////////////////////////////
// CONFIG FILES
////////////////////////////
"type_casts_file": "decompiler/config/jak1_pal/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak1_ntsc_black_label/var_names.jsonc",
"label_types_file": "decompiler/config/jak1_pal/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak1_pal/hacks.jsonc",
"inputs_file": "decompiler/config/jak1_ntsc_black_label/inputs.jsonc",
"art_info_file": "decompiler/config/jak1_ntsc_black_label/art_info.jsonc",
"import_deps_file": "decompiler/config/jak1_ntsc_black_label/import_deps.jsonc",
"all_types_file": "decompiler/config/all-types.gc",
"art_group_dump_file": "decompiler/config/jak1_ntsc_black_label/art-group-info.min.json",
// optional: a predetermined object file name map from a file.
// this will make decompilation naming consistent even if you only run on some objects.
"obj_file_name_map_file": "goal_src/jak1/build/all_objs_jak1_pal.json",
////////////////////////////
// LEVEL EXTRACTION
////////////////////////////
// turn this on to extract level background graphics data
"levels_extract": true,
// turn this on if you want extracted levels to be saved out as .obj files
"rip_levels": false,
// should we extract collision meshes?
// these can be displayed in game, but makes the .fr3 files slightly larger
"extract_collision": true,
////////////////////////////
// PATCHING OPTIONS
////////////////////////////
// these are options related to xdelta3 patches on specific objects
// this allows us to get a more consistent input
// set to true to write new patch files
"write_patches": false,
// set to true to apply patch files
"apply_patches": true,
// what to patch an object to and the patch file is
"object_patches": {
}
}
-676
View File
@@ -1,676 +0,0 @@
{
////////////////////////////
// HACKS and ASM FUNCTIONS
////////////////////////////
"types_with_bad_inspect_methods": [
"engine",
"bsp-header",
"joint-anim-matrix",
"part-tracker"
],
"no_type_analysis_functions_by_name": [],
// this limits the number of cases in a cond. The first argument is the name of the function.
// the second argument is the name of the first condition in the cond. Use print_cfg to find it out.
// The third argument is the number of cases. If you set it too small it may fail to build the CFG.
"cond_with_else_max_lengths": [
["(method 20 res-lump)", "b0", 2],
["(method 11 res-lump)", "b0", 1],
["(method 12 res-lump)", "b0", 1],
["(method 31 progress)", "b35", 1]
],
// if a cond with an else case is being used a value in a place where it looks wrong
// you can add the function name to this list and it will more aggressively reject this rewrite.
"aggressively_reject_cond_to_value_rewrite": [
"(method 10 res-lump)",
"(method 11 res-lump)",
"(method 12 res-lump)",
"(method 7 texture-page)"
],
// this provides a hint to the decompiler that these functions will have a lot of inline assembly.
// currently it just leaves pcpyld as an asm op.
"hint_inline_assembly_functions": ["matrix-transpose!"],
"asm_functions_by_name": [
// gcommon
"quad-copy!",
// gkernel
"(method 11 cpu-thread)",
"throw",
"return-from-thread",
"return-from-thread-dead",
"reset-and-call",
"(method 10 cpu-thread)",
"(method 0 catch-frame)",
"throw-dispatch",
"set-to-run-bootstrap",
"run-function-in-process", // not asm, but it uses the stack.
// pskernel
"return-from-exception", // F: eret
"kernel-read-function", // F: delay slot tricks
"kernel-write-function", // F: delay slot tricks
"kernel-copy-function",
"kernel-check-hardwired-addresses",
// math
"rand-uint31-gen",
// bounding box
"(method 9 bounding-box)", // F: asm branching
"(method 14 bounding-box)",
// matrix
"(method 9 matrix)", // F: asm branching
"matrix-axis-sin-cos!", // F: asm branching
"matrix-axis-sin-cos-vu!",
// geometry
"circle-circle-xz-intersect", // F: asm branching
// trigonometry
"exp", // BUG: cfg is wrong.
"atan0", // P: manual use of stack
"sincos!", // P: manual use of stack
"sincos-rad!",
// dma-h
"dma-count-until-done", // F: asm branching
"dma-sync-with-count", // F: asm branching
"dma-send-no-scratch", // F: asm branching
"dma-sync-fast",
// dma
"symlink3", // F: asm branching
"symlink2", // F: asm branching
"dma-sync-hang",
// display
"vblank-handler", // F: weird asm for interrupt handler
"vif1-handler", // F: weird asm for interrupt handler
"vif1-handler-debug",
// texture
"adgif-shader<-texture!",
// vector
"vector=", // asm branching
// collide-mesh-h
"(method 11 collide-mesh-cache)",
// collide-func
"moving-sphere-triangle-intersect", // P: weird branching
"collide-do-primitives", // P: asm branching
// joint
"calc-animation-from-spr", // F: asm branching
"decompress-frame-data-pair-to-accumulator", // P: asm calling
"decompress-frame-data-to-accumulator", // P: asm calling
"decompress-fixed-data-to-accumulator", // P: asm calling
"normalize-frame-quaternions", // F: asm branching, return
"clear-frame-accumulator", // F: asm branching
"cspace<-parented-transformq-joint!",
// sprite
// merc-blend-shape
"setup-blerc-chains-for-one-fragment", // F: asm branching
"merc-dma-chain-to-spr", // F: asm branching
"blerc-a-fragment",
// ripple
"ripple-matrix-scale",
"ripple-apply-wave-table",
"ripple-create-wave-table",
"ripple-execute-init",
// bones
"bones-mtx-calc",
// generic-effect
"generic-debug-light-proc",
"generic-none-dma-wait",
"generic-copy-vtx-dclr-dtex",
"generic-light",
"generic-envmap-only-proc",
"generic-no-light",
"generic-no-light+envmap",
"generic-no-light-dproc-only",
"generic-no-light-proc",
"generic-prepare-dma-single",
"generic-prepare-dma-double",
"generic-envmap-proc",
"generic-light-proc",
"generic-dma-from-spr",
"upload-vu0-program",
// generic-merc
"generic-merc-execute-asm", // CFG
"high-speed-reject",
"mercneric-convert",
"mercneric-bittable-asm",
"mercneric-shader-asm",
"mercneric-matrix-asm",
"generic-merc-init-asm",
// generic-tie
"generic-tie-convert-proc",
"generic-tie-upload-next",
"generic-tie-decompress",
// shadow-cpu
"shadow-add-double-edges",
"shadow-add-double-tris",
"shadow-add-single-edges",
"shadow-add-facing-single-tris",
"shadow-add-verts",
"shadow-find-double-edges",
"shadow-find-facing-double-tris",
"shadow-find-single-edges",
"shadow-find-facing-single-tris",
"shadow-scissor-top",
"shadow-scissor-edges",
"shadow-calc-dual-verts",
// background
"background-upload-vu0",
// draw-node
"draw-node-cull",
// shrubbery
"draw-inline-array-instance-shrub", // CFG
// tfrag
"stats-tfrag-asm",
"draw-inline-array-tfrag-near",
"draw-inline-array-tfrag",
// tie-methods
"draw-inline-array-prototype-tie-near-asm",
"draw-inline-array-prototype-tie-asm",
// sparticle-launcher
"sp-init-fields!",
// sparticle
"memcpy",
"sp-process-block-3d",
"sp-process-block-2d",
"sp-launch-particles-var",
"particle-adgif",
"sp-init-fields!",
// time-of-day
"time-of-day-interp-colors-scratch",
"time-of-day-interp-colors",
// sky-tng
"clip-polygon-against-negative-hyperplane",
"clip-polygon-against-positive-hyperplane",
"draw-large-polygon",
// load-boundary
"render-boundary-tri",
"render-boundary-quad",
"draw-boundary-polygon",
// collide-probe
"collide-probe-instance-tie", // CFG
"collide-probe-node", // CFG
// collide-edge-grab
"(method 15 collide-edge-work)", // CFG
"(method 12 collide-mesh)",
// process-drawable BUG
"cspace-inspect-tree",
//"(method 19 process-drawable)",
// ambient
"ambient-inspect",
// target2 BUG
"look-for-points-of-interest", // Failed to split nested sc - looks like dead code to me
// collide-cache
"(method 10 collide-puss-work)", // CFG
"(method 9 collide-puss-work)", // decompiler crash
"(method 32 collide-cache)", // CFG
// ocean
"draw-large-polygon-ocean", // CFG
// ocean-vu0
"ocean-generate-verts", // crash
"ocean-interp-wave"
],
// these functions use pairs and the decompiler
// will be less picky about types related to pairs.
"pair_functions_by_name": [
"ref",
"last",
"member",
"nmember",
"assoc",
"assoce",
"append!",
"delete!",
"delete-car!",
"insert-cons!",
"sort",
"unload-package",
"(method 4 pair)",
"nassoc",
"nassoce",
"lookup-level-info",
"(method 21 level-group)",
"(method 12 level)",
"update-sound-banks",
"(method 16 level-group)",
"bg",
"(method 18 game-info)",
"debug-menu-context-default-selection",
"debug-menu-rebuild",
"debug-menu-func-decode",
"debug-menu-make-from-template",
"debug-menu-render",
"debug-menu-context-select-next-or-prev-item",
"debug-menu-context-select-new-item",
"debug-menu-send-msg",
"debug-menu-find-from-template",
"build-continue-menu",
"(method 8 process-tree)",
"(method 16 load-state)",
"(method 15 load-state)",
"build-continue-menu",
"entity-remap-names",
"(method 21 swamp-rat-nest-dummy-a)",
"(method 21 swamp-rat-nest-dummy-b)",
"(method 21 swamp-rat-nest-dummy-c)",
"(method 27 battlecontroller)",
"load-boundary-from-template",
"command-get-time",
"command-get-param",
"command-get-quoted-param",
"command-get-trans",
"command-get-camera",
"(method 14 camera-tracker)",
"(enter billy-playing)",
"(code target-continue)",
"next-level"
],
// If format is used with the wrong number of arguments,
// it will often mess up the decompilation, as the decompiler assumes
// that they used the correct number. This will override the decompiler's
// automatic detection.
"bad_format_strings": {
"ERROR: dma tag has data in reserved bits ~X~%": 0,
"#<surface f0:~m f1:~f tf+:~f tf-:~f sf:~f tvv:~m": 5,
"ERROR<GMJ>: value of symbol ~A in task-controls is not a task-control~%": 0,
"~0K~10,'-S--~5,'-DK-of-~5,'-DK--~5,'-DK-of-~5,'-DK--": 5,
" bsp ~192H~5DK ~280Hdebug~456H~5DK~%": 2,
" bsp-leaf-vis-iop ~192H~5DK~%": 1,
" bsp-leaf-vis-adj ~192H~5DK~%": 1,
" level-code ~192H~5DK~%": 1,
" tfrag ~192H~5DK ~280Htfragment~456H~5DK~%": 2,
" tie-proto ~192H~5DK ~280Hsky~456H~5DK~%": 2,
" tie-instance ~192H~5DK ~280Htie-fragment~456H~5DK~%": 2,
" shrub-proto ~192H~5DK ~280Htie-near~456H~5DK~%": 2,
" shrub-instance ~192H~5DK ~280Hshrubbery~456H~5DK~%": 2,
" collision ~192H~5DK ~280Htie-generic~456H~5DK~%": 2,
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%": 2,
" pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%": 2,
" textures ~192H~5DK ~280Htextures~456H~5DK~%": 2,
" entity ~192H~5DK~%": 1,
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2,
"ERROR: <asg> ~A in spool anim loop for ~A ~D, but not loaded.~": 3,
"~0k~5d/~d ~6d/~d ~6d/~d ": 6,
"~0k~s~%": 1,
"money ~A was killed in pickup~%": 0,
" id address name aid tsk lev status x y z address name state heap flags~%": 3
},
"blocks_ending_in_asm_branch": {
"closest-pt-in-triangle": [17],
// this one is all asm branches
"circle-circle-xz-intersect": [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
],
"find-knot-span": [0, 1, 2, 3, 5, 6, 7, 8, 9],
"curve-evaluate!": [0, 2, 5, 6, 7, 8, 9],
"(method 9 texture-page-dir)": [4, 5],
"adgif-shader<-texture-with-update!": [0, 1],
"display-loop": [44, 49, 66, 99],
"load-game-text-info": [12, 13, 14, 16, 17, 18],
"real-main-draw-hook": [75, 77],
"(method 12 perf-stat)": [0],
"(method 11 perf-stat)": [0],
"raw-ray-sphere-intersect": [0, 1, 2, 3, 4, 5],
"ray-cylinder-intersect": [0, 1, 2, 3, 4, 5],
"ray-triangle-intersect": [0, 1, 2, 3, 4],
"bsp-camera-asm": [1, 2, 3],
"level-remap-texture": [2, 3, 4, 5, 6],
"start-perf-stat-collection": [26],
"end-perf-stat-collection": [0],
"sprite-draw-distorters": [4, 5],
"draw-string": [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
185, 186, 187, 188, 189
],
"get-string-length": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
],
"unpack-comp-rle": [1, 3, 5, 6],
"(method 16 level)": [1, 5, 13, 14, 15, 19, 26, 53],
"unpack-comp-huf": [2, 4, 5, 6, 7, 8, 9],
"blerc-execute": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33
],
"(method 11 fact-info-target)": [42],
"(anon-function 9 game-save)": [3, 4, 5, 6, 7, 8, 10],
//"(anon-function 9 game-save)":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
"particle-adgif": [0, 1, 2, 3, 4, 5, 7],
"sp-launch-particles-var": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66
],
"(method 11 sparticle-launch-control)": [27, 28, 38, 49, 51, 52, 80],
"upload-vis-bits": [0, 1, 2, 3, 4, 5, 6],
"draw-drawable-tree-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-trans-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-dirt-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-ice-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-instance-tie": [10, 12, 18, 20, 26, 28, 37, 39],
"draw-drawable-tree-instance-shrub": [5, 7, 9, 11],
"birth-pickup-at-point": [0],
"draw-bones": [0, 1, 2, 8, 81],
"draw-bones-hud": [7, 8],
"(method 16 drawable-tree)": [7, 9, 10],
"(method 21 collide-cache)": [3, 5, 19, 20, 24, 25, 28, 29],
"(method 14 collide-cache)": [0, 1, 2, 3, 4, 5],
"(method 9 collide-mesh-cache)": [0, 1, 2, 5],
"(method 42 collide-shape)": [0, 1, 2, 3, 4, 7],
"(method 23 collide-shape-prim-group)": [1, 2, 3, 4, 5],
"(method 23 collide-shape-prim-mesh)": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
],
"(method 23 collide-shape-prim-sphere)": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
],
"(method 18 collide-shape-prim-sphere)": [1, 3, 4, 5, 7],
"(method 45 collide-shape)": [0, 16, 42, 67, 92],
"(method 24 collide-shape-prim)": [2, 3, 4, 5, 1],
"(method 20 collide-shape-prim-group)": [11],
"(method 28 collide-shape-prim-mesh)": [10],
"(method 40 collide-shape)": [0, 2, 5, 6, 7, 11, 12, 28, 43, 58, 63],
"(method 15 collide-shape-prim-group)": [1, 2, 3, 4, 5, 6],
"(method 16 collide-shape-prim)": [1, 2, 3, 4, 5, 6],
"(method 15 collide-shape-prim-sphere)": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
],
"(method 15 collide-shape-prim-mesh)": [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 29
],
"(method 35 collide-shape)": [1],
"(method 22 collide-cache)": [2, 3, 4, 13, 14, 15, 23, 24, 25, 33, 34, 35],
"(method 12 collide-shape-prim-sphere)": [0, 1],
"(method 12 collide-shape-prim-group)": [1, 2, 3, 4],
"(method 24 collide-cache)": [2, 3, 4, 13, 14, 15, 23, 24, 25, 33, 34, 35],
"(method 14 collide-shape-prim-sphere)": [0, 1, 2, 3],
"(method 14 collide-shape-prim-group)": [0, 1, 2, 3, 4],
"(method 23 collide-cache)": [2, 3, 4, 13, 14, 15, 23, 24, 25, 33, 34, 35],
"(method 13 collide-shape-prim-sphere)": [0, 1, 2],
"(method 13 collide-shape-prim-group)": [0, 1, 2, 3, 4],
"(method 19 collide-cache)": [0, 1, 3, 4, 5, 18, 19],
"(method 10 collide-mesh)": [1, 2, 4, 5],
"(method 19 process-drawable)": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
"(anon-function 9 racer)": [75],
"(method 13 collide-edge-work)": [0, 2],
"(method 17 collide-edge-work)": [0, 1, 2, 3, 4],
"(method 9 edge-grab-info)": [15, 16, 18, 19, 21, 22, 24],
// "(method 18 collide-edge-work)" : [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24],
"target-falling-anim-trans": [5, 6],
"(method 27 nav-mesh)": [8],
"(method 32 nav-control)": [12, 21, 32],
"start-collect-nav": [0],
"end-collect-nav": [0],
"robotboss-always-trans": [9, 10, 11, 12, 13, 14, 15, 18, 29, 36, 45, 48],
"target-flut-falling-anim-trans": [5, 6],
"(method 27 ropebridge)": [5, 7],
"(anon-function 5 orbit-plat)": [4, 5, 11],
"(anon-function 21 plant-boss)": [0, 1, 3, 4],
"(method 55 ram-boss)": [5],
"(method 60 ice-cube)": [8],
"(anon-function 2 snow-ball)": [22],
"draw-bones-merc": [1, 3, 5, 7, 8, 10, 11, 12, 13],
"(anon-function 48 lavatube-energy)": [13],
"generic-tie-execute": [4, 9],
"generic-merc-execute-all": [3, 7, 12]
},
// Sometimes the game might use format strings that are fetched dynamically,
// for example using the game text lookup method
// Add information about those format instructions here.
// e.g. "function-name":[[op, argc], [op, argc], ...]
// where "op" is the op number for the call to format.
"dynamic_format_arg_counts": {
"(method 35 progress)": [
[44, 1],
[92, 1]
],
"(method 49 progress)": [[35, 1]],
"(method 37 progress)": [[41, 1]],
"(method 38 progress)": [[106, 1]],
"(method 39 progress)": [
[56, 1],
[83, 1]
],
"(method 41 progress)": [[73, 1]],
"(method 42 progress)": [[41, 1]],
"(method 43 progress)": [
[51, 1],
[94, 1]
]
},
"mips2c_functions_by_name": [
"sp-init-fields!",
"particle-adgif",
"sp-launch-particles-var",
"sp-process-block-2d",
"sp-process-block-3d",
"draw-large-polygon",
"clip-polygon-against-positive-hyperplane",
"clip-polygon-against-negative-hyperplane",
"render-sky-quad",
"render-sky-tri",
"init-sky-regs",
"set-tex-offset",
"adgif-shader<-texture-with-update!",
"init-boundary-regs",
"draw-boundary-polygon",
"render-boundary-quad",
"render-boundary-tri",
"draw-inline-array-tfrag",
"stats-tfrag-asm",
"time-of-day-interp-colors-scratch",
"normalize-frame-quaternions",
"collide-do-primitives",
"moving-sphere-triangle-intersect",
"(method 12 collide-mesh)",
"(method 11 collide-mesh)",
"collide-probe-node",
"collide-probe-instance-tie",
"(method 32 collide-cache)",
"(method 28 collide-cache)",
"(method 26 collide-cache)",
"(method 27 collide-cache)",
"(method 29 collide-cache)",
"(method 12 collide-shape-prim-mesh)",
"(method 14 collide-shape-prim-mesh)",
"(method 13 collide-shape-prim-mesh)",
"(method 30 collide-cache)",
"(method 9 collide-cache-prim)",
"(method 10 collide-cache-prim)",
"(method 9 collide-puss-work)",
"(method 10 collide-puss-work)",
// these could easily be goal, but probably faster/easier this way.
"(method 14 collide-mesh)",
"(method 15 collide-mesh)",
"(method 16 collide-edge-work)",
"(method 10 collide-edge-hold-list)",
"(method 15 collide-edge-work)",
"(method 18 collide-edge-work)",
"normalize-frame-quaternions",
"calc-animation-from-spr",
"clear-frame-accumulator",
"bones-mtx-calc",
"cspace<-parented-transformq-joint!",
"draw-bones-merc",
"draw-bones-check-longest-edge-asm",
"setup-blerc-chains-for-one-fragment",
"blerc-execute",
"generic-merc-execute-asm",
"high-speed-reject",
"mercneric-convert",
"mercneric-bittable-asm",
"mercneric-shader-asm",
"mercneric-matrix-asm",
"generic-merc-init-asm",
"generic-prepare-dma-double",
"generic-light-proc",
"generic-envmap-proc",
"draw-bones-generic-merc",
"generic-prepare-dma-single",
"ripple-matrix-scale",
"ripple-apply-wave-table",
"ripple-create-wave-table",
"ripple-execute-init",
// ocean
"init-ocean-far-regs",
"draw-large-polygon-ocean",
"render-ocean-quad",
"ocean-generate-verts",
"ocean-interp-wave",
// shadow
"shadow-execute",
"shadow-add-double-edges",
"shadow-add-double-tris",
"shadow-add-single-edges",
"shadow-add-facing-single-tris",
"shadow-add-verts",
"shadow-find-double-edges",
"shadow-find-facing-double-tris",
"shadow-find-single-edges",
"shadow-find-facing-single-tris",
"shadow-init-vars",
"shadow-scissor-top",
"shadow-scissor-edges",
"shadow-calc-dual-verts",
"shadow-xform-verts",
// generic tie
"draw-inline-array-instance-tie",
"generic-tie-dma-to-spad-sync",
"draw-inline-array-prototype-tie-generic-asm",
"generic-interp-dproc",
"generic-no-light-dproc",
"generic-envmap-dproc",
"generic-tie-convert"
],
"mips2c_jump_table_functions": {
"decompress-fixed-data-to-accumulator": [
108, 199, 233, 286, 301, 366, 387, 100, 155, 199, 261, 286, 335, 366, 402,
100
],
"decompress-frame-data-to-accumulator": [
84, 92, 119, 140, 205, 220, 273, 307, 84, 107, 119, 174, 205, 248, 273,
354
],
"decompress-frame-data-pair-to-accumulator": [
117, 125, 169, 197, 293, 318, 408, 459, 117, 150, 169, 248, 293, 366, 408,
533
]
},
// there are some missing textures. I don't know what the game actually does here.
// the format for entries is [level, tpage, index]
"missing_textures": [["finalboss", 1419, 3]],
// some object files have garbage pad data at the end which makes the decompiler
// assume they must be different files, such as the art group for orb-cache-top.
// this just suppresses a message.
"expected_merged_objs": [
"orb-cache-top-ag",
"ecovalve-ag",
"barrel-ag",
"sack-ag",
"sharkey-ag",
"warp-gate-switch-ag",
"baby-spider-ag",
"cavetrapdoor-ag",
"spider-egg-ag",
"darkvine-ag",
"jng-iris-door-ag",
"eichar-fish+0-ag",
"launcherdoor-ag",
"plat-eco-ag",
"eichar-tube+0-ag",
"eichar-pole+0-ag",
"crate-darkeco-cluster-ag",
"ef-plane-ag",
"racer-ag",
"flut-saddle-ag",
"shover-ag",
"steam-cap-ag",
"sunkencam-ag",
"swampcam-ag",
"pontoonfive-ag",
"oracle-ag",
"village-cam-ag",
"plat-ag"
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-122
View File
@@ -1,122 +0,0 @@
{
"game_version": 1,
"text_version": 11,
"game_name": "jak1_us2",
"expected_elf_name": "SCUS_971.24",
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": [],
////////////////////////////
// CODE ANALYSIS OPTIONS
////////////////////////////
// set to true to generate plain .asm files with MIPS disassembly, with no fancy decompilation.
// this is fast and should succeed 100% of the time.
"disassemble_code": false,
// Run the decompiler
"decompile_code": false,
// run the first pass of the decompiler
"find_functions": true,
////////////////////////////
// DATA ANALYSIS OPTIONS
////////////////////////////
// set to true to generate plain .asm files for data files.
// this will display most data as hex, but will add labels/references/type pointers/strings
// this generates a huge amount of output if you run it on the entire game.
"disassemble_data": false,
// unpack textures to assets folder
"process_tpages": true,
// unpack game text to assets folder
"process_game_text": true,
// unpack game count to assets folder
"process_game_count": true,
// write goal imports for art groups
"process_art_groups": true,
// write out a json file containing the art info mapping, run this with all objects allowed
"dump_art_group_info": false,
///////////////////////////
// WEIRD OPTIONS
///////////////////////////
// these options are used rarely and should usually be left at false
// generate the symbol_map.json file.
// this is a guess at where each symbol is first defined/used.
"generate_symbol_definition_map": false,
// genreate the all-types file
"generate_all_types" : false,
// debug option for instruction decoder
"write_hex_near_instructions": false,
// experimental tool to extract linked lists used for region scripting in Jak 2 and Jak 3.
"write_scripts": false,
// hex dump of code/data files.
"hexdump_code": false,
"hexdump_data": false,
// dump raw obj files
"dump_objs": true,
// print control flow graph
"print_cfgs": false,
// set to true for PAL versions. this will forcefully skip files that have some data missing at the end.
"is_pal": false,
////////////////////////////
// CONFIG FILES
////////////////////////////
"type_casts_file": "decompiler/config/jak1_pal/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak1_ntsc_black_label/var_names.jsonc",
"label_types_file": "decompiler/config/jak1_jp/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak1_pal/hacks.jsonc",
"inputs_file": "decompiler/config/jak1_ntsc_black_label/inputs.jsonc",
"art_info_file": "decompiler/config/jak1_ntsc_black_label/art_info.jsonc",
"import_deps_file": "decompiler/config/jak1_ntsc_black_label/import_deps.jsonc",
"all_types_file": "decompiler/config/all-types.gc",
"art_group_dump_file": "decompiler/config/jak1_ntsc_black_label/art-group-info.min.json",
// optional: a predetermined object file name map from a file.
// this will make decompilation naming consistent even if you only run on some objects.
"obj_file_name_map_file": "goal_src/jak1/build/all_objs_jak1_jp.json",
////////////////////////////
// LEVEL EXTRACTION
////////////////////////////
// turn this on to extract level background graphics data
"levels_extract": true,
// turn this on if you want extracted levels to be saved out as .obj files
"rip_levels": false,
// should we extract collision meshes?
// these can be displayed in game, but makes the .fr3 files slightly larger
"extract_collision": true,
////////////////////////////
// PATCHING OPTIONS
////////////////////////////
// these are options related to xdelta3 patches on specific objects
// this allows us to get a more consistent input
// set to true to write new patch files
"write_patches": false,
// set to true to apply patch files
"apply_patches": true,
// what to patch an object to and the patch file is
"object_patches": {
}
}
@@ -54,7 +54,7 @@
"generate_symbol_definition_map": false,
// genreate the all-types file
"generate_all_types" : false,
"generate_all_types": false,
// debug option for instruction decoder
"write_hex_near_instructions": false,
@@ -74,24 +74,23 @@
"is_pal": false,
// jak 1's all-types, used to generate "hints"
"old_all_types_file": "decompiler/config/all-types.gc",
"old_all_types_file": "decompiler/config/jak1/all-types.gc",
////////////////////////////
// CONFIG FILES
////////////////////////////
"type_casts_file": "decompiler/config/jak2/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak2/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak2/var_names.jsonc",
"label_types_file": "decompiler/config/jak2/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak2/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak2/hacks.jsonc",
"inputs_file": "decompiler/config/jak2/inputs.jsonc",
"art_info_file": "decompiler/config/jak2/art_info.jsonc",
"import_deps_file": "decompiler/config/jak2/import_deps.jsonc",
"type_casts_file": "decompiler/config/jak2/ntsc_v1/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak2/ntsc_v1/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak2/ntsc_v1/var_names.jsonc",
"label_types_file": "decompiler/config/jak2/ntsc_v1/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak2/ntsc_v1/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak2/ntsc_v1/hacks.jsonc",
"inputs_file": "decompiler/config/jak2/ntsc_v1/inputs.jsonc",
"art_info_file": "decompiler/config/jak2/ntsc_v1/art_info.jsonc",
"import_deps_file": "decompiler/config/jak2/ntsc_v1/import_deps.jsonc",
"all_types_file": "decompiler/config/jak2/all-types.gc",
"art_group_dump_file": "decompiler/config/jak2/art-group-info.min.json",
"art_group_dump_file": "decompiler/config/jak2/ntsc_v1/art-group-info.min.json",
// optional: a predetermined object file name map from a file.
// this will make decompilation naming consistent even if you only run on some objects.
@@ -121,6 +120,5 @@
// set to true to apply patch files
"apply_patches": true,
// what to patch an object to and what the patch file is
"object_patches": {
}
"object_patches": {}
}
+7 -5
View File
@@ -55,7 +55,7 @@ struct ISOMetadata {
int region; // territory code
int num_files;
uint64_t contents_hash;
std::string decomp_config;
std::string decomp_config_version;
std::string game_name;
std::vector<std::string> flags;
};
@@ -96,10 +96,12 @@ static const ISOMetadata jak1_ntsc_black_label_info = {
GAME_TERRITORY_SCEA,
337,
11363853835861842434U,
"jak1_ntsc_black_label",
"ntsc_v1",
"jak1",
{"jak1-black-label"}};
// TODO - we don't detect or handle ntsc_v2?
// { SERIAL : { ELF_HASH : ISOMetadataDatabase } }
static const std::unordered_map<std::string, std::unordered_map<uint64_t, ISOMetadata>> isoDatabase{
{"SCUS-97124",
@@ -109,7 +111,7 @@ static const std::unordered_map<std::string, std::unordered_map<uint64_t, ISOMet
GAME_TERRITORY_SCEA,
338,
8538304367812415885U,
"jak1_jp",
"ntsc_v2",
"jak1",
{}}}}},
{"SCES-50361",
@@ -118,7 +120,7 @@ static const std::unordered_map<std::string, std::unordered_map<uint64_t, ISOMet
GAME_TERRITORY_SCEE,
338,
16850370297611763875U,
"jak1_pal",
"pal",
"jak1",
{}}}}},
{"SCPS-15021",
@@ -127,7 +129,7 @@ static const std::unordered_map<std::string, std::unordered_map<uint64_t, ISOMet
GAME_TERRITORY_SCEI,
338,
1262350561338887717,
"jak1_jp",
"jp",
"jak1",
{}}}}}};
+5 -4
View File
@@ -77,7 +77,7 @@ std::tuple<std::optional<ISOMetadata>, ExtractorErrorCode> validate(
lg::info("\tDetected - {}", version_info.canonical_name);
lg::info("\tRegion - {}", get_territory_name(version_info.region));
lg::info("\tSerial - {}", dbEntry->first);
lg::info("\tUses Decompiler Config - {}", version_info.decomp_config);
lg::info("\tUses Decompiler Config Version - {}", version_info.decomp_config_version);
// - Number of Files
if (version_info.num_files != expected_num_files) {
@@ -104,9 +104,10 @@ void decompile(const fs::path& iso_data_path, const std::string& data_subfolder)
// Determine which config to use from the database
const auto version_info = get_version_info_or_default(iso_data_path);
Config config = read_config_file((file_util::get_jak_project_dir() / "decompiler" / "config" /
fmt::format("{}.jsonc", version_info.decomp_config))
.string());
Config config = read_config_file(file_util::get_jak_project_dir() / "decompiler" / "config" /
version_info.game_name /
fmt::format("{}_config.jsonc", version_info.game_name),
version_info.decomp_config_version);
std::vector<fs::path> dgos, objs;
+7 -2
View File
@@ -44,12 +44,13 @@ int main(int argc, char** argv) {
fs::path in_folder;
fs::path out_folder;
std::string config_game_version = "";
std::string config_override = "{}";
CLI::App app{"OpenGOAL Decompiler"};
app.add_option("config-path", config_path,
"Path to the decompiler config .jsonc file. ie. "
"./decompiler/config/jak1_ntsc_black_label.jsonc")
"./decompiler/config/jak1/jak1_config.jsonc")
->required();
app.add_option("in-folder", in_folder,
"The path containing the iso_data folders. ie. ./iso_data/. Assumes the "
@@ -59,6 +60,10 @@ int main(int argc, char** argv) {
"The path for where the decompiler should place it's outputs. Assumes the "
"'gameName' from the config as a sub-directory")
->required();
app.add_option("--version", config_game_version,
"The name of the game version to update the config with, ie. ntsc_v2")
->required();
app.add_option("--config-override", config_override,
"JSON provided will be merged with the specified config, use to override options");
app.validate_positionals();
@@ -69,7 +74,7 @@ int main(int argc, char** argv) {
Config config;
try {
config = read_config_file(config_path, config_override);
config = read_config_file(config_path, config_game_version, config_override);
} catch (const std::exception& e) {
lg::error("Failed to parse config: {}", e.what());
return 1;
+1 -1
View File
@@ -63,7 +63,7 @@
(defmacro tc ()
"Typecheck against the all-types file"
`(m "decompiler/config/all-types.gc")
`(m "decompiler/config/jak1/all-types.gc")
)
(defmacro e ()
+1 -1
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak1_ntsc_black_label.jsonc iso_data decompiler_out\
out\build\Release\bin\decompiler decompiler\config\jak1\jak1_config.jsonc iso_data decompiler_out\ --version ntsc_v1
pause
+1 -1
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak1_jp.jsonc iso_data decompiler_out\
out\build\Release\bin\decompiler decompiler\config\jak1\jak1_config.jsonc iso_data decompiler_out\ --version jp
pause
+1 -1
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak1_pal.jsonc iso_data decompiler_out\
out\build\Release\bin\decompiler decompiler\config\jak1\jak1_config.jsonc iso_data decompiler_out\ --version pal
pause
+1 -1
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak1_us2.jsonc iso_data decompiler_out\
out\build\Release\bin\decompiler decompiler\config\jak1\jak1_config.jsonc iso_data decompiler_out\ --version ntsc_v2
pause
+1 -1
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak2_ntsc_v1.jsonc iso_data\ decompiler_out\
out\build\Release\bin\decompiler decompiler\config\jak2\jak2_config.jsonc iso_data\ decompiler_out\ --version ntsc_v1
pause
+1 -1
View File
@@ -1,2 +1,2 @@
cd ..\..
git update-index --assume-unchanged decompiler\config\jak1_ntsc_black_label.jsonc decompiler\config\jak2_ntsc_v1.jsonc
git update-index --assume-unchanged decompiler\config\jak1\jak1_config.jsonc decompiler\config\jak2\jak2_config.jsonc
+1 -1
View File
@@ -1,2 +1,2 @@
cd ..\..
git update-index --no-assume-unchanged decompiler\config\jak1_ntsc_black_label.jsonc decompiler\config\jak2_ntsc_v1.jsonc
git update-index --no-assume-unchanged decompiler\config\jak1\jak1_config.jsonc decompiler\config\jak2\jak2_config.jsonc
+2 -2
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
python3 scripts\gsrc\update-gsrc-via-refs.py --game jak2 --decompiler out\build\Release\bin\decompiler.exe --decompiler_config .\decompiler\config\jak2_ntsc_v1.jsonc
pause
python3 scripts\gsrc\update-gsrc-via-refs.py --game jak2 --decompiler out\build\Release\bin\decompiler.exe --decompiler_config .\decompiler\config\jak2\jak2_config.jsonc --version ntsc_v1
pause
+3
View File
@@ -13,6 +13,7 @@ parser = argparse.ArgumentParser("update-gsrc-via-refs")
parser.add_argument("--game", help="The name of the game", type=str)
parser.add_argument("--decompiler", help="The path to the decompiler", type=str)
parser.add_argument("--decompiler_config", help="The decomp config", type=str)
parser.add_argument("--version", help="The decomp config version", type=str)
parser.add_argument("--file_pattern", help="Provide a glob pattern to find files, instead of using git status. Relative to the reference test folder", type=str)
args = parser.parse_args()
@@ -51,6 +52,8 @@ for file_name in file_names:
"./decompiler/config/{}".format(args.decompiler_config),
"./iso_data",
"./decompiler_out",
"--version",
args.version,
"--config-override",
'{{"allowed_objects": ["{}"]}}'.format(file_name),
]
+1 -4
View File
@@ -31,10 +31,7 @@ def get_gsrc_path_from_filename(game_name, file_name):
return path
def get_alltypes_path_from_game(game_name):
if game_name == "jak1":
return "./decompiler/config/all-types.gc"
else:
return "./decompiler/config/jak2/all-types.gc"
return "./decompiler/config/{}/all-types.gc".format(game_name)
def get_ref_path_from_filename(game_name, file_name, ref_folder):
file_list = get_file_list(game_name)
+1 -1
View File
@@ -3,4 +3,4 @@
# Directory of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
"${DIR}"/../../build/decompiler/decompiler "${DIR}"/../../decompiler/config/jak1_ntsc_black_label.jsonc "${DIR}"/../../iso_data "${DIR}"/../../decompiler_out
"${DIR}"/../../build/decompiler/decompiler "${DIR}"/../../decompiler/config/jak1/jak1_config.jsonc "${DIR}"/../../iso_data "${DIR}"/../../decompiler_out --version ntsc_v1
+1 -1
View File
@@ -3,4 +3,4 @@
# Directory of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
"${DIR}"/../../build/decompiler/decompiler "${DIR}"/../../decompiler/config/jak2_ntsc_v1.jsonc "${DIR}"/../../iso_data/ "${DIR}"/../../decompiler_out
"${DIR}"/../../build/decompiler/decompiler "${DIR}"/../../decompiler/config/jak2/jak2_config.jsonc "${DIR}"/../../iso_data/ "${DIR}"/../../decompiler_out --version ntsc_v1
+2 -1
View File
@@ -1,2 +1,3 @@
GAME=jak1
DECOMP_CONFIG=jak1_ntsc_black_label.jsonc
DECOMP_CONFIG=jak1/jak1_config.jsonc
DECOMP_CONFIG_VERSION=ntsc_v1
+1 -1
View File
@@ -1,4 +1,4 @@
version: "3.13"
version: 3
vars:
GOALC_BIN_RELEASE_DIR: './build/goalc'
+1 -1
View File
@@ -1,4 +1,4 @@
version: "3.13"
version: 3
vars:
GOALC_BIN_RELEASE_DIR: './build/goalc'
+1 -1
View File
@@ -1,4 +1,4 @@
version: "3.13"
version: 3
vars:
GOALC_BIN_RELEASE_DIR: './out/build/Release/bin'
+21 -13
View File
@@ -12,7 +12,8 @@ args = parser.parse_args()
# TODO - read from defaults
file = {
"GAME": "jak1",
"DECOMP_CONFIG": "jak1_ntsc_black_label.jsonc"
"DECOMP_CONFIG": "jak1/jak1_config.jsonc",
"DECOMP_CONFIG_VERSION": "ntsc_v1"
}
env_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), ".env")
@@ -36,20 +37,25 @@ if args.info:
valid_games = ["jak1", "jak2"]
decomp_config_map = {
"jak1": "jak1/jak1_config.jsonc",
"jak2": "jak2/jak2_config.jsonc",
}
decomp_config_version_map = {
"jak1": {
"ntscv1": "jak1_ntsc_black_label.jsonc",
"ntscv2": "jak1_us2.jsonc",
"pal": "jak1_pal.jsonc",
"ntscjp": "jak1_jp.jsonc"
"ntscv1": "ntsc_v1",
"ntscv2": "ntsc_v2",
"pal": "pal",
"ntscjp": "jp"
},
"jak2": {
"ntscv1": "jak2_ntsc_v1.jsonc"
"ntscv1": "ntsc_v1"
}
}
default_config_map = {
"jak1": "jak1_ntsc_black_label.jsonc",
"jak2": "jak2_ntsc_v1.jsonc"
default_config_version_map = {
"jak1": "ntsc_v1",
"jak2": "ntsc_v1"
}
if args.game:
@@ -58,13 +64,15 @@ if args.game:
sys.exit(1)
curr = file["GAME"]
file["GAME"] = args.game
if (curr != file["GAME"]) or file["DECOMP_CONFIG"] not in decomp_config_map[file["GAME"]]:
file["DECOMP_CONFIG"] = default_config_map[file["GAME"]]
if (curr != file["GAME"]) or file["DECOMP_CONFIG_VERSION"] not in decomp_config_version_map[file["GAME"]]:
file["DECOMP_CONFIG"] = decomp_config_map[file["GAME"]]
file["DECOMP_CONFIG_VERSION"] = default_config_version_map[file["GAME"]]
if args.decomp_config:
if args.decomp_config not in decomp_config_map[file["GAME"]]:
if args.decomp_config not in decomp_config_version_map[file["GAME"]]:
print("Unsupported decomp config '{}' for game '{}'".format(args.decomp_config, file["GAME"]))
sys.exit(1)
file["DECOMP_CONFIG"] = decomp_config_map[file["GAME"]][args.decomp_config]
file["DECOMP_CONFIG"] = decomp_config_map[file["GAME"]]
file["DECOMP_CONFIG_VERSION"] = decomp_config_version_map[file["GAME"]][args.decomp_config]
with open(env_path, 'w') as env_file:
for item in file.items():
+1 -1
View File
@@ -22,7 +22,7 @@ using namespace decompiler;
void FormRegressionTestJak1::SetUpTestCase() {
parser = std::make_unique<InstructionParser>();
dts = std::make_unique<DecompilerTypeSystem>(GameVersion::Jak1);
dts->parse_type_defs({"decompiler", "config", "all-types.gc"});
dts->parse_type_defs({"decompiler", "config", "jak1", "all-types.gc"});
}
void FormRegressionTestJak2::SetUpTestCase() {
+1 -1
View File
@@ -17,7 +17,7 @@ class DataDecompTest : public ::testing::Test {
static void SetUpTestCase() {
dts = std::make_unique<DecompilerTypeSystem>(GameVersion::Jak1);
dts->parse_type_defs({"decompiler", "config", "all-types.gc"});
dts->parse_type_defs({"decompiler", "config", "jak1", "all-types.gc"});
}
static void TearDownTestCase() { dts.reset(); }
+2 -2
View File
@@ -20,7 +20,7 @@ TEST(Jak1TypeConsistency, MANUAL_TEST_TypeConsistencyWithBuildFirst) {
add_common_expected_type_mismatches(compiler);
add_jak1_expected_type_mismatches(compiler);
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
compiler.run_test_no_load("decompiler/config/all-types.gc");
compiler.run_test_no_load("decompiler/config/jak1/all-types.gc");
}
// TODO - debatably delete these now that jak 1 is complete
@@ -29,7 +29,7 @@ TEST(Jak1TypeConsistency, TypeConsistency) {
compiler.enable_throw_on_redefines();
add_common_expected_type_mismatches(compiler);
add_jak1_expected_type_mismatches(compiler);
compiler.run_test_no_load("decompiler/config/all-types.gc");
compiler.run_test_no_load("decompiler/config/jak1/all-types.gc");
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
}
+1 -1
View File
@@ -10,7 +10,7 @@
// TODO - i think these should be partitioned by game name instead of it being in the filename
// (and the names not being consistent)
std::unordered_map<std::string, std::string> game_name_to_all_types1 = {
{"jak1", "all-types.gc"},
{"jak1", "jak1/all-types.gc"},
{"jak2", "jak2/all-types.gc"}};
void disassemble(OfflineTestDecompiler& dc) {
+5 -9
View File
@@ -16,11 +16,6 @@
#include "third-party/fmt/core.h"
#include "third-party/fmt/ranges.h"
// TODO - this should probably go somewhere common when it's needed eventually
std::unordered_map<std::string, std::string> game_name_to_config = {
{"jak1", "jak1_ntsc_black_label.jsonc"},
{"jak2", "jak2_ntsc_v1.jsonc"}};
OfflineTestThreadManager g_offline_test_thread_manager;
OfflineTestDecompiler setup_decompiler(const OfflineTestWorkGroup& work,
@@ -28,10 +23,11 @@ OfflineTestDecompiler setup_decompiler(const OfflineTestWorkGroup& work,
const OfflineTestConfig& offline_config) {
// TODO - pull out extractor logic to determine release into common and use here
OfflineTestDecompiler dc;
dc.config = std::make_unique<decompiler::Config>(
decompiler::read_config_file((file_util::get_jak_project_dir() / "decompiler" / "config" /
game_name_to_config[offline_config.game_name])
.string()));
// TODO - this should probably go somewhere common when it's needed eventually
dc.config = std::make_unique<decompiler::Config>(decompiler::read_config_file(
file_util::get_jak_project_dir() / "decompiler" / "config" / offline_config.game_name /
fmt::format("{}_config.jsonc", offline_config.game_name),
"ntsc_v1"));
// TODO - do I need to limit the `inputs.jsonc` as well, or is the decompiler smart enough
// to lazily load the DGOs as needed based on the allowed objects?