diff options
| author | Syndamia <kamen@syndamia.com> | 2026-03-17 20:51:56 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2026-03-17 20:51:56 +0200 |
| commit | db7a127a32441a31e1401dd2814df1b9a1a911c1 (patch) | |
| tree | 38716de7433185da1dc52d6993d8f955efba47fb /AnimationInterpolate.h | |
| parent | 56099072165578b505a6c81e187cf392b9bd5a2e (diff) | |
| download | ppm_graphics-db7a127a32441a31e1401dd2814df1b9a1a911c1.tar ppm_graphics-db7a127a32441a31e1401dd2814df1b9a1a911c1.tar.gz ppm_graphics-db7a127a32441a31e1401dd2814df1b9a1a911c1.zip | |
failed implementationinterpolation_without_temp
Since most values are integers, the rounding (any rounding) causes
misalignment with true linearity
Diffstat (limited to 'AnimationInterpolate.h')
| -rw-r--r-- | AnimationInterpolate.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/AnimationInterpolate.h b/AnimationInterpolate.h index 18ae841..eaa0b3c 100644 --- a/AnimationInterpolate.h +++ b/AnimationInterpolate.h @@ -4,19 +4,18 @@ #include "Animation.h" struct A_Interpolate { - void* initialValueTemp; - size_t initialValueTempSize; - void* value; void* goalValue; - void (*interpolate)(void* value, const void* initialState, const void* finalState, double percentage); + void (*interpolate)(void* value, const void* finalState, double percentage); + + double prevPercentage; }; ARGB A_Interpolate(const Animation* anim, PixelRendererParams params); -void AO_LineInterpolate(void* valueLine, const void* initialLine, const void* finalLine, double percentage); +void AO_LineInterpolate(void* valueLine, const void* finalLine, double percentage); -void AM_LinearInterpolate(void* valueLinear, const void* initialLinear, const void* finalLinear, double percentage); -void AM_SpinInterpolate(void* valueSpin, const void* initialSpin, const void* finalSpin, double percentage); +void AM_LinearInterpolate(void* valueLinear, const void* finalLinear, double percentage); +void AM_SpinInterpolate(void* valueSpin, const void* finalSpin, double percentage); #endif /* _ANIMATION_INTERPOLATE */ |
