From 9ea5734abb499a3a6a51c0e54f5a70c8a5fa8916 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 28 Apr 2020 19:54:53 -0700 Subject: [PATCH] Move backboxrect off of Graphics No need for a temporary rect to be on the Graphics class itself. --- desktop_version/src/Graphics.cpp | 3 +-- desktop_version/src/Graphics.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 43550bda..b63e67c1 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -95,7 +95,6 @@ void Graphics::init() // initialize everything else to zero backBuffer = NULL; - backboxrect = SDL_Rect(); bcol = 0; bcol2 = 0; ct = colourTransform(); @@ -1952,7 +1951,7 @@ void Graphics::drawbackground( int t ) break; } - backboxrect = backboxes[i]; + SDL_Rect 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); diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 5ab717ef..9ac181ea 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -284,7 +284,6 @@ public: std::vector backboxvx; std::vector backboxvy; std::vector backboxint; - SDL_Rect backboxrect; int warpskip, warpfcol, warpbcol;