code wiki / _hdl_build / nx_breeder_lab.nx

nx_breeder_lab.nx

buildroot/runtime/_hdl_build/nx_breeder_lab.nx

11769 B240 linesdepth 6pulls 17 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_breeder_lab.nx -- THE GENETICS LAB SCREEN + the tooth that proves the science is VISIBLE. Emits a real game screen: two parents, their Punnett square, and the litter they actually produced -- and then MEASURES the rendered litter's visible phenotype ratios against the Punnett prediction. That measurement is the difference between "we have genetics" and "the player can SEE genetics". Educational payload, on screen: genotype notation (Hh), the 4-cell square, the predicted odds, and the observed count -- the exact loop a biology student runs by hand. license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_game_taming.nx nx_creature_render.nx nx_game_art.nx nx_game_critic.nx nx_png_write.nx nx_breeder_lab.nx

imports: nx_syscalls.nxnx_game_taming.nxnx_creature_render.nxnx_game_art.nxnx_game_critic.nxnx_png_write.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap art_nebula art_clampb gr_pack art_stardust gr_px gr_pack ↻ art_clampb ↻ gr_pack ↻ gr_rect en_bytes en_words en_init en_o_gen en_o_alive en_cap en_o_dense en_cap ↻ en_o_pos en_cap ↻ en_o_free en_cap ↻ gx_set en_spawn en_freelen en_o_free ↻ en_o_free ↻ en_cap ↻ en_o_alive ↻ en_ncomp en_o_comp en_cap ↻ en_o_dense ↻ en_o_pos ↻ en_make_handle en_o_gen ↻ en_set en_valid en_handle_idx

structs

none

consts

15const LW: i64 = 640
16const LH: i64 = 400

functions

18func lp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: lnlmain calls 1: sys_write
19func ln2(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
33func lnl() -> i64 { lp("\n" as *u8); return 0 }
called by 1: main calls 1: lp
35func lab_png(fb: *i64, path: *u8) -> i64
called by 1: main calls 2: sys_mmapnx_png_write_rgb
50func lab_geno_str(fb: *i64, x: i64, y: i64, g: i64, t: i64, col: i64) -> i64
called by 1: main calls 3: gx_allele_chargx_a0gx_a1
56func main() -> i64