code wiki / _hdl_build / nx_arcade_render.nx
nx_arcade_render.nx
buildroot/runtime/_hdl_build/nx_arcade_render.nx
about
nx_arcade_render.nx -- CORRECTED sovereign game: logic AND rendering are PURE NISHI, NO FLOAT (all i64),
NO JavaScript logic, NO 3rd-party canvas drawing. Integer game state + integer rasterizer write pixels
into a packed-RGB framebuffer (R|G<<8|B<<16). This same module is what the sovereign WASM chain
(nx_compile_wat -> nx_wat_compiler -> blit shim) ships to the browser, where the ONLY browser touch is
blitting this framebuffer + forwarding keys. Here it is verified NATIVELY by rendering a frame to PNG
(the sovereign eyeball loop). license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.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
| 11 | func aw(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 an(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 } |
| 15 | func fill_rect(fb: *i64, w: i64, h: i64, x0: i64, y0: i64, x1: i64, y1: i64, c: i64) -> i64 called by 1: render |
| 29 | func g_at(xs: *i64, ys: *i64, n: i64, x: i64, y: i64) -> i64 called by 1: tick |
| 36 | func tick(st: *i64, gx: *i64, gy: *i64, dir: i64, gw: i64, gh: i64) -> i64 |
| 54 | func render(st: *i64, gx: *i64, gy: *i64, hx: *i64, hy: *i64, fb: *i64, w: i64, h: i64, cell: i64, gw: i64, gh: i64) -> i64 |
| 72 | func main() -> i64 |