mirror of
https://github.com/open-goal/jak-project
synced 2026-09-05 18:58:14 -04:00
d/jx: More files (#4360)
Breaks the 300 file milestone, also includes the majority of mips2c functions carried forward. Some functions need some fixes in the c++ code to mips2c properly, and a small handful of the mips2c functions require manual patching -- all spots were marked with `TODO - fix` that had to be commented out to get things compiling.
This commit is contained in:
@@ -57,9 +57,18 @@ def update_all_blocks(game_name, block_dict):
|
||||
lines = f.readlines()
|
||||
# Iterate through lines, (before ;; decomp begins) and update the blocks if we find them
|
||||
i = 0
|
||||
seen_blocks = []
|
||||
while i < len(lines):
|
||||
line = lines[i]
|
||||
if line.lower().startswith(";; decomp begins"):
|
||||
# Add any blocks we hadn't seen yet (were not added to the file automatically by some tool)
|
||||
for block in blocks:
|
||||
if block.block_id in seen_blocks:
|
||||
continue
|
||||
final_lines.append(f";; +++{block.block_id}")
|
||||
for block_line in block.data:
|
||||
final_lines.append(block_line)
|
||||
final_lines.append(f";; ---{block.block_id}\n")
|
||||
final_lines.append(line)
|
||||
# Add all the rest of the lines until the end
|
||||
while i + 1 < len(lines):
|
||||
@@ -70,6 +79,7 @@ def update_all_blocks(game_name, block_dict):
|
||||
if line.startswith(";; +++"):
|
||||
final_lines.append(line)
|
||||
block_id = line.split(";; +++")[1]
|
||||
seen_blocks.append(block_id)
|
||||
# Look to see if we actually have that block
|
||||
found_block = False
|
||||
for block in blocks:
|
||||
|
||||
Reference in New Issue
Block a user