nx_sprite_forge.nx
buildroot/runtime/nx_sprite_forge.nx
about
nx_sprite_forge.nx -- THE SPRITE BUILDER (not a sprite): a sovereign, data-driven procedural character forge.
A reusable library of detailed, directionally-shaded armour/body PARTS (helm, breastplate, pauldrons, plated
legs, arms, sword, cape, skull, ribcage, staff, robe), plus a COMPOSER that builds a full character from a
SPEC = an ordered list of [part_id, colourA, colourB] records (back-to-front). New characters are new spec
DATA, not new code -- so the ecosystem (and team) emits knights, skeletons, mages, beasts at will. Integer /
no-float; bakes form-shading (light from upper-left); the engine's dynamic torch lighting is applied on top.
Built on nx_gfx_iso primitives. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_gfx_iso.nx
imported by: nx_sprite_forge_gate.nx
structs
| none |
consts
| none |
functions
| 10 | func sf_white() -> i64 { return gx_rgb(255,255,255) } calls 1: gx_rgb |
| 11 | func sf_hi(c: i64) -> i64 { return gx_mix(c, gx_rgb(255,255,255), 95) } // bright highlight |
| 12 | func sf_lt(c: i64) -> i64 { return gx_mix(c, gx_rgb(255,255,255), 55) } // lit |
| 13 | func sf_sh(c: i64) -> i64 { return gx_shade(c, 120) } // shadow |
| 14 | func sf_ed(c: i64) -> i64 { return gx_shade(c, 64) } // dark edge / crevice |
| 17 | func sf_cape(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 37 | func sf_leg1(fb: *i64, W: i64, H: i64, lx: i64, fy: i64, ca: i64) -> i64 |
| 55 | func sf_legs(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 64 | func sf_torso(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 90 | func sf_arms(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 104 | func sf_sword(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 121 | func sf_pauldrons(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 133 | func sf_helm(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 151 | func sf_skull(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 165 | func sf_ribs(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 183 | func sf_staff(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, ca: i64, cb: i64) -> i64 |
| 193 | func sf_draw_part(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, pid: i64, ca: i64, cb: i64) -> i64 |
| 207 | func sf_forge(fb: *i64, W: i64, H: i64, fx: i64, fy: i64, spec: *i64, nrec: i64) -> i64 |
| 215 | func sf_rec(buf: *i64, i: i64, pid: i64, ca: i64, cb: i64) -> i64 { buf[i*3] = pid; buf[i*3+1] = ca; buf[i*3+2] = cb; return 0 } |
| 216 | func sf_spec_knight(buf: *i64) -> i64 |
| 227 | func sf_spec_skeleton(buf: *i64) -> i64 |
| 236 | func sf_spec_mage(buf: *i64) -> i64 |