code wiki / _hdl_build / nx_wasm_platformer_gate.nx

nx_wasm_platformer_gate.nx

buildroot/runtime/_hdl_build/nx_wasm_platformer_gate.nx

5663 B92 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic wasm
docsdependenciesstructsconstsfunctions

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

nx_wasm_platformer.nx nx_png.nx nx_syscalls.nx nx_wasm_platformer_gate.nx

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

main g_p sys_write sys_mmap play init_impl sset cset fset sget cget coin_x tick_impl sget ↻ sset ↻ cget ↻ coin_x ↻ cset ↻ fget foe_x fset ↻ sget ↻ g_i sys_mmap ↻ sys_write ↻ init_impl ↻ tick_impl ↻ cget ↻ coin_x ↻ render_impl rgb fillr cget ↻ coin_x ↻ fget ↻ foe_x ↻ sget ↻ num_str nf_draw_text_mem nf_blit_glyph_mem

structs

none

consts

none

functions

11func 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 }
called by 1: main calls 1: sys_write
12func 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 }
called by 1: main calls 2: sys_mmapsys_write
15func play(base: i64, dojump: i64) -> i64
33func main(argc: i64, argv: *i64) -> i64