mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 18:12:50 -04:00
decomp: lights.gc (#420)
* scripts: Hack script to quickly identify the next goal_src file that hasn't been decomp'd yet * config: Delete old type_hints file * decomp: Decompile lights.gc * decomp-tests: Add offline tests and temporary forward defs * vs: Rename / add new offline test run config * decomp: Add formatted lights.gc source * decomp: Temporary define stub in geometry,gc * decomp: Cleanup `lights-group` handling
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-1087
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
import sys
|
||||
from jak1_file_list import file_list
|
||||
|
||||
skip_count = 0
|
||||
if len(sys.argv) >= 2:
|
||||
skip_count = int(sys.argv[1])
|
||||
|
||||
print(skip_count)
|
||||
|
||||
new_file_contents = []
|
||||
|
||||
for file in file_list:
|
||||
with open("goal_src/" + file[4] + "/" + file[0] + ".gc") as f:
|
||||
lines = f.readlines()
|
||||
# print("goal_src/" + file[4] + "/" + file[0] + ".gc" + " " + str(len(lines)))
|
||||
if skip_count <= 0 and len(lines) <= 7:
|
||||
print("Next file to decompile is - " + file[0])
|
||||
print("Target is - " + "goal_src/" + file[4] + "/" + file[0] + ".gc")
|
||||
print("Uses the following CGO / DGO - " + str(file[3]))
|
||||
# TODO, update the CGO/DGO
|
||||
with open("decompiler\config\jak1_ntsc_black_label.jsonc", "r") as config_file:
|
||||
cfg_lines = config_file.readlines()
|
||||
for line in cfg_lines:
|
||||
if "allowed_objects" in line:
|
||||
line = " \"allowed_objects\": [\"" + file[0] + "\"],\n"
|
||||
new_file_contents.append(line)
|
||||
if len(new_file_contents) > 0:
|
||||
with open("decompiler\config\jak1_ntsc_black_label.jsonc", "w") as f:
|
||||
f.writelines(new_file_contents)
|
||||
print("Allowed objects list updated")
|
||||
break
|
||||
elif len(lines) <= 7:
|
||||
skip_count = skip_count - 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user