Complete VM dispatcher routing split
This commit is contained in:
@@ -9,6 +9,11 @@ public sealed partial class VirtualMachine
|
||||
{
|
||||
switch (label)
|
||||
{
|
||||
case "u00415880": // 0xd9 / semantics: clear-run-state-0x1000
|
||||
return pc + 1;
|
||||
case "get-initial-root-run": // 0x130 (out)
|
||||
Write(a[0], _initialRootRun ? 1 : 0);
|
||||
return pc + 1;
|
||||
case "throw-exit-request":
|
||||
if (_o.IgnoreExitRequests) return pc + 1;
|
||||
// Native op 0x1 throws Command_Exit_Exception through callbacks and nested script
|
||||
|
||||
@@ -9,6 +9,12 @@ public sealed partial class VirtualMachine
|
||||
{
|
||||
switch (label)
|
||||
{
|
||||
case "script-entry":
|
||||
Gfx.ClearSurfaceReloadPolicies();
|
||||
return pc + 1;
|
||||
case "set-surface-persistence-flags": // 0x258 (slot)(flags): bit 0 = numbered-load reload
|
||||
Gfx.SetSurfaceReloadOnRestore(unchecked((int)Read(a[0])), (Read(a[1]) & 1) != 0);
|
||||
return pc + 1;
|
||||
case "create-texture": // 0x1f8 (slot)(w)(h) — allocate a blank surface at the slot
|
||||
_host.ReleaseSurface((int)Read(a[0]));
|
||||
Gfx.CreateSurface((int)Read(a[0]));
|
||||
@@ -68,6 +74,10 @@ public sealed partial class VirtualMachine
|
||||
Gfx.SelectRenderTarget(Read(a[0])); return pc + 1;
|
||||
case "clear-render-target": // 0x20e: clear color to black and depth to one
|
||||
_host.ClearRenderTarget(Gfx.CurrentRenderTargetSlot); return pc + 1;
|
||||
case "gfx-elem-release": // 0x1fa (surface slot)
|
||||
_host.ReleaseSurface((int)Read(a[0]));
|
||||
Gfx.ClearSurface((int)Read(a[0]));
|
||||
return pc + 1;
|
||||
case "release-transient-surfaces": // 0x23d: native fixed range [42,1000)
|
||||
Gfx.ReleaseSurfaceRange(42, 1000 - 42);
|
||||
_host.ReleaseSurfaceRange(42, 1000 - 42); return pc + 1;
|
||||
|
||||
@@ -1208,10 +1208,8 @@ public sealed partial class VirtualMachine
|
||||
switch (label)
|
||||
{
|
||||
case "script-entry":
|
||||
Gfx.ClearSurfaceReloadPolicies(); return pc + 1;
|
||||
case "set-surface-persistence-flags": // 0x258 (slot)(flags): bit 0 = numbered-load reload
|
||||
Gfx.SetSurfaceReloadOnRestore(unchecked((int)Read(a[0])), (Read(a[1]) & 1) != 0);
|
||||
return pc + 1;
|
||||
return StepSurface(label, a, pc);
|
||||
case "add":
|
||||
case "sub":
|
||||
case "mul":
|
||||
@@ -1511,10 +1509,8 @@ public sealed partial class VirtualMachine
|
||||
case "set-audio-route-enabled":
|
||||
return StepAudio(label, a, pc);
|
||||
case "u00415880": // 0xd9 / semantics: clear-run-state-0x1000
|
||||
return pc + 1;
|
||||
case "get-initial-root-run": // 0x130 (out)
|
||||
Write(a[0], _initialRootRun ? 1 : 0);
|
||||
return pc + 1;
|
||||
return StepScriptLifecycle(label, a, pc);
|
||||
case "play-modal-movie-to-surface":
|
||||
case "u004221A0":
|
||||
case "play-movie-to-surface":
|
||||
@@ -1568,7 +1564,7 @@ public sealed partial class VirtualMachine
|
||||
case "gfx-elem-erase":
|
||||
return StepRetainedObject(label, a, pc);
|
||||
case "gfx-elem-release": // 0x1fa (surface slot)
|
||||
_host.ReleaseSurface((int)Read(a[0])); Gfx.ClearSurface((int)Read(a[0])); return pc + 1;
|
||||
return StepSurface(label, a, pc);
|
||||
case "clone-gfx-object":
|
||||
return StepRetainedObject(label, a, pc);
|
||||
case "gfx-blit-color":
|
||||
|
||||
Reference in New Issue
Block a user