code wiki / _hdl_build / nishi_game.nx

nishi_game.nx

buildroot/runtime/_hdl_build/nishi_game.nx

12421 B305 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind tooltopic nishi
docsdependenciesstructsconstsfunctions

about

nishi_game.nx -- GAME-GUI R1: the sovereign GAME ENGINE WINDOW on native Windows. Presents ANIMATED frames rendered by the SAME baselined textured rasterizer (nx_textured_tri -> nx_tex_sample bilinear, pure integer) into a real Win32 window via SetDIBitsToDevice -- the game ecosystem's GUI+video rung: sovereign frames, hardware-up, no gcc/SDL/GL/toolkit. Scene: textured scrolling-checker band + a BOUNCING textured triangle + animated HUD bar + live frame counter (two screenshots differ => video). Built by nx_pe_compile_win_game.nx (compile me with nx_compile_x86 -> /tmp/nxgame.s first).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_font8x8.nx nx_textured_tri_fast.nx nx_scene3d.nx nishi_game.nx

imports: nx_syscalls.nxnx_font8x8.nxnx_textured_tri_fast.nxnx_scene3d.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap win32 w32 win32addr sys_exit w16 font8x8_table sys_mmap ↻ fg sc_cube_new sys_mmap ↻ rd32 fill_rect3 depth_clear sc_cube_draw sc_isin sc_icos sc_isin ↻ sc_face sc_shade sc_ndotl depth_tri_render dt_edge draw_text3 draw_char3 fill_rect3 ↻ draw_num3 draw_char3 ↻ rgb_to_bgra sys_sleep_ms sys_mmap ↻ sys_munmap

structs

none

consts

16const W_GetModuleHandleA: i64 = 6
17const W_RegisterClassExA: i64 = 7
18const W_CreateWindowExA: i64 = 8
19const W_ShowWindow: i64 = 9
20const W_PeekMessageA: i64 = 10
21const W_TranslateMessage: i64 = 11
22const W_DispatchMessageA: i64 = 12
23const W_DefWindowProcA: i64 = 13
24const W_GetDC: i64 = 14
25const W_ReleaseDC: i64 = 15
26const W_IsWindow: i64 = 16
27const W_LoadCursorA: i64 = 17
28const W_SetDIBitsToDevice: i64 = 18
29const W_GetClientRect: i64 = 24
31const GW: i64 = 640
32const GH: i64 = 480

functions

12func win32(id: i64, args: *i64) -> i64 { return id }
called by 1: main
13func win32addr(id: i64) -> i64 { return id }
called by 1: main
34func w16(p: *u8, o: i64, v: i64) -> i64 { p[o]=(v&0xff) as u8; p[o+1]=((v>>8)&0xff) as u8; return 0 }
called by 1: main
35func w32(p: *u8, o: i64, v: i64) -> i64
called by 2: wpmain
38func wp(p: *u8, o: i64, v: i64) -> i64 { w32(p,o,v); w32(p,o+4, v / 4294967296); return 0 }
calls 1: w32
39func rd32(p: *u8, o: i64) -> i64 { return (p[o]&0xff) | ((p[o+1]&0xff)<<8) | ((p[o+2]&0xff)<<16) | ((p[o+3]&0xff)<<24) }
called by 1: main
43func fill_rect3(fb: *Image, x0: i64, y0: i64, rw: i64, rh: i64, r: i64, g: i64, b: i64) -> i64
63func draw_char3(fb: *Image, ft: *u8, c: i64, x0: i64, y0: i64, sc: i64, r: i64, g: i64, b: i64) -> i64
called by 2: draw_text3draw_num3 calls 1: fill_rect3
80func draw_text3(fb: *Image, ft: *u8, x0: i64, y0: i64, s: *u8, sc: i64, r: i64, g: i64, b: i64) -> i64
called by 2: game_framemain calls 1: draw_char3
92func draw_num3(fb: *Image, ft: *u8, x0: i64, y0: i64, v: i64, sc: i64, r: i64, g: i64, b: i64, tmp: *u8) -> i64
called by 2: game_framemain calls 1: draw_char3
109func rgb_to_bgra(dst: *u8, src: *u8, n: i64) -> i64
called by 1: main
123func game_frame(fb: *Image, tex: *Image, ft: *u8, t: i64, bx: i64, by: i64, tmp: *u8, gxa: *i64, gya: *i64, cmask: i64, gold: i64) -> i64
148func main() -> i64