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:
Tyler Wilding
2026-09-04 09:27:06 -04:00
committed by GitHub
parent 65fc564c16
commit 9c86c86c74
335 changed files with 213866 additions and 4131 deletions
@@ -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:
@@ -0,0 +1,3 @@
from code_retention.all_types_retention import update_alltypes_named_blocks
update_alltypes_named_blocks("jakx")
@@ -21,6 +21,8 @@ def run_decomp(name: str):
env=env,
cwd=BASE_DIR,
check=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL
)
@@ -44,8 +46,9 @@ def copy_to_ref(name: str):
with open("./scripts/gsrc/_decomp-plan.json", "r") as f:
data = json.load(f)
for entry in data:
for i, entry in enumerate(data):
name = entry.get("name")
print(f"[{i}/{len(data)}] {name}")
done = entry.get("done")
if entry.get("skip"):
print(f"skipping {name}")