feat(a2b): promote create/set/draw-texture to IHost methods (trace parity kept)
Runtime finding: SC0000's bg is a slot-0 full-screen slideshow (res 0x23 first), not the static-path res 0x21. Target corrected to 0x23. CaptureHost/CountHost no-op the new methods. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,4 +8,7 @@ public sealed class CaptureHost : IHost
|
||||
public void CallScript(long id) => CallScriptCount++;
|
||||
public void OnStub(int opcode) { Stubs.TryGetValue(opcode, out var c); Stubs[opcode] = c + 1; }
|
||||
public void WaitForInput() { }
|
||||
public void CreateTexture(int slot, int width, int height) { }
|
||||
public void SetTexture(long resourceId, int slot) { }
|
||||
public void DrawTexture(int slot, int x, int y, int width, int height) { }
|
||||
}
|
||||
|
||||
@@ -5,4 +5,7 @@ public interface IHost
|
||||
void CallScript(long id);
|
||||
void OnStub(int opcode);
|
||||
void WaitForInput();
|
||||
void CreateTexture(int slot, int width, int height);
|
||||
void SetTexture(long resourceId, int slot);
|
||||
void DrawTexture(int slot, int x, int y, int width, int height);
|
||||
}
|
||||
|
||||
@@ -168,6 +168,12 @@ public sealed class VirtualMachine
|
||||
case "end-text-line": case "set-font":
|
||||
case "comment": case "display-furigana": case "dev_ukn":
|
||||
return pc + 1;
|
||||
case "create-texture":
|
||||
_host.CreateTexture((int)Read(a[0]), (int)Read(a[1]), (int)Read(a[2])); return pc + 1;
|
||||
case "set-texture":
|
||||
_host.SetTexture(Read(a[0]), (int)Read(a[1])); return pc + 1;
|
||||
case "draw-texture":
|
||||
_host.DrawTexture((int)Read(a[1]), (int)Read(a[2]), (int)Read(a[3]), (int)Read(a[4]), (int)Read(a[5])); return pc + 1;
|
||||
default:
|
||||
_host.OnStub(op); return pc + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user