Fix ADV config opacity and text lifetime

This commit is contained in:
gamer147
2026-07-28 12:21:32 -04:00
parent b7f67c8715
commit 77a4687f39
16 changed files with 275 additions and 96 deletions

View File

@@ -69,6 +69,25 @@ public class HistoryPresentationOpsTests
Assert.Equal((0L, 60000L), Assert.Single(host.PresentedRanges));
}
[Fact]
public void MessageWindowAlphaSetterImmediatelyFeedsThePairedGetter()
{
var script = ScriptAssembler.Assemble(Table, "MESSAGE_WINDOW_ALPHA",
new List<(int, Operand[])>
{
(0x141, new[] { I(7) }),
(0x131, new[] { G(0x100) }),
(0x2, Array.Empty<Operand>()),
}, Array.Empty<string>());
var host = new RecordingHost();
var vm = new VirtualMachine(script, Table, host);
vm.Run();
Assert.Equal(7, host.MessageWindowAlphaSetting);
Assert.Equal(7, vm.Globals[0x100]);
}
[Fact]
public void ResetLayoutClearsItsPreviouslyBoundHostPresentation()
{