code wiki / _hdl_build / nx_game_art.nx
nx_game_art.nx
buildroot/runtime/_hdl_build/nx_game_art.nx
about
nx_game_art.nx -- shared RICH-render primitives, the answer to nx_game_critic's TOY verdict. The games
scored TOY (120) because they draw flat discs on a near-empty starfield: palette ~10, gradient 0,
coverage ~180. These primitives lift all three axes: 2D gradient nebulas (palette+gradient+coverage),
radial-falloff glow orbs (gradient+detail), star dust (palette), gradient meters (gradient). ONE
definition, used by nx_frontier_engine, nx_drift_engine, and the critic's reference frame -- OO
consolidation of the look, so improving the art improves every game at once. LIB. license_tier: ORIGINAL
dependencies 2 imports · 6 importers
imports: nx_syscalls.nxnx_game_raster.nx
imported by: nx_breeder_lab.nxnx_char_identity_sheet.nxnx_creature_demo.nxnx_creature_render.nxnx_drift_engine.nxnx_frontier_engine.nx
structs
| none |
consts
| 9 | const K_MAGIC_2654435761: i64 = 2654435761 |
| 10 | const K_MAGIC_40503: i64 = 40503 |
functions
| 12 | func art_clampb(v: i64) -> i64 { if v<0 { return 0 } if v>255 { return 255 } return v } |
| 16 | func art_nebula(fb: *i64, w: i64, h: i64, r0: i64, g0: i64, b0: i64, r1: i64, g1: i64, b1: i64) -> i64 |
| 36 | func art_stardust(fb: *i64, w: i64, h: i64, count: i64) -> i64 |
| 53 | func art_glow_orb(fb: *i64, w: i64, h: i64, cx: i64, cy: i64, rad: i64, cr: i64, cg: i64, cb: i64) -> i64 |
| 75 | func art_meter(fb: *i64, w: i64, h: i64, x: i64, y: i64, len: i64, ht: i64, filled: i64, r0: i64, g0: i64, b0: i64, r1: i64, g1: i64, b1: i64) -> i64 |