refactor(animation): extract live PartArray presenter

Move final live part composition, exact-incarnation schedule handoff, MotionDone binding, and presentation diagnostics out of GameWindow while preserving the retail frame order. Reject stale schedule and completion ABA at the new owner boundary.

Co-Authored-By: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-21 09:37:02 +02:00
parent 9760ff5a8d
commit f004ac5562
14 changed files with 963 additions and 438 deletions

View file

@ -615,7 +615,7 @@ public sealed class LiveEntityAnimationSchedulerTests
}
private static (LiveEntityRuntime Live, LiveEntityRecord Record,
GameWindow.AnimatedEntity Animation) BuildHiddenAnimated(uint guid)
LiveEntityAnimationState Animation) BuildHiddenAnimated(uint guid)
{
var spatial = new GpuWorldState();
spatial.AddLandblock(new LoadedLandblock(
@ -640,7 +640,7 @@ public sealed class LiveEntityAnimationSchedulerTests
ParentCellId = Cell,
})!;
var setup = new Setup();
var animation = new GameWindow.AnimatedEntity
var animation = new LiveEntityAnimationState
{
Entity = entity,
Setup = setup,
@ -649,7 +649,7 @@ public sealed class LiveEntityAnimationSchedulerTests
HighFrame = 0,
Framerate = 0f,
Scale = 1f,
PartTemplate = Array.Empty<GameWindow.AnimatedPartTemplate>(),
PartTemplate = Array.Empty<LiveAnimationPartTemplate>(),
PartAvailability = Array.Empty<bool>(),
Sequencer = new AnimationSequencer(
setup,
@ -662,7 +662,7 @@ public sealed class LiveEntityAnimationSchedulerTests
}
private static (LiveEntityRuntime Live, LiveEntityRecord Record,
GameWindow.AnimatedEntity Animation) BuildVisibleAnimatedWithPosFrames(
LiveEntityAnimationState Animation) BuildVisibleAnimatedWithPosFrames(
uint guid,
Quaternion? rootOrientation = null,
Vector3? rootOrigin = null)
@ -694,7 +694,7 @@ public sealed class LiveEntityAnimationSchedulerTests
var loader = new DictionaryAnimationLoader(animationId, datAnimation);
var sequencer = new AnimationSequencer(setup, new MotionTable(), loader);
Assert.True(sequencer.InitializeSetupDefaultAnimation(animationId));
var animation = new GameWindow.AnimatedEntity
var animation = new LiveEntityAnimationState
{
Entity = entity,
Setup = setup,
@ -705,7 +705,7 @@ public sealed class LiveEntityAnimationSchedulerTests
Scale = 1f,
PartTemplate = new[]
{
new GameWindow.AnimatedPartTemplate(
new LiveAnimationPartTemplate(
0x0100AA01u,
SurfaceOverrides: null,
IsDrawable: true),