chore: version Zelda 1 port and engineering records

This commit is contained in:
Nilton Constantino
2026-11-16 15:22:13 +00:00
commit 6f2fa420c2
4282 changed files with 822198 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
"""Generate isolated guest checks. Never install or modify production sources."""
import json
from extract_graphics import ROOT
def generate():
out=ROOT/'.tmp/inventory-fixture';out.mkdir(exist_ok=True,parents=True)
source=ROOT/'tools/fixtures/inventory'
cases=json.loads((ROOT/'extracted/inventory_screen/selection-oracle.json').read_text())['cases'];methods=[]
for i in range(0,len(cases),8):
methods.append(f' fn batch_{i//8}() -> void {{')
for slots,start,direction,expected in cases[i:i+8]:methods.append(' InventoryChecks.selection_case(['+','.join(map(str,slots))+f'],{start},{direction},{expected});')
methods.append(' }')
template=(source/'inventory.template.pbs').read_text().replace('// ORACLE_BATCHES','\n'.join(methods))
(out/'inventory.pbs').write_text(template)
for name in ('link','game','main'):(out/f'{name}.pbs').write_bytes((source/f'{name}.pbs').read_bytes())
print('Generated',len(cases),'native selection assertions + 3 subsystem checks; 143 batches')
if __name__=='__main__':generate()