code wiki / _hdl_build / nx_vn_site.nx
nx_vn_site.nx
buildroot/runtime/_hdl_build/nx_vn_site.nx
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
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
structs
| none |
consts
| 9 | const K_MAGIC_65536: i64 = 65536 |
| 10 | const K_MAGIC_16384: i64 = 16384 |
functions
| 12 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func 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 } |
| 14 | func 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 |
| 16 | func wfile(path: *u8, buf: *u8, n: i64) -> i64 |
| 26 | func strip_bg(buf: *u8, n: i64) -> i64 called by 1: main |
| 39 | func emit_catalog(buf: *u8) -> i64 |
| 51 | func main(argc: i64, argv: *i64) -> i64 |