code wiki / _hdl_build / nx_minigame_capstone_gate.nx
nx_minigame_capstone_gate.nx
buildroot/runtime/_hdl_build/nx_minigame_capstone_gate.nx
about
nx_minigame_capstone_gate.nx -- INTEGRATION CAPSTONE: composes the built pillars into ONE deterministic
mini-game, proving "the engine = composition" (not 5 silos):
P3 fixed-timestep loop -> the deterministic tick loop
P5 char-AI (behavior tree) -> the NPC decides chase vs patrol each tick (nx_char_ai)
P4 story-graph VM -> on capture, a quest flag advances the story to its END node (nx_story_vm)
P3 cull/LOD -> per-frame render work computed (nx_cull_lod)
P1 gouraud render -> the final frame drawn to knowledge/nx_minigame.png (nx_shade + nx_png)
Win-assert: the playthrough reaches quest-complete. Determinism: two runs are byte-identical. GREEN only
if all hold. license_tier: ORIGINAL expect_exit: 0
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_char_ai.nxnx_story_vm.nxnx_cull_lod.nxnx_shade.nxnx_png.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
| 17 | func mw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func mn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); 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} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 19 | func sgn(d: i64) -> i64 { if d > 0 { return 1 } if d < 0 { return 0 - 1 } return 0 } called by 1: run_minigame |
| 20 | func iabs(d: i64) -> i64 { if d < 0 { return 0 - d } return d } called by 1: run_minigame |
| 23 | func run_minigame(state: *i64, st: *i64, sr: *i64, ss: *i64, bty: *i64, ba0: *i64, bnk: *i64, bkids: *i64) -> i64 |
| 61 | func main() -> i64 |