code wiki / (root) / nx_character.nx

nx_character.nx

buildroot/runtime/nx_character.nx

3258 B64 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_character.nx -- A CHARACTER IS DATA (the keystone under beat-HS2 rung 1 [mind-wire] AND rung 3 [creator]: the Illusion "character generator" concept on our moddable-data law). A character = a compact record of the drivable parameters that make one body/person distinct: two soft-region PROFILES (size/softness/gravity), body proportions, skin color, a breathe rate, a NAME, and -- the hook no incumbent has -- a PERSONA ID that binds this body to a real mind (nx_persona/nx_companion_memory). Serializes to an NXCH1 pack: a shareable character that flows through the CID mod economy exactly like block/morph/anatomy/scene packs. ALL INTEGER. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_character.nx nx_wasm_charlab.nx

imports: nx_syscalls.nx

imported by: nx_wasm_charlab.nx

structs

none

consts

9const CHR_MAGIC_2147483648: i64 = 2147483648
10const CHR_MAGIC_4294967296: i64 = 4294967296
15const CHR_SLOTS: i64 = 16

functions

16func chr_bytes() -> i64 { return CHR_SLOTS * 8 }
called by 1: main
18func chr_set(rec: *i64, name: i64, lsz: i64, lsoft: i64, lgrav: i64, rsz: i64, rsoft: i64, rgrav: i64, arm: i64, breathe: i64, persona: i64, sr: i64, sg: i64, sb: i64) -> i64
called by 1: chr_preset
29func chr_preset(rec: *i64, n: i64) -> i64
37func chr_w32(buf: *u8, off: i64, v: i64) -> i64
called by 1: chr_save
44func chr_r32(buf: *u8, off: i64) -> i64
called by 1: chr_load
49func chr_save(rec: *i64, buf: *u8) -> i64
called by 1: main calls 1: chr_w32
55func chr_load(rec: *i64, buf: *u8, len: i64) -> i64
called by 1: main calls 1: chr_r32