Files
gamestabled a87ddae432 Attempt to pull GLOBAL_ASMs for actor functions into their correct source files (#17)
* pull known Actor functions GLOBAL_ASMs into their cpp files

* attempt to pull unidentified actor functions GLOBAL_ASMs into their corresponding source files by scanning the call-graph
2026-09-04 15:43:43 -04:00

23 lines
589 B
Python

import os
import subprocess
import sys
from pathlib import Path
sourceFile: str = sys.argv[1]
includePaths: list[Path] = ["include",
"library/3ds_sdk/include",
"src/game"]
ccArgs = "-o ctx.c -E "
for include in includePaths:
ccArgs = ccArgs + f"-I{include} "
if 'ARMCC_PATH' in os.environ:
CC: Path = Path(os.environ['ARMCC_PATH']) / "win_32-pentium/armcc.exe"
else:
print("ARMCC_PATH environment variable is not set, trying gcc")
CC: Path = Path("gcc")
subprocess.run(f"{CC} {ccArgs} {sourceFile}", shell=True)