code wiki / _hdl_build / nx_platformer_term.nx
nx_platformer_term.nx
buildroot/runtime/_hdl_build/nx_platformer_term.nx
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
imports: nx_wasm_platformer.nxnx_syscalls.nx
imported by: nx_platformer_play.nxnx_platformer_play_gate.nx
structs
| none |
consts
| 11 | const COLS: i64 = 80 |
| 12 | const ROWS: i64 = 20 |
functions
| 15 | func 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 } |
| 17 | func pt_esc(buf: *u8, off: i64, s: *u8) -> i64 { buf[off] = 27 as u8; return pt_s(buf, off + 1, s) } |
| 19 | func pt_n(buf: *u8, off: i64, v: i64) -> i64 |
| 31 | func pt_frame(base: i64, grid: *i64) -> i64 |
| 68 | func pt_emit(base: i64, grid: *i64, buf: *u8) -> i64 |
| 96 | func pt_ascii(base: i64, grid: *i64, buf: *u8) -> i64 |