code wiki / _hdl_build / nx_vn_site.nx

nx_vn_site.nx

buildroot/runtime/_hdl_build/nx_vn_site.nx

6065 B71 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic vn
docsdependenciesstructsconstsfunctions

about

nx_vn_site.nx -- builds the VN CATALOG as a clean-routed SITE: a /vn index that lists each visual novel, and one numbered VN per work (/vn/1, /vn/2), so every piece of content EXISTS at its own canonical clean URL (operator: "shouldnt it be /vn/1 and /vn/2 so both ... exist"). Reuses the sovereign VN engine (nx_vn) to emit a 2nd real branching story, strips its external bg ref so each page is self-contained (no dangling asset), and emits a zero-JS catalog index linking the clean URLs. This is routing as a property of PUBLISHING. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_vn.nx nx_syscalls.nx nx_vn_site.nx

imports: nx_vn.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sw sys_write sys_mkdir sys_mmap vn_sample2 vn_scene vn_choice vn_emit_html vp vnum sys_mmap ↻ strip_bg wfile sys_openat_wr sw ↻ sys_write ↻ sys_close sn sys_write ↻ sys_mmap ↻ emit_catalog vp sys_exit

structs

none

consts

9const K_MAGIC_65536: i64 = 65536
10const K_MAGIC_16384: i64 = 16384

functions

12func sw(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 2: wfilemain calls 1: sys_write
13func sn(v: i64) -> i64 { var m: i64=v; if m==0{sys_write(1,"0" as *u8,1);return 0} let t:*u8=sys_mmap(24); var k:i64=0; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let o:*u8=sys_mmap(24); var i:i64=0; while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
called by 1: main calls 2: sys_writesys_mmap
14func vp(buf: *u8, o: i64, s: *u8) -> i64 { var w: i64=o; var i: i64=0; while s[i]!=(0 as u8){buf[w]=s[i];w=w+1;i=i+1} return w }
called by 1: emit_catalog
16func wfile(path: *u8, buf: *u8, n: i64) -> i64
26func strip_bg(buf: *u8, n: i64) -> i64
called by 1: main
39func emit_catalog(buf: *u8) -> i64
called by 1: main calls 1: vp
51func main(argc: i64, argv: *i64) -> i64