ludic/packages/ludic.character/state.ludic
Orkuncakilkaya 19fcf60599 wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run
ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:31:34 +03:00

25 lines
730 B
Text

# state.ludic - the body, its camera, and the queue of what happened to it
const chr_pi: float = 3.14159265
# the camera: an orbit round a pivot at the chest, or the eyes
export function char_facts(base_st: mut BaseState, character_st: mut CharacterState) -> Queue<CharacterFact> {
if character_st.chr_fact_q == null { character_st.chr_fact_q = queue_new(base_st, "character.facts") }
return character_st.chr_fact_q
}
function chr_say(base_st: mut BaseState, character_st: mut CharacterState, what: int, v: float) -> void {
let f = new CharacterFact
f.what = what
f.x = character_st.chr_x
f.y = character_st.chr_y
f.z = character_st.chr_z
f.v = v
q_push(base_st, char_facts(base_st, character_st), f)
}