Files
HackerSM64/tools/getGoddardSize.py
someone2639 e206d4477c Fix getGoddardSize so that any arbitrary build folder can be used (#915)
* fix getGoddardSize

* newline

* HOW did this get in here

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2026-01-17 01:50:46 -05:00

18 lines
521 B
Python

import os
import sys
preliminaryMapPath: str = sys.argv[1]
buildFolder: str = sys.argv[2]
with open(preliminaryMapPath) as mapFile:
line: str
for line in mapFile:
if "GODDARD_SIZE" in line:
tokens: list[str] = line.split()
with open(f"{buildFolder}/goddard.txt", "w+") as outputFile:
sz: int = int(tokens[0], 16)
sz += 16
sz &= 0xFFFFFFF0
outputFile.write(f"GODDARD_SIZE = 0x{sz:X};\n")
sys.exit(0)