code wiki / _hdl_build / nx_creature_render.nx
nx_creature_render.nx
buildroot/runtime/_hdl_build/nx_creature_render.nx
about
nx_creature_render.nx -- the GRAPHICS EMISSION for the companion game: turn a creature's traits
(species + 4 IVs) into a DETAILED, richly-coloured creature sprite. This is the horse (emit rich
graphics + mechanics) before the gameplay-loop cart. Attacks the measured #1 deficiency (palette 220
vs real games' 766-3336) with real shaded body parts, per-species forms, trait-driven colour schemes,
eyes with catchlights, and markings -- many colours, gradients, coherent structure.
Composes nx_game_raster (primitives) + nx_game_art (glow orbs / shading). LIB. license_tier: ORIGINAL
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_game_raster.nxnx_game_art.nx
imported by: nx_breeder_lab.nxnx_creature_demo.nx
structs
| none |
consts
| 10 | const K_MAGIC_10000: i64 = 10000 |
| 11 | const K_MAGIC_99999: i64 = 99999 |
functions
| 13 | func cr_clamp(v: i64) -> i64 { if v<0 { return 0 } if v>255 { return 255 } return v } |
| 14 | func cr_isqrt(n: i64) -> i64 called by 1: cr_ellipse |
| 24 | func cr_ellipse(fb: *i64, w: i64, h: i64, cx: i64, cy: i64, rx: i64, ry: i64, r: i64, g: i64, b: i64) -> i64 |
| 50 | func cr_tri(fb: *i64, w: i64, h: i64, x0: i64, y0: i64, x1: i64, y1: i64, x2: i64, y2: i64, r: i64, g: i64, b: i64) -> i64 |
| 79 | func cr_eye(fb: *i64, w: i64, h: i64, cx: i64, cy: i64, rad: i64, er: i64, eg: i64, eb: i64) -> i64 |
| 88 | func cr_base(spec: i64, chan: i64) -> i64 called by 1: cr_creature |
| 98 | func cr_creature(fb: *i64, w: i64, h: i64, cx: i64, cy: i64, sz: i64, spec: i64, iv0: i64, iv1: i64, iv2: i64, iv3: i64) -> i64 |