code wiki / _hdl_build / nx_wasm_platformer_gate.nx
nx_wasm_platformer_gate.nx
buildroot/runtime/_hdl_build/nx_wasm_platformer_gate.nx
about
nx_wasm_platformer_gate.nx -- native test harness + PNG proof for the sovereign browser platformer
(nx_wasm_platformer). Drives the SAME integer logic the wasm exports (base = mmap here, base = 0 in wasm):
a scripted jump-AI auto-runs the level and must collect all floating coins + clear all foes + reach the exit;
a NO-JUMP control proves the floating coins are UNREACHABLE without the jump mechanic (the platformer-ness is
real, not decorative); the integer jump ARC is measured (apex >= 30px); determinism (two runs identical); and
a mid-play frame is rastered to knowledge/staging/game/platformer_play.png. license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_wasm_platformer.nxnx_png.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 11 | func g_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 12 | func g_i(v: i64) -> i64 { let t: *u8 = sys_mmap(24); var m: i64 = v; var k: i64 = 0; if m == 0 { t[0]=48 as u8; k=1 } while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var w: i64=0; var q: i64=k-1; while q>=0 { o[w]=t[q]; w=w+1; q=q-1 } sys_write(1,o,w); return 0 } |
| 15 | func play(base: i64, dojump: i64) -> i64 |
| 33 | func main(argc: i64, argv: *i64) -> i64 |