nx_shorebird_gate.nx
buildroot/runtime/nx_shorebird_gate.nx
about
nx_shorebird_gate.nx -- PG37: THE FIRST ANIMAL, HONESTLY A GULL, IS A CANON ROW OVER THE ONE BIRD PLAN.
SUBJECT: nx_creaturegen.cg_shorebird / cg_bird_row_posed (in-process). The rung's done-rule in its own words:
two different seeds produce measurably different gulls on the existing diversity ruler, the gull is distinct
from every existing bird row on the same ruler, and a canon table without the gull row emits no gull. The
ruler is the one nx_diversity_gate T3 composes -- anatstack_render at the ruler's own view and base colour,
then pairwise L1 over the pixel buffer -- with the ruler's own species bar. Every value is emitted with gv_kv
so a second method can recompute it from the declared inputs. Fixtures are arithmetic: no filesystem state.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_creaturegen.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
| 12 | const SG_SEED_A: i64 = 4 // the diversity ruler's own seed |
| 13 | const SG_SEED_B: i64 = 5 |
| 14 | const SG_SEED_C: i64 = 17 |
| 15 | const SG_YAW: i64 = 4800 // the ruler's bird view |
| 16 | const SG_CAMZ: i64 = 3 |
| 17 | const SG_MAXLAYER: i64 = 1 |
| 18 | const SG_INFLATE: i64 = 42 |
| 19 | const SG_BASE_R: i64 = 140 // the ruler's bird base colour |
| 20 | const SG_BASE_G: i64 = 96 |
| 21 | const SG_BASE_B: i64 = 58 |
| 22 | const SG_SPECIES_BAR: i64 = 150000 // nx_diversity_gate T2: below this L1 two renders are NOT distinct species |
| 23 | const SG_PARTS_CAP: i64 = 96 // the ruler's part-table capacity |
| 24 | const SG_BG: i64 = 2890778 // 26 + 28*256 + 44*65536, anatstack_render's background word |
| 25 | const SG_TIP_PARTS: i64 = 2 |
| 26 | const SG_FK_EXTRA: i64 = 2 // a posed leg is two capsules, the static leg one |
| 27 | const SG_WALK_THIGH: i64 = 400 // it4096 walk pose |
| 28 | const SG_WALK_SHIN: i64 = 200 |
| 29 | const SG_SENTINEL: i64 = 424242 |
| 30 | const SG_NSEEDS: i64 = 3 |
| 31 | const SG_BYTE: i64 = 255 |
| 32 | const SG_BIG: i64 = 1000000000 |
functions
| 35 | func sg_l1(a: *i64, b: *i64, n: i64) -> i64 { var s: i64 = 0; var i: i64 = 0; while i < n { var d: i64 = (a[i] & SG_BYTE) - (b[i] & SG_BYTE); if d < 0 { d = 0 - d } s = s + d; i = i + 1 } return s } called by 1: main |
| 36 | func sg_ptab_eq(a: *i64, b: *i64, n: i64) -> i64 { var k: i64 = 0; while k < n*AS_STRIDE { if a[k] != b[k] { return 0 } k = k + 1 } return 1 } called by 1: main |
| 37 | func sg_render(P: *i64, n: i64, fb: *i64) -> i64 { return anatstack_render(P, n, SG_YAW, SG_CAMZ, SG_MAXLAYER, SG_INFLATE, SG_BASE_R, SG_BASE_G, SG_BASE_B, fb) } |
| 38 | func sg_alloc() -> *i64 { return sys_mmap(SG_PARTS_CAP*AS_STRIDE*8) as *i64 } |
| 39 | func sg_fb() -> *i64 { return sys_mmap(as_w()*as_h()*8) as *i64 } |
| 41 | func sg_fg(fb: *i64, npx: i64, out: *i64) -> i64 called by 1: main |
| 60 | func sg_legs(P: *i64, n: i64, leg_rgb: i64, out: *i64) -> i64 called by 1: main |
| 75 | func main() -> i64 |