mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
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:
@@ -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),
|
||||
]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user