nx_assetprobe_lib.nx
buildroot/runtime/nx_assetprobe_lib.nx
about
nx_assetprobe_lib.nx -- THE ONE CONTENT-TYPE RULER FOR INGESTION (extracted 2026-09-06 from nx_assetprobe.nx, byte-for-byte
where the functions already existed, so the program and the bundle walker share ONE identify/classify/claim and cannot
drift). AN EXTENSION IS A CLAIM. THE MAGIC BYTES ARE THE MEASUREMENT. Binary formats match at an EXACT offset; text formats
get a BOUNDED scan of the first AP_TEXTWIN bytes.
GROWN in the extraction, each an exact-offset magic or a bounded keyword pair, never a guess: OBJ and MTL (Wavefront text --
the first ingest fixture on /compare/modding MD1 is an OBJ plus its MTL and four maps, and a walker that cannot type them by
content would fall back to the filename it exists to distrust), DDS (the texture container every Bethesda mod ships), NIF
(the Bethesda mesh container nx_nif_lib already decodes), 7z and RAR (the archives Nexus files usually arrive in, typed as
BUNDLE so a walker can REPORT them by name rather than read them as noise -- their readers are owed, not faked).
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_assetprobe.nxnx_bundle_ingest_lib.nxnx_bundle_ingest_selected_candidate_t144.nx
structs
| none |
consts
| 13 | const AP_TEXTWIN: i64 = 4096 |
| 15 | const AP_UNKNOWN: i64 = 0 |
| 16 | const AP_PMX: i64 = 1 |
| 17 | const AP_PMD: i64 = 2 |
| 18 | const AP_FBXB: i64 = 3 |
| 19 | const AP_GLB: i64 = 4 |
| 20 | const AP_PNG: i64 = 5 |
| 21 | const AP_JPG: i64 = 6 |
| 22 | const AP_HDR: i64 = 7 |
| 23 | const AP_OGG: i64 = 8 |
| 24 | const AP_MP3: i64 = 9 |
| 25 | const AP_MP4: i64 = 10 |
| 26 | const AP_WAV: i64 = 11 |
| 27 | const AP_ZIP: i64 = 12 |
| 28 | const AP_VMD: i64 = 13 |
| 29 | const AP_BVH: i64 = 14 |
| 30 | const AP_OBJ: i64 = 15 |
| 31 | const AP_MTL: i64 = 16 |
| 32 | const AP_DDS: i64 = 17 |
| 33 | const AP_NIF: i64 = 18 |
| 34 | const AP_7Z: i64 = 19 |
| 35 | const AP_RAR: i64 = 20 |
| 37 | const AP_C_UNKNOWN: i64 = 0 |
| 38 | const AP_C_MODEL: i64 = 1 |
| 39 | const AP_C_MOTION: i64 = 2 |
| 40 | const AP_C_AUDIO: i64 = 3 |
| 41 | const AP_C_VIDEO: i64 = 4 |
| 42 | const AP_C_TEXTURE: i64 = 5 |
| 43 | const AP_C_BUNDLE: i64 = 6 |
| 44 | const AP_C_MATERIAL: i64 = 7 |
functions
| 46 | func ap_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i } |
| 48 | func ap_u16(b: *u8, o: i64) -> i64 { return ((b[o] & 0xff) as i64) | (((b[o+1] & 0xff) as i64) << 8) } called by 1: ap_zip |
| 49 | func ap_u32(b: *u8, o: i64) -> i64 called by 1: ap_zip |
| 55 | func ap_at(b: *u8, len: i64, off: i64, pat: *u8) -> i64 |
| 64 | func ap_scan(b: *u8, len: i64, pat: *u8) -> i64 |
| 83 | func ap_scan_bol(b: *u8, len: i64, pat: *u8) -> i64 |
| 105 | func ap_identify(b: *u8, len: i64) -> i64 called by 6: ap_probeap_katbi_walk_selectedbi_walk_selectedsz_walksz_walk calls 3: ap_atap_scanap_scan_bol |
| 153 | func ap_name(c: i64) -> *u8 |
| 177 | func ap_cat(c: i64) -> i64 |
| 201 | func ap_catname(k: i64) -> *u8 |
| 213 | func ap_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: ap_ends |
| 214 | func ap_ends(path: *u8, ext: *u8) -> i64 |
| 227 | func ap_claim(path: *u8) -> i64 |