code wiki / (root) / nx_char_layers.nx

nx_char_layers.nx

buildroot/runtime/nx_char_layers.nx

7979 B131 linesdepth 4pulls 5 transitivereach 3 importersview sourcekind librarytopic char
docsdependenciesstructsconstsfunctions

about

nx_char_layers.nx -- the LAYER STACK (operator: "a nude base + add layers of armor/clothing/makeup/other stuff"). A character = a licensed nude BASE (variant + figure) + an ORDERED stack of layers, each applied in turn so outer layers sit over inner. Layer types: OUTFIT (nx_outfit clothing/armor), ACCESSORY (belt/hat/necklace = extra worn geometry), MAKEUP (a face-region cosmetic -- rendered in the charlab detailed-face pipeline, modeled here so the stack + consent tier know about it). Generalizes the single nx_outfit slot into a composable stack; the delivered nudity tier (nx_char_asset) reads the stack for a covering outfit. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_syscalls.nx nx_sdfrender.nx nx_outfit.nx nx_char_layers.nx nx_char_custom_gate.nx nx_char_groom_gate.nx nx_char_layers_gate.nx

imports: nx_syscalls.nxnx_sdfrender.nxnx_outfit.nx

imported by: nx_char_custom_gate.nxnx_char_groom_gate.nxnx_char_layers_gate.nx

structs

none

consts

10const LT_MAGIC_1405: i64 = 1405
11const LT_MAGIC_1330: i64 = 1330
12const LT_MAGIC_1350: i64 = 1350
13const LT_MAGIC_1180: i64 = 1180
17const LT_OUTFIT: i64 = 1 // clothing/armor via nx_outfit (tunic/robe/cloak/armor)
18const LT_ACCESSORY: i64 = 2 // worn geometry: belt / hat / necklace
19const LT_MAKEUP: i64 = 3 // face cosmetic (charlab face pipeline; nx_makeup)
20const LT_PIERCING: i64 = 4 // body jewelry / piercings (small metal studs at anatomical points)
21const LT_BODYHAIR: i64 = 5 // body-hair grooming STATE (id: 0 natural / 1 shaved / 2 trimmed) -- a render nuance
22const LT_BODYPAINT: i64 = 6 // body paint (a colored material on a body region)
23const LT_HAIRSTYLE: i64 = 7 // head hairstyle variant
25const ACC_BELT: i64 = 1
26const ACC_HAT: i64 = 2
27const ACC_NECKLACE: i64 = 3
29const PIERCE_NAVEL: i64 = 1
30const PIERCE_COLLAR: i64 = 2
63const GROOM_NATURAL: i64 = 1
64const GROOM_TRIMMED: i64 = 2
65const GROOM_SHAVED: i64 = 3
66const HREG_ALL: i64 = 0
67const HREG_ARMS: i64 = 1
68const HREG_LEGS: i64 = 2
69const HREG_CHEST: i64 = 3
70const HREG_PELVIC: i64 = 4

functions

33func acc_apply(base: i64, n0: i64, id: i64) -> i64
called by 1: char_layers_apply calls 1: of_part
42func pierce_apply(base: i64, n0: i64, id: i64) -> i64
called by 1: char_layers_apply calls 1: of_part
51func bodypaint_apply(base: i64, id: i64) -> i64
called by 1: char_layers_apply calls 1: sdf_set_mat
71func groom_id(region: i64, state: i64) -> i64 { return region * 4 + state }
called by 1: main
72func bh_region(base: i64, region: i64, mat: i64) -> i64
called by 1: bodyhair_apply calls 1: sdf_set_mat
79func bodyhair_apply(base: i64, id: i64) -> i64
called by 1: char_layers_apply calls 1: bh_region
98func hairstyle_apply(base: i64, n0: i64, id: i64) -> i64
called by 1: char_layers_apply calls 1: of_part
108func char_layers_apply(base: i64, n0: i64, stack: *i64, nl: i64) -> i64
127func stack_has_outfit(stack: *i64, nl: i64) -> i64
called by 1: main