From 37fd24bd85618938881eb7a2e6c4db39096d2d05 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 11 Jun 2021 22:20:06 -0700 Subject: [PATCH] Interpolate gravitron square indicators This is more future-proofing than anything else. The position of the indicators is just the x-position of the gravitron square divided by 10, but the gravitron squares will always only ever move at 7 pixels per frame - so the distance an indicator travels on each frame will only ever be at most 1 pixel. But just in case in the future gravitron squares become faster than 10 pixels per frame, their indicators will be interpolated as well. --- desktop_version/src/Graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index e0df8b8c..2660df34 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -2033,7 +2033,7 @@ void Graphics::drawentity(const int i, const int yoff) { if (obj.entities[i].xp < -100) { - tpoint.x = -5 + (int(( -obj.entities[i].xp) / 10)); + tpoint.x = -5 + (int(( -xp) / 10)); } else { @@ -2056,7 +2056,7 @@ void Graphics::drawentity(const int i, const int yoff) { if (obj.entities[i].xp > 420) { - tpoint.x = 320 - (int(( obj.entities[i].xp-320) / 10)); + tpoint.x = 320 - (int(( xp-320) / 10)); } else {