From 684aa38ff2664aea60203c5c183fdf3689e81afb Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 28 Apr 2020 19:45:18 -0700 Subject: [PATCH] Interpolate Lab backboxes So that they look buttery smooth. --- desktop_version/src/Graphics.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 60ef4c68..c0cfeaf2 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1958,11 +1958,16 @@ void Graphics::drawbackground( int t ) } break; } - FillRect(backBuffer, backboxes[i], bcol); - backboxrect.x = backboxes[i].x + 1; - backboxrect.y = backboxes[i].y + 1; - backboxrect.w = backboxes[i].w - 2; - backboxrect.h = backboxes[i].h - 2; + + backboxrect = backboxes[i]; + backboxrect.x = lerp(backboxes[i].x - backboxvx[i], backboxes[i].x); + backboxrect.y = lerp(backboxes[i].y - backboxvy[i], backboxes[i].y); + + FillRect(backBuffer, backboxrect, bcol); + backboxrect.x += 1; + backboxrect.y += 1; + backboxrect.w -= 2; + backboxrect.h -= 2; FillRect(backBuffer,backboxrect, bcol2); } break;