Skip to main content

Module shared

Module shared 

Source
Expand description

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.

  • GetInstanceId: the first request for a group’s clip makes its instances, the k-th starting k × duration / count into the clip (and updated twice at no time); each request counts one more user and gets the instance whose clock is earliest.
  • Update: every instance advances, before the characters; its pose’s root is the identity turned and its movement.
  • FreeInstanceId: the last user gone, the clip’s instances go.

The original keeps one manager for the process; the port one per thread, reset with each town (shared::reset).

Original: Runtime 0x1800fe260, Runtime 0x1800fead0, Runtime 0x1800fe200.

Structs§

Table
One town’s shared instances, kept aside while another town on the same thread runs (a lockstep test runs several towns in one process; on separate computers each has its own).

Functions§

free
FreeInstanceId.
instance_id
GetInstanceId: entry << 8 | instance.
pose
GetPose.
reset
A new town: no shared instances.
swap
Puts table in place of this thread’s instances, and the thread’s in table.
update
Update: every instance by dt.