From 8f226ced8469b03b0816e5c6337fd07040419525 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 26 Dec 2021 00:03:18 -0800 Subject: [PATCH] De-duplicate finalmode glitchname printing Instead of copy-pasting the call twice, just use a variable to switch between the two names. --- desktop_version/src/Render.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 57425fbf..557c8b48 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1732,6 +1732,8 @@ void gamerender(void) if(map.extrarow==0 || (map.custommode && map.roomname[0] != '\0')) { + const char* roomname; + graphics.footerrect.y = 230; if (graphics.translucentroomname) { @@ -1744,10 +1746,14 @@ void gamerender(void) if (map.finalmode) { - graphics.bprint(5, 231, map.glitchname, 196, 196, 255 - help.glow, true); - }else{ - graphics.bprint(5, 231, map.roomname, 196, 196, 255 - help.glow, true); + roomname = map.glitchname; } + else + { + roomname = map.roomname; + } + + graphics.bprint(5, 231, map.roomname, 196, 196, 255 - help.glow, true); } if (map.roomtexton)