code wiki / _hdl_build / nx_wasm_diablo_html.nx

nx_wasm_diablo_html.nx

buildroot/runtime/_hdl_build/nx_wasm_diablo_html.nx

5656 B60 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic wasm
docsdependenciesstructsconstsfunctions

about

nx_wasm_diablo_html.nx -- SOVEREIGN packager: the isometric ARPG wasm -> a self-contained playable .html WITH AUDIO. PRE-GENERATES 4 SFX natively (nx_audio_sfx: noise=hit, explosion=kill, coin=loot, tone=game-over -> nx_audio_wav), embeds them base64, and plays them via Web Audio when the wasm core signals an event (ex.sfx_event(): 1=hit 2=kill 3=coin 4=gameover). JS does ONLY blit + click + the rAF loop + sound playback; all logic/render (iso + 2.5D walls + shaded sprites + torch lighting) + SFX synthesis are sovereign. usage: nx_wasm_diablo_html <in.wasm> <out.html> license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_base64.nx nx_audio_sfx.nx nx_audio_wav.nx nx_wasm_diablo_html.nx

imports: nx_syscalls.nxnx_base64.nxnx_audio_sfx.nxnx_audio_wav.nx

imported by: nobody (leaf or entry point)

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

main hw sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close b64_encode b64_enc_char sfx_b64 sys_mmap ↻ sfx_noise sys_mmap ↻ sfx_rng sfx_explosion sfx_noise ↻ fx_lowpass ae_clamp adsr_apply ae_clamp ↻ sfx_coin adsr_apply ↻ sfx_tone wav_render_stereo wav_put_str wav_put_u32 wav_put_u16 wav_put_i16 b64_encode ↻ sys_openat_wr sys_write ↻ sys_close ↻

structs

none

consts

11const K_MAGIC_8000: i64 = 8000
12const K_MAGIC_2654435761: i64 = 2654435761
13const K_MAGIC_9000: i64 = 9000
14const K_MAGIC_22050: i64 = 22050

functions

16func hw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
19func sfx_b64(kind: i64, ms: i64, rate: i64, b64out: *i64) -> i64
32func main(argc: i64, argv: *i64) -> i64