nx_gltf_pose_bounds_gate_t316.nx source
↩ module page · 14 lines · 910 B
1import "nx_gltf_pose_packet_t316.nx"
2import "nx_syscalls.nx"
3func main(argc:i64,argv:*i64)->i64{
4 if argc!=3{return 2}
5 let a:*i64=sys_mmap(16) as *i64;let p:*i64=sys_read_file(argv[1] as *u8,a) as *i64
6 let b:*i64=sys_mmap(16) as *i64;let v:*i64=sys_read_file(argv[2] as *u8,b) as *i64
7 if (p as i64)<=0||(v as i64)<=0||a[0]!=105072||b[0]!=3177680{return 2}
8 let ww:i64=gltf_pose_work_words(p[3]);let w:*i64=sys_mmap(ww*8) as *i64;let pal:*i64=sys_mmap(8960) as *i64
9 if gpa_frame(p,a[0]/8,536870893,0,w,ww,pal,1120)!=70{return 3}
10 let out:*i64=sys_mmap(48) as *i64;let scratch:*i64=sys_mmap(512) as *i64
11 if gpa_bounds(pal,70,v,36110,out,scratch)!=36110{return 4}
12 if out[0]!=-44729114||out[1]!=-1349962||out[2]!=18384091||out[3]!=50188841||out[4]!=253335183||out[5]!=114506715{return 5}
13 sys_write(1,"GLTF-BOUNDS PASS all 36110 original source vertices, six bounds exact at time 536870893\n",85);return 0
14}