Fix ADV and BUNKI animation polish

This commit is contained in:
gamer147
2026-07-27 11:15:41 -04:00
parent 843b282cc4
commit 50a6bd5a40
11 changed files with 199 additions and 19 deletions

View File

@@ -6,7 +6,17 @@ namespace Age.Engine.Hosting;
public readonly record struct AdvWaitIndicatorConfig(
int LayoutSlot, int X, int Y, int SurfaceSlot,
int SourceX, int SourceY, int CellWidth, int CellHeight,
int TerminalFrame, long FramePeriodMs);
int TerminalFrame, long FramePeriodMs)
{
/// <summary>Select the current atlas frame. TerminalFrame is the exclusive native upper bound,
/// so SYSTEM4's value 12 addresses the twelve cells 0 through 11.</summary>
public int FrameAt(long elapsedMs)
{
int frameCount = System.Math.Max(1, TerminalFrame);
long period = System.Math.Max(1, FramePeriodMs);
return (int)(System.Math.Max(0, elapsedMs) / period % frameCount);
}
}
public readonly record struct AdvAutoWaitState(
bool Enabled, bool VoicePending, long PostVoiceDelayMs, long UnvoicedDelayMs);