code wiki / _hdl_build / nx_platformer_term.nx

nx_platformer_term.nx

buildroot/runtime/_hdl_build/nx_platformer_term.nx

5614 B121 linesdepth 2pulls 4 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_platformer_term.nx -- LIB: a PURE-NISHI, bottom-up terminal renderer for the platformer. NO blit, NO browser, NO JS, NO third-party -- the integer game state is drawn straight to the terminal as ANSI truecolor cells via sys_write (the same sovereign path the dungeon engine uses). The SAME integer no-float logic that nx_wasm_platformer runs (init_impl/tick_impl) drives it; here we just render to a character grid instead of a pixel framebuffer. (That integer framebuffer is itself the bare-metal-ready primitive: on Nishi hardware we own the linear framebuffer and write pixels directly -- no blit. The terminal is the sovereign display today.) license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_wasm_platformer.nx nx_syscalls.nx nx_platformer_term.nx nx_platformer_play.nx nx_platformer_play_gate.nx

imports: nx_wasm_platformer.nxnx_syscalls.nx

imported by: nx_platformer_play.nxnx_platformer_play_gate.nx

structs

none

consts

11const COLS: i64 = 80
12const ROWS: i64 = 20

functions

15func pt_s(buf: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { buf[o] = s[i]; o = o + 1; i = i + 1 } return o }
17func pt_esc(buf: *u8, off: i64, s: *u8) -> i64 { buf[off] = 27 as u8; return pt_s(buf, off + 1, s) }
called by 1: pt_emit calls 1: pt_s
19func pt_n(buf: *u8, off: i64, v: i64) -> i64
called by 2: pt_emitpt_ascii calls 1: sys_mmap
31func pt_frame(base: i64, grid: *i64) -> i64
68func pt_emit(base: i64, grid: *i64, buf: *u8) -> i64
called by 2: mainrender_to calls 4: pt_escpt_npt_ssget
96func pt_ascii(base: i64, grid: *i64, buf: *u8) -> i64
called by 1: main calls 4: rgbpt_spt_nsget