From 94f59ddc3c0998b25d3b622d08601c31555339e2 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Mon, 3 Aug 2026 10:23:57 -0400 Subject: [PATCH] Move movie transition request to model --- docs/PROJECT-STRUCTURE.md | 3 ++- docs/remake-architecture-and-roadmap.md | 11 ++++++++--- engine/Age.Engine/Hosting/IHost.cs | 7 ------- engine/Age.Engine/Model/GfxState.Contracts.cs | 2 -- engine/Age.Engine/Model/GfxState.Presentation.cs | 1 - engine/Age.Engine/Model/MovieMaskTransitionRequest.cs | 8 ++++++++ 6 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 engine/Age.Engine/Model/MovieMaskTransitionRequest.cs diff --git a/docs/PROJECT-STRUCTURE.md b/docs/PROJECT-STRUCTURE.md index aae44c9..fe70fa2 100644 --- a/docs/PROJECT-STRUCTURE.md +++ b/docs/PROJECT-STRUCTURE.md @@ -167,7 +167,8 @@ timed-deadline waiting, frame yield, and scene reset. `engine/Age.Engine/Hosting SFX, fade, volume, and route-control contracts, including the compatibility overload/default chains used by simple hosts. `engine/Age.Engine/Hosting/IMovieHost.cs` owns ordinary, positioned, mask-transition, activity-query, and modal movie playback contracts. `IHost` inherits all four focused contracts; their required and default -behavior is unchanged, and movie/graphics transport records remain in their existing locations for now. +behavior is unchanged. The neutral `engine/Age.Engine/Model/MovieMaskTransitionRequest.cs` record carries movie +mask work between the VM, host, and retained graphics without making `Model` depend on `Hosting`. `engine/Age.Engine/Model/GfxState.cs` retains cross-domain retained-graphics coordination. `engine/Age.Engine/Model/GfxState.Contracts.cs` owns its public render, transition, diagnostic, persistence, diff --git a/docs/remake-architecture-and-roadmap.md b/docs/remake-architecture-and-roadmap.md index 4921644..e6a6c73 100644 --- a/docs/remake-architecture-and-roadmap.md +++ b/docs/remake-architecture-and-roadmap.md @@ -776,6 +776,11 @@ do not mix mechanical moves with semantic changes. `MovieMaskTransitionRequest` remain in their prior locations pending a separate dependency-cleanup slice. Runtime validation remains green. + The fourth bounded contract slice moved the unchanged `MovieMaskTransitionRequest` record from `Hosting` to + `Model`. VM, Godot, tests, and the movie host contract already consumed `Model`, so no call sites changed; + removing the two now-unused imports eliminates `GfxState`'s reverse dependency on the host namespace. Runtime + validation remains green. + 4. **Make the build graph express source ownership.** Stop linking production `.cs` files from `godot/` and `tools/movie-corpus-gate/` into `Age.Engine.Tests`. Extract the platform-neutral frontend/movie/diagnostic code into a small production project referenced by Godot, tests, and the corpus gate. Retain both existing @@ -1136,8 +1141,8 @@ layer's rendering diverges from ADV; save layout. ## 8. Immediate next step Continue step 3 of the **codebase consolidation** maintenance slice: clarify runtime contracts without changing behavior or the aggregate host accepted by the VM. With diagnostic, lifecycle, audio, and movie contracts -established beneath `IHost`, move the neutral `MovieMaskTransitionRequest` contract from `Hosting` to `Model` next -to remove `GfxState`'s reverse dependency on the host namespace, preserving the record's public shape and every -consumer before separating larger host domains. +established beneath `IHost` and the movie-mask request now neutral, move the format-independent `RgbaImage` record +from `Sys4` to `Model` next. Update its consumers without changing the record or decoder behavior, removing the +aggregate host's image-only dependency on the format namespace before separating larger host domains. Concrete playthrough blockers may still preempt this bounded maintenance work; the consolidation effort does not replace Phase B gameplay validation or the open cross-platform gates. diff --git a/engine/Age.Engine/Hosting/IHost.cs b/engine/Age.Engine/Hosting/IHost.cs index d5a8def..7110403 100644 --- a/engine/Age.Engine/Hosting/IHost.cs +++ b/engine/Age.Engine/Hosting/IHost.cs @@ -28,13 +28,6 @@ public readonly record struct SurfaceRectCopy( int SourceSurface, int DestinationSurface, int SourceX, int SourceY, int Width, int Height, int DestinationX, int DestinationY); -/// Opcode 0x24d's captured-range movie-mask transition. The movie's decoded green channel -/// becomes a byte-per-pixel alpha mask over SourceRange in the scratch surface. -public readonly record struct MovieMaskTransitionRequest( - long CommandKey, int SurfaceSlot, long SourceRangeStart, int SourceRangeCount, - int X, int Y, int Width, int Height, long Mode, long ResourceId, - long StartDelayMs, long DurationMs); - /// A synchronous AGE-owned diagnostic prompt after native body/context formatting. public readonly record struct DiagnosticMessage(string Caption, string Text); diff --git a/engine/Age.Engine/Model/GfxState.Contracts.cs b/engine/Age.Engine/Model/GfxState.Contracts.cs index 7145f08..a3acfcf 100644 --- a/engine/Age.Engine/Model/GfxState.Contracts.cs +++ b/engine/Age.Engine/Model/GfxState.Contracts.cs @@ -1,5 +1,3 @@ -using Age.Engine.Hosting; - namespace Age.Engine.Model; /// The sampled native one-shot channels carried to the compositor: op 0x21e scale, op 0x21f diff --git a/engine/Age.Engine/Model/GfxState.Presentation.cs b/engine/Age.Engine/Model/GfxState.Presentation.cs index 09d90db..a900dbe 100644 --- a/engine/Age.Engine/Model/GfxState.Presentation.cs +++ b/engine/Age.Engine/Model/GfxState.Presentation.cs @@ -1,5 +1,4 @@ using System.Linq; -using Age.Engine.Hosting; namespace Age.Engine.Model; diff --git a/engine/Age.Engine/Model/MovieMaskTransitionRequest.cs b/engine/Age.Engine/Model/MovieMaskTransitionRequest.cs new file mode 100644 index 0000000..9181f8f --- /dev/null +++ b/engine/Age.Engine/Model/MovieMaskTransitionRequest.cs @@ -0,0 +1,8 @@ +namespace Age.Engine.Model; + +/// Opcode 0x24d's captured-range movie-mask transition. The movie's decoded green channel +/// becomes a byte-per-pixel alpha mask over SourceRange in the scratch surface. +public readonly record struct MovieMaskTransitionRequest( + long CommandKey, int SurfaceSlot, long SourceRangeStart, int SourceRangeCount, + int X, int Y, int Width, int Height, long Mode, long ResourceId, + long StartDelayMs, long DurationMs);