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, thek-th startingk × duration / countinto 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§
- Saved
- One shared entry as a save holds it: the group and clip, the number of users, and each instance’s clock and speed.
- 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.- poses
- The poses of one slot’s instances (none for a free slot).
- reset
- A new town: no shared instances.
- restore
- The shared instances of a saved game, slot by slot (
Nonefor a free slot), so that every saved instance id names the same entry and instance again. - snapshot
- The shared instances slot by slot (
Nonefor a free slot): each entry’s group (its resource, the key requests match), clip, users and its instances’ clocks. - swap
- Puts
tablein place of this thread’s instances, and the thread’s intable. - update
Update: every instance bydt.