nx_moment_resolve.nx
buildroot/runtime/nx_moment_resolve.nx
about
nx_moment_resolve.nx -- resolve an arc stage into a populated DirectorsNote.
This is the bridge between nx_arc (the data: arcs + stages + pools)
and nx_directors_note (the envelope: the typed packet that flows
through the entire render pipeline).
Per cardinal feedback-arc-and-moment-are-king-cinematographer-pattern:
the director (arc + moment_generator) authors the moment. This
primitive IS that authoring step on the substrate side. It picks
one ID from each of the stage's pools (location, outfit, pose,
expression=affect, camera) using deterministic prng + the stage's
arousal range, and produces a *DirectorsNote that downstream
services consume unchanged.
=== Composition ====================================================
nx_arc.nx -- Arc + ArcStage structure (data)
nx_directors_note.nx -- DirectorsNote (envelope)
nx_prng.nx -- deterministic sampling (Park-Miller LCG)
nx_tier.nx -- nx_int alias
=== Three-tier API ==================================================
nx_moment_resolve(arc, stage_idx, prev_seq, prng, dn_out)
-- the canonical resolver; 5 args (well under <=8 codegen ceiling).
Returns NX_DN_UNDERSPEC_NONE on success, else a code naming
which DirectorsNote field couldn't be filled.
nx_moment_resolve_companion(arc, stage_idx, character_id,
domain, affect, prng, dn_out)
-- companion-authored variant where Elara chose the domain +
affect axis herself; resolver fills the rest from the arc.
7 args.
Both call _pool_pick + _pick_arousal internally.
genealogy_id: lindenmayer_systems + propp_morphology +
bridson_2007_uniform_sampling
lineage_id: nx_moment_resolve_v1
dependencies 5 imports · 3 importers
imports: nx_syscalls.nxnx_tier.nxnx_prng.nxnx_arc.nxnx_directors_note.nx
imported by: nx_director_pipeline.nxnx_director_pipeline_test.nxnx_moment_resolve_test.nx
structs
| none |
consts
| none |
functions
| 57 | func _pool_pick(arc: *Arc, stage_idx: nx_int, pool_kind: nx_int, |
| 74 | func _pick_arousal(arc: *Arc, stage_idx: nx_int, prng_state: *i64) -> nx_int |
| 88 | func _tone_to_affect(tone: nx_int) -> nx_int called by 1: nx_moment_resolve |
| 108 | func _awareness_to_perspective(aw: nx_int) -> nx_int called by 1: nx_moment_resolve |
| 123 | func nx_moment_resolve(arc: *Arc, stage_idx: nx_int, |
| 209 | func nx_moment_resolve_companion(arc: *Arc, stage_idx: nx_int, |