Move host transport records to model
This commit is contained in:
@@ -182,6 +182,9 @@ decoded pixels.
|
|||||||
shared by VM presentation, graphics hosts, Godot, and tests.
|
shared by VM presentation, graphics hosts, Godot, and tests.
|
||||||
`engine/Age.Engine/Model/InputContracts.cs` owns neutral ADV auto-wait state and fullwidth text-edit request/result
|
`engine/Age.Engine/Model/InputContracts.cs` owns neutral ADV auto-wait state and fullwidth text-edit request/result
|
||||||
records shared by input hosts, timing policy, VM dispatch, Godot, and tests.
|
records shared by input hosts, timing policy, VM dispatch, Godot, and tests.
|
||||||
|
`engine/Age.Engine/Model/AdvPresentationContracts.cs` owns neutral ADV wait-indicator configuration shared by VM
|
||||||
|
dispatch, retained presentation, hosts, Godot, and tests. `engine/Age.Engine/Model/DiagnosticContracts.cs` owns
|
||||||
|
the neutral synchronous diagnostic message transported between VM dispatch, diagnostic hosts, Godot, and tests.
|
||||||
|
|
||||||
`engine/Age.Engine/Model/GfxState.cs` retains cross-domain retained-graphics coordination.
|
`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,
|
`engine/Age.Engine/Model/GfxState.Contracts.cs` owns its public render, transition, diagnostic, persistence,
|
||||||
|
|||||||
@@ -815,6 +815,13 @@ do not mix mechanical moves with semantic changes.
|
|||||||
twenty-three ADV members, required implementations, overload/default chains, existing hosts, and transport
|
twenty-three ADV members, required implementations, overload/default chains, existing hosts, and transport
|
||||||
record locations remain behaviorally unchanged. Runtime validation remains green.
|
record locations remain behaviorally unchanged. Runtime validation remains green.
|
||||||
|
|
||||||
|
The eleventh bounded contract slice moved the unchanged `AdvWaitIndicatorConfig` and `DiagnosticMessage`
|
||||||
|
declarations from `Hosting` into domain-specific `Model` contract files. The retained wait-indicator presenter
|
||||||
|
no longer imports `Hosting`; two host-local consumers gained `Model` imports, and one test dropped its obsolete
|
||||||
|
fully qualified hosting name. Record shape, frame selection, diagnostic presentation, and runtime behavior
|
||||||
|
remain unchanged. This completes the planned runtime-contract split and neutral transport cleanup. Runtime
|
||||||
|
validation remains green.
|
||||||
|
|
||||||
4. **Make the build graph express source ownership.** Stop linking production `.cs` files from `godot/` and
|
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
|
`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
|
code into a small production project referenced by Godot, tests, and the corpus gate. Retain both existing
|
||||||
@@ -1173,10 +1180,9 @@ layer's rendering diverges from ADV; save layout.
|
|||||||
---
|
---
|
||||||
|
|
||||||
## 8. Immediate next step
|
## 8. Immediate next step
|
||||||
Continue step 3 of the **codebase consolidation** maintenance slice: clarify runtime contracts without changing
|
Begin step 4 of the **codebase consolidation** maintenance slice: make the build graph express source ownership
|
||||||
behavior or the aggregate host accepted by the VM. With diagnostic, lifecycle, audio, and movie contracts
|
without changing behavior. Introduce the production project boundary for platform-neutral frontend helpers now
|
||||||
established beneath `IHost`, shared graphics/input transport neutral, and graphics/input/ADV contracts now
|
linked directly from `godot/` into `Age.Engine.Tests`, starting with the diagnostic/options helper cluster. Replace
|
||||||
separated, move the unchanged `AdvWaitIndicatorConfig` and `DiagnosticMessage` declarations from `Hosting` to
|
source links with project references while retaining both existing solution files and Godot export behavior.
|
||||||
`Model` next. Preserve all consumers while removing the remaining transport declarations from interface files.
|
|
||||||
Concrete playthrough blockers may still preempt this bounded maintenance work; the consolidation effort does
|
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.
|
not replace Phase B gameplay validation or the open cross-platform gates.
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class AdvTextOpsTests
|
|||||||
|
|
||||||
new VirtualMachine(script, table, host).Run();
|
new VirtualMachine(script, table, host).Run();
|
||||||
|
|
||||||
Assert.Equal(new Age.Engine.Hosting.AdvWaitIndicatorConfig(1, 385, 140, 12, 0, 0, 30, 27, 12, 48),
|
Assert.Equal(new AdvWaitIndicatorConfig(1, 385, 140, 12, 0, 0, 30, 27, 12, 48),
|
||||||
Assert.Single(host.WaitIndicators));
|
Assert.Single(host.WaitIndicators));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Age.Engine.Model;
|
||||||
|
|
||||||
namespace Age.Engine.Hosting;
|
namespace Age.Engine.Hosting;
|
||||||
public sealed class CaptureHost : IHost
|
public sealed class CaptureHost : IHost
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,21 +2,6 @@ using Age.Engine.Model;
|
|||||||
|
|
||||||
namespace Age.Engine.Hosting;
|
namespace Age.Engine.Hosting;
|
||||||
|
|
||||||
public readonly record struct AdvWaitIndicatorConfig(
|
|
||||||
int LayoutSlot, int X, int Y, int SurfaceSlot,
|
|
||||||
int SourceX, int SourceY, int CellWidth, int CellHeight,
|
|
||||||
int TerminalFrame, long FramePeriodMs)
|
|
||||||
{
|
|
||||||
/// <summary>Select the current atlas frame. TerminalFrame is the exclusive native upper bound,
|
|
||||||
/// so SYSTEM4's value 12 addresses the twelve cells 0 through 11.</summary>
|
|
||||||
public int FrameAt(long elapsedMs)
|
|
||||||
{
|
|
||||||
int frameCount = System.Math.Max(1, TerminalFrame);
|
|
||||||
long period = System.Math.Max(1, FramePeriodMs);
|
|
||||||
return (int)(System.Math.Max(0, elapsedMs) / period % frameCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAdvHost
|
public interface IAdvHost
|
||||||
{
|
{
|
||||||
void ShowText(int offset, string text);
|
void ShowText(int offset, string text);
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Age.Engine.Model;
|
||||||
|
|
||||||
namespace Age.Engine.Hosting;
|
namespace Age.Engine.Hosting;
|
||||||
|
|
||||||
public interface IDiagnosticHost
|
public interface IDiagnosticHost
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
namespace Age.Engine.Hosting;
|
namespace Age.Engine.Hosting;
|
||||||
|
|
||||||
/// <summary>A synchronous AGE-owned diagnostic prompt after native body/context formatting.</summary>
|
|
||||||
public readonly record struct DiagnosticMessage(string Caption, string Text);
|
|
||||||
|
|
||||||
public interface IHost : IDiagnosticHost, ILifecycleHost, IAudioHost, IMovieHost, IGraphicsHost, IInputHost,
|
public interface IHost : IDiagnosticHost, ILifecycleHost, IAudioHost, IMovieHost, IGraphicsHost, IInputHost,
|
||||||
IAdvHost
|
IAdvHost
|
||||||
{
|
{
|
||||||
|
|||||||
16
engine/Age.Engine/Model/AdvPresentationContracts.cs
Normal file
16
engine/Age.Engine/Model/AdvPresentationContracts.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
namespace Age.Engine.Model;
|
||||||
|
|
||||||
|
public readonly record struct AdvWaitIndicatorConfig(
|
||||||
|
int LayoutSlot, int X, int Y, int SurfaceSlot,
|
||||||
|
int SourceX, int SourceY, int CellWidth, int CellHeight,
|
||||||
|
int TerminalFrame, long FramePeriodMs)
|
||||||
|
{
|
||||||
|
/// <summary>Select the current atlas frame. TerminalFrame is the exclusive native upper bound,
|
||||||
|
/// so SYSTEM4's value 12 addresses the twelve cells 0 through 11.</summary>
|
||||||
|
public int FrameAt(long elapsedMs)
|
||||||
|
{
|
||||||
|
int frameCount = System.Math.Max(1, TerminalFrame);
|
||||||
|
long period = System.Math.Max(1, FramePeriodMs);
|
||||||
|
return (int)(System.Math.Max(0, elapsedMs) / period % frameCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
4
engine/Age.Engine/Model/DiagnosticContracts.cs
Normal file
4
engine/Age.Engine/Model/DiagnosticContracts.cs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
namespace Age.Engine.Model;
|
||||||
|
|
||||||
|
/// <summary>A synchronous AGE-owned diagnostic prompt after native body/context formatting.</summary>
|
||||||
|
public readonly record struct DiagnosticMessage(string Caption, string Text);
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
using Age.Engine.Hosting;
|
|
||||||
using Age.Engine.Model;
|
using Age.Engine.Model;
|
||||||
|
|
||||||
namespace Age.Engine.Text;
|
namespace Age.Engine.Text;
|
||||||
|
|||||||
Reference in New Issue
Block a user