refactor(runtime): cut graphical host over to canonical root
Make every App composition phase borrow one GameRuntime, retire the duplicate view/event adapters, and dispose the root only after its graphical borrowers release. This preserves synchronous UI commands while giving shutdown one exact ownership ledger. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
ecb9f79444
commit
ce41efb9e5
29 changed files with 613 additions and 778 deletions
|
|
@ -7,6 +7,7 @@ using AcDream.App.Runtime;
|
|||
using AcDream.App.Settings;
|
||||
using AcDream.App.Update;
|
||||
using AcDream.App.World;
|
||||
using AcDream.Runtime;
|
||||
using AcDream.Runtime.Session;
|
||||
using AcDream.Core.Combat;
|
||||
using AcDream.Core.Lighting;
|
||||
|
|
@ -21,6 +22,7 @@ namespace AcDream.App.Composition;
|
|||
|
||||
internal sealed record FrameRootDependencies(
|
||||
RuntimeOptions Options,
|
||||
GameRuntime Runtime,
|
||||
GL Gl,
|
||||
IWindow Window,
|
||||
IInputContext Input,
|
||||
|
|
@ -33,7 +35,6 @@ internal sealed record FrameRootDependencies(
|
|||
LocalPlayerModeState PlayerMode,
|
||||
LocalPlayerIdentityState PlayerIdentity,
|
||||
ChaseCameraInputState ChaseCameraInput,
|
||||
RuntimeLocalPlayerMovementState PlayerController,
|
||||
LiveWorldOriginState WorldOrigin,
|
||||
ParticleVisibilityController ParticleVisibility,
|
||||
EntityEffectPoseRegistry EffectPoses,
|
||||
|
|
@ -48,12 +49,18 @@ internal sealed record FrameRootDependencies(
|
|||
DebugVmRenderFactsPublisher DebugVmRenderFacts,
|
||||
IInputCaptureSource InputCapture,
|
||||
DispatcherCameraInputSource CameraInput,
|
||||
SelectionState Selection,
|
||||
LiveEntityAnimationRuntimeView<LiveEntityAnimationState> Animations,
|
||||
UpdateFrameClock UpdateClock,
|
||||
CombatState Combat,
|
||||
GameFrameGraphSlot FrameGraphs,
|
||||
Action<string> Log);
|
||||
Action<string> Log)
|
||||
{
|
||||
public RuntimeLocalPlayerMovementState PlayerController =>
|
||||
Runtime.MovementOwner;
|
||||
|
||||
public SelectionState Selection => Runtime.ActionOwner.Selection;
|
||||
|
||||
public CombatState Combat => Runtime.ActionOwner.Combat;
|
||||
}
|
||||
|
||||
internal sealed record FrameRootResult(
|
||||
UpdateFrameOrchestrator Update,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue