code wiki / _hdl_build / nx_creature_demo.nx

nx_creature_demo.nx

buildroot/runtime/_hdl_build/nx_creature_demo.nx

4856 B101 linesdepth 5pulls 14 transitivereach 0 importersview sourcekind sketch/demotopic creature
docsdependenciesstructsconstsfunctions

about

nx_creature_demo.nx -- EMITS a real companion-game screen: a party of UNIQUE creatures (each rolled from nx_game_companion traits, rendered by nx_creature_render) on a rich background, each on a card with its name/type/level + an HP bar (mechanics VISIBLE). Writes a PNG and SCORES it with the hardened critic so the emission's richness is MEASURED against the palette gap (my old games 220 vs real games 766-3336). This is the horse: get rich graphics + mechanics emitting first. license_tier: ORIGINAL expect_exit: 0

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_game_companion.nx nx_creature_render.nx nx_game_art.nx nx_game_critic.nx nx_gamehud.nx nx_png_write.nx nx_creature_demo.nx

imports: nx_syscalls.nxnx_game_companion.nxnx_creature_render.nxnx_game_art.nxnx_game_critic.nxnx_gamehud.nxnx_png_write.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main font8x8_table sys_mmap fg sys_mmap ↻ art_nebula art_clampb gr_pack art_stardust gr_px gr_pack ↻ art_clampb ↻ gr_rect gr_pack ↻ gh_text gh_glyph gh_px font8x8_adv font8x8_ink_w en_words comp_new_roster en_init en_o_gen en_o_alive en_cap en_o_dense en_cap ↻ en_o_pos en_cap ↻ en_o_free en_cap ↻ en_spawn en_freelen en_o_free ↻ en_o_free ↻ en_cap ↻ en_o_alive ↻ en_ncomp en_o_comp en_cap ↻

structs

none

consts

13const K_MAGIC_20260721: i64 = 20260721
15const FW: i64 = 480
16const FH: i64 = 300

functions

18func ww(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
19func wn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
28func spec_name(s: i64) -> *u8
called by 1: main
36func png_emit(fb: *i64, path: *u8) -> i64
called by 1: main calls 2: sys_mmapnx_png_write_rgb
44func main() -> i64