nx_nxa_texc.nx source
↩ module page · 19 lines · 839 B
1// nx_nxa_texc.nx -- CLI: write the TEXC (UV atlas) section into an NXA asset.
2// nx_nxa_texc <in.nxa> <out.nxa>
3// Core lives in nx_nxa_texc_lib.nx (ntx_apply) so the gate imports ONE implementation -- no twin.
4// Additive+idempotent; fail-closed with named reasons on stderr. license_tier: ORIGINAL expect_exit: 0
5import "nx_syscalls.nx"
6import "nx_nxa_texc_lib.nx"
7
8func main(argc: i64, argv: *i64) -> i64 {
9 if argc < 3 {
10 nt_err("usage: nx_nxa_texc <in.nxa> <out.nxa>\n" as *u8)
11 nt_err(" computes a bone-anchored UV unwrap from SKEL+SKIN and writes a TEXC section.\n" as *u8)
12 nt_err(" <in.nxa> is never modified; an existing TEXC is replaced (idempotent).\n" as *u8)
13 sys_exit(2)
14 return 2
15 }
16 let rc: i64 = ntx_apply(argv[1] as *u8, argv[2] as *u8)
17 sys_exit(rc)
18 return rc
19}