From 52a7d426726abc1fd73d577fb33061f2e2fba792 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 19 Mar 2021 13:31:53 -0700 Subject: [PATCH] De-duplicate Flip Mode text printing Since the only difference in Flip Mode is the positiveness/negativeness of the iterator variable, plus the starting y-offset, I've removed the copy-pasted code and did this instead. The diff might look a bit ugly due to the unindentation. --- desktop_version/src/Graphics.cpp | 48 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 7d5efe0d..6a6ad197 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -813,28 +813,38 @@ void Graphics::drawtowertile3( int x, int y, int t, TowerBG& bg_obj ) void Graphics::drawgui(void) { + int text_sign; + if (flipmode) + { + text_sign = -1; + } + else + { + text_sign = 1; + } + //Draw all the textboxes to the screen for (size_t i = 0; i