Skip to main content

Module animation

Module animation 

Source
Expand description

Animation as the engine plays it: sampling a pose, the clock of each playing clip, and the events (such as sounds) a clip fires.

Original: Animation::GetPoseAtTime, Quaternion::Lerp, AnimationState::Update, Animation::ApplyEvents.

Original: Runtime 0x1800fd530, Runtime 0x18001dde0, Runtime 0x1801003b0, Runtime 0x1800fd230.

Modules§

shared
Graphics::AnimationManager (Runtime): the shared instances of instanced clips. Each clip a character plays with its flag set is followed through one of shared clocks (3, 4 or 8 for the citizens’ and animals’), so the characters on one walk or work in step.

Structs§

AnimationStack
Graphics::AnimationState with its blend stack, newest layer first. Each play pushes a layer; the one it covers fades out over the group’s blend time, and the pose mixes them.
Layer
One layer of an AnimationStack (AnimationState entry, 0x38 bytes): its clip and clock, and while it fades out under a newer layer, the blend time and what is left of it.
Playback
Single, unique animation playback. Tree expiry starts from an empty animation state. Blended stacks and AnimationManager’s shared instances require their separate lifecycle port.

Functions§

sample_pose
The pose of a clip at a time: the two samples around it, interpolated (normalised quaternion lerp for rotations, linear for translations), with the original’s loop arithmetic. The root’s rotation is reset and its translation becomes a movement delta, as in the original.