From dc3d797269213cf9e07c8b2e162817825d6078ca Mon Sep 17 00:00:00 2001 From: obligaron Date: Fri, 11 Nov 2022 14:06:48 +0100 Subject: [PATCH] GetOffsetForWalking: use uint8_t for animation fraction --- Source/engine/render/scrollrt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/engine/render/scrollrt.cpp b/Source/engine/render/scrollrt.cpp index ee5b10087..27f140759 100644 --- a/Source/engine/render/scrollrt.cpp +++ b/Source/engine/render/scrollrt.cpp @@ -1278,7 +1278,7 @@ Displacement GetOffsetForWalking(const AnimationInfo &animationInfo, const Direc constexpr Displacement MovingOffset[8] = { { 0, 32 }, { -32, 16 }, { -64, 0 }, { -32, -16 }, { 0, -32 }, { 32, -16 }, { 64, 0 }, { 32, 16 } }; // clang-format on - int8_t animationProgress = animationInfo.getAnimationProgress(); + uint8_t animationProgress = animationInfo.getAnimationProgress(); Displacement offset = MovingOffset[static_cast(dir)]; offset *= animationProgress; offset /= AnimationInfo::baseValueFraction;