Implement native text face selection

This commit is contained in:
gamer147
2026-07-28 14:16:24 -04:00
parent 43eb6daa82
commit 5b47872365
12 changed files with 270 additions and 33 deletions

View File

@@ -27,9 +27,10 @@ public readonly record struct AdvTextStyle(
int RenderMode,
int EffectOffsetX,
int EffectOffsetY,
int LineSpacing)
int LineSpacing,
string FontFace)
{
public static AdvTextStyle Default => new(0, 0, false, 0, 0, 0, 0, 0, 6);
public static AdvTextStyle Default => new(0, 0, false, 0, 0, 0, 0, 0, 6, "");
}
/// <summary>A stable snapshot of the layout state associated with a retained record.</summary>

View File

@@ -2269,6 +2269,7 @@ public sealed class VirtualMachine
case "end-text-line":
TextHistory.EndLine((int)Read(a[0]), _advTextStyle); return pc + 1;
case "set-font":
_advTextStyle = _advTextStyle with { FontFace = ReadStr(a[0]) }; return pc + 1;
case "comment": case "display-furigana": case "dev_ukn":
return pc + 1;
case "create-texture": // 0x1f8 (slot)(w)(h) — allocate a blank surface at the slot