code wiki / _hdl_build / nx_anatomy_critic.nx

nx_anatomy_critic.nx

buildroot/runtime/_hdl_build/nx_anatomy_critic.nx

14976 B348 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic anatomy
docsdependenciesstructsconstsfunctions

about

nx_anatomy_critic.nx -- DOES THIS SHAPE READ AS A BODY? (ws=game-interact, 2026-07-27) ★WHY THIS EXISTS -- a measured failure of our own instrument, not a theory: nx_game_critic scored an identity sheet **876 = SOTA**, HIGHER than every real game frame we have ever measured (Veloren 1000, NetHack tiles 772), while the figures on it had DETACHED FLOATING HEADS, pinched torsos and lollipop legs. It measures palette/detail/gradient/coverage/coherence -- all of which shaded ellipses on a dark field maximise -- and it is structurally BLIND to proportion and to whether a shape is even connected. A richness score is not an anatomy score. ⇒ This is a SEPARATE organ on purpose (rule 9, and the banked law that a number mixing two categories is not a measurement). nx_game_critic keeps meaning "is it visually rich". This one means "is it a body". It scores a FIGURE REGION (caller supplies the bbox -- the renderer knows where it drew) on properties that are true of every human silhouette regardless of art style, from realistic to cartoon: [0] CONNECTED -- the largest connected blob's share of all figure pixels, per-mille. A detached head or a floating limb splits the body into components. THE tooth the SOTA-876 sheet failed. [1] HEADRATIO -- head height as per-mille of total height, checked against the MEASURED canon band (nx_anthro_gate uses headsTall 6.9..8.1 => 123..145 permil realistic). Style widens the band (anime/cartoon legitimately have big heads) but never removes it. [2] TAPER -- does width vary the way a body's does (shoulders > waist < hips)? A cylinder scores 0. [3] VERTBALANCE -- mass distribution across thirds; a lollipop (all mass at the top) fails. [4] LIMBSPAN -- lower-body width continuity: legs must reach the ground without vanishing. All integer, no float. Operates on the packed-i64 framebuffer (R|G<<8|B<<16) every game screen uses. LIB, no main. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_anatomy_critic.nx nx_anatomy_critic_gate.nx nx_char_identity_sheet.nx

imports: nx_syscalls.nx

imported by: nx_anatomy_critic_gate.nxnx_char_identity_sheet.nx

structs

none

consts

26const AC2_N: i64 = 5
27const AC2_M_CONN: i64 = 0
28const AC2_M_HEAD: i64 = 1
29const AC2_M_TAPER: i64 = 2
30const AC2_M_VBAL: i64 = 3
31const AC2_M_LIMB: i64 = 4
34const AC2_BROKEN: i64 = 300 // does not read as a body
35const AC2_CRUDE: i64 = 550 // reads as a body, badly proportioned
36const AC2_SOUND: i64 = 780 // anatomically sound silhouette

functions

38func ac2_verdict(s: i64) -> *u8
called by 2: mainmain
46func ac2_is_fig(fb: *i64, w: i64, x: i64, y: i64, bg: i64) -> i64
61func ac2_largest_component(fb: *i64, w: i64, h: i64, x0: i64, y0: i64, x1: i64, y1: i64,
called by 1: ac2_score calls 2: ac2_is_figsys_mmap
129func ac2_row_width(fb: *i64, w: i64, x0: i64, x1: i64, y: i64, bg: i64) -> i64
called by 1: ac2_score calls 1: ac2_is_fig
147func ac2_center_run(fb: *i64, w: i64, x0: i64, x1: i64, cx: i64, y: i64, bg: i64) -> i64
called by 1: ac2_score calls 1: ac2_is_fig
174func ac2_row_mass(fb: *i64, w: i64, x0: i64, x1: i64, y: i64, bg: i64) -> i64
called by 1: ac2_score calls 1: ac2_is_fig
181func ac2_cap(v: i64, target: i64, weight: i64) -> i64
called by 1: ac2_quality
189func ac2_score(fb: *i64, w: i64, h: i64, x0: i64, y0: i64, x1: i64, y1: i64,
330func ac2_quality(out: *i64) -> i64
called by 2: mainmain calls 1: ac2_cap