code wiki / _hdl_build / nishi_game.nx
nishi_game.nx
buildroot/runtime/_hdl_build/nishi_game.nx
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
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
structs
| none |
consts
| 16 | const W_GetModuleHandleA: i64 = 6 |
| 17 | const W_RegisterClassExA: i64 = 7 |
| 18 | const W_CreateWindowExA: i64 = 8 |
| 19 | const W_ShowWindow: i64 = 9 |
| 20 | const W_PeekMessageA: i64 = 10 |
| 21 | const W_TranslateMessage: i64 = 11 |
| 22 | const W_DispatchMessageA: i64 = 12 |
| 23 | const W_DefWindowProcA: i64 = 13 |
| 24 | const W_GetDC: i64 = 14 |
| 25 | const W_ReleaseDC: i64 = 15 |
| 26 | const W_IsWindow: i64 = 16 |
| 27 | const W_LoadCursorA: i64 = 17 |
| 28 | const W_SetDIBitsToDevice: i64 = 18 |
| 29 | const W_GetClientRect: i64 = 24 |
| 31 | const GW: i64 = 640 |
| 32 | const GH: i64 = 480 |
functions
| 12 | func win32(id: i64, args: *i64) -> i64 { return id } called by 1: main |
| 13 | func win32addr(id: i64) -> i64 { return id } called by 1: main |
| 34 | func 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 |
| 35 | func w32(p: *u8, o: i64, v: i64) -> i64 |
| 38 | func wp(p: *u8, o: i64, v: i64) -> i64 { w32(p,o,v); w32(p,o+4, v / 4294967296); return 0 } calls 1: w32 |
| 39 | func 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 |
| 43 | func fill_rect3(fb: *Image, x0: i64, y0: i64, rw: i64, rh: i64, r: i64, g: i64, b: i64) -> i64 |
| 63 | func draw_char3(fb: *Image, ft: *u8, c: i64, x0: i64, y0: i64, sc: i64, r: i64, g: i64, b: i64) -> i64 |
| 80 | func draw_text3(fb: *Image, ft: *u8, x0: i64, y0: i64, s: *u8, sc: i64, r: i64, g: i64, b: i64) -> i64 |
| 92 | func draw_num3(fb: *Image, ft: *u8, x0: i64, y0: i64, v: i64, sc: i64, r: i64, g: i64, b: i64, tmp: *u8) -> i64 |
| 109 | func rgb_to_bgra(dst: *u8, src: *u8, n: i64) -> i64 called by 1: main |
| 123 | func 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 |
| 148 | func main() -> i64 |