Extract VM movie opcode handler

This commit is contained in:
gamer147
2026-08-02 23:34:22 -04:00
parent 5587b47152
commit 889b7e5336
4 changed files with 124 additions and 87 deletions

View File

@@ -175,7 +175,9 @@ accounting, and visible retained-scene snapshots.
`engine/Age.Engine/Vm/VirtualMachine.cs` retains VM lifecycle, cross-domain state, and the proven top-level
opcode dispatcher. Its partial-class companion `engine/Age.Engine/Vm/VirtualMachine.Audio.cs` owns VM audio
state, BGM restart semantics, and the BGM/voice/SFX/mixer opcode handler; `Step` retains the audio labels and
routes that family into the handler.
routes that family into the handler. `engine/Age.Engine/Vm/VirtualMachine.Movie.cs` owns modal/asynchronous/
positioned movie playback, movie surface metadata/activity queries, and movie-mask transition dispatch; `Step`
likewise retains and routes the movie labels.
The disposable `build/page-map-<SCENE>.jsonl` files are produced by editor/development Godot runs and map
runtime ADV page ordinals to their authoritative script offsets for `tools/locate_page.py`. Packaged exports

View File

@@ -630,6 +630,12 @@ do not mix mechanical moves with semantic changes.
routes only that family through `StepAudio`; public VM behavior and case-body logic remain unchanged. Runtime
validation remains green.
The second bounded `VirtualMachine.Step` extraction moved modal, asynchronous, and positioned movie playback,
movie surface stop-time/activity queries, and movie-mask transition case bodies into
`engine/Age.Engine/Vm/VirtualMachine.Movie.cs`. The top-level dispatcher retains all movie labels at their
existing positions and routes them through `StepMovie`; the original instruction remains available for the
two bytecode-offset compatibility paths. Runtime validation remains green.
**Gate:** no externally visible behavior or command changes; generated artifacts are byte-identical where
deterministic, and the corresponding engine, Python, Godot, and corpus validations remain green after
each domain move.
@@ -1001,8 +1007,8 @@ layer's rendering diverges from ADV; save layout.
## 8. Immediate next step
Continue step 2 of the **codebase consolidation** maintenance slice: behavior-neutral physical splits backed
by the tracked launcher and layered validation driver. With the planned `Main`, `GodotAdvHost`, and `GfxState`
domains isolated and the first `VirtualMachine.Step` family routed through a domain handler, extract the movie
opcode family next without replacing the proven dispatcher or changing public types, commands, and generated
output.
domains isolated and the first two `VirtualMachine.Step` families routed through domain handlers, extract the
surface/texture opcode family next without replacing the proven dispatcher or changing public types, commands,
and generated output.
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.