mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 14:13:45 -04:00
d/jak2: finish the majority of sparticle and sparticle-launcher (#1840)
* sparticle-launcher * d/jak2: large amount of `sparticle-launcher` done * d/jak2: finish the majority of `sparticle` * decomp: improve format code ignoring * d/jak2: make bits unique in `sp-cpuinfo-flag` * d/jak1: revert config change
This commit is contained in:
@@ -87,6 +87,6 @@ def update_all_blocks(game_name, block_dict):
|
||||
else:
|
||||
final_lines.append(line)
|
||||
i = i + 1
|
||||
# Update the file contents
|
||||
with open(path, "w") as f:
|
||||
f.writelines(final_lines)
|
||||
# Update the file contents
|
||||
with open(path, "w") as f:
|
||||
f.writelines(final_lines)
|
||||
|
||||
@@ -15,26 +15,35 @@ parser.add_argument("--decompiler", help="The path to the decompiler", type=str)
|
||||
parser.add_argument("--decompiler_config", help="The decomp config", type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get a list of changed files, as well as new files
|
||||
file_names = set()
|
||||
for item in repo.index.diff(None):
|
||||
path = item.b_rawpath.decode("utf-8")
|
||||
if args.game in path and "_REF" in path:
|
||||
file_name = os.path.basename(path).replace("_REF.gc", "")
|
||||
print("Decompiling - {}".format(file_name))
|
||||
# Decompile file
|
||||
subprocess.run(
|
||||
[
|
||||
args.decompiler,
|
||||
"./decompiler/config/{}".format(args.decompiler_config),
|
||||
"./iso_data",
|
||||
"./decompiler_out",
|
||||
"--config-override",
|
||||
'{{"allowed_objects": ["{}"]}}'.format(file_name),
|
||||
]
|
||||
)
|
||||
print("Updating - {}".format(file_name))
|
||||
# Update gsrc
|
||||
os.system(
|
||||
"python ./scripts/gsrc/update-from-decomp.py --game {} --file {}".format(
|
||||
args.game, file_name
|
||||
)
|
||||
file_names.add(os.path.basename(path).replace("_REF.gc", ""))
|
||||
|
||||
for item in repo.untracked_files:
|
||||
path = item
|
||||
if args.game in path and "_REF" in path:
|
||||
file_names.add(os.path.basename(path).replace("_REF.gc", ""))
|
||||
|
||||
for file_name in file_names:
|
||||
print("Decompiling - {}".format(file_name))
|
||||
# Decompile file
|
||||
subprocess.run(
|
||||
[
|
||||
args.decompiler,
|
||||
"./decompiler/config/{}".format(args.decompiler_config),
|
||||
"./iso_data",
|
||||
"./decompiler_out",
|
||||
"--config-override",
|
||||
'{{"allowed_objects": ["{}"]}}'.format(file_name),
|
||||
]
|
||||
)
|
||||
print("Updating - {}".format(file_name))
|
||||
# Update gsrc
|
||||
os.system(
|
||||
"python ./scripts/gsrc/update-from-decomp.py --game {} --file {}".format(
|
||||
args.game, file_name
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user