code wiki / _hdl_build / nx_breeder_lab.nx

nx_breeder_lab.nx

buildroot/runtime/_hdl_build/nx_breeder_lab.nx

11769 B240 linesdepth 6pulls 21 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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ art_nebula art_clampb gr_pack art_stardust gr_px gr_pack ↻ art_clampb ↻ gr_pack ↻ gr_rect gr_text font8x8_table sys_mmap ↻ fg gr_glyph font8x8_table ↻ gr_px ↻ font8x8_adv font8x8_ink_w en_bytes en_words en_init en_o_gen en_o_alive en_cap

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
56func main() -> i64