From 56099072165578b505a6c81e187cf392b9bd5a2e Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 16 Mar 2026 20:59:04 +0200 Subject: fix: Rework interpolation to use newly introduced start and end frame times --- AnimationInterpolate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'AnimationInterpolate.c') diff --git a/AnimationInterpolate.c b/AnimationInterpolate.c index 44bdafc..a84b5a2 100644 --- a/AnimationInterpolate.c +++ b/AnimationInterpolate.c @@ -29,11 +29,11 @@ A_Interpolate(const Animation* anim, PixelRendererParams a) { return a.pixel; } - if (a.frame.current == in.startFrame) { + if (a.frame.current == a.frame.start) { memcpy(in.initialValueTemp, in.value, in.initialValueTempSize); } - double perc = (double)(a.frame.current - in.startFrame) / (in.endFrame - in.startFrame); + double perc = (double)(a.frame.current - a.frame.start) / (a.frame.end - a.frame.start); if (perc < 0.0) perc = 0.0; if (perc > 1.0) perc = 1.0; -- cgit v1.2.3