Promote 0x208 from stub to a real VM op that writes the loaded texture's width/height into its two output globals, via new IHost.GetTextureSize. This is the single native primitive the CG-load subroutine (SC0000 label_12649) needs; all downstream centering/anchor geometry is already computed in bytecode. Non-Godot hosts return (0,0) so trace/selftest parity holds (engine 9/9 incl. TraceDiffTests). Godot host gets a temporary (0,0) stub; real impl in the compositor task. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 lines
495 B
C#
15 lines
495 B
C#
namespace Age.Engine.Hosting;
|
|
public interface IHost
|
|
{
|
|
void ShowText(int offset, string text);
|
|
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 srcX, int srcY, int width, int height, int dstX, int dstY);
|
|
(int Width, int Height) GetTextureSize(int slot);
|
|
void PlayBgm(long id);
|
|
void PlayVoice(long id);
|
|
}
|