scripts: make update_decomp_ref.py respect the game we are operating on (#1880)

This commit is contained in:
Tyler Wilding
2022-09-13 20:03:00 -04:00
committed by GitHub
parent 4620f96574
commit 8117ed3bc7
6 changed files with 35 additions and 29 deletions
+15
View File
@@ -35,3 +35,18 @@ def get_alltypes_path_from_game(game_name):
return "./decompiler/config/all-types.gc"
else:
return "./decompiler/config/jak2/all-types.gc"
def get_ref_path_from_filename(game_name, file_name, ref_folder):
file_list = get_file_list(game_name)
src_path = ""
for f in file_list:
if f[2] != 3:
continue
if f[0] == file_name:
src_path = f[4]
break
if src_path == "":
print("couldn't determine ref path for {}:{}!".format(game_name, file_name))
exit(1)
path = "{}/{}/{}/{}_REF.gc".format(ref_folder, game_name, src_path, file_name)
return path