From 1b04cb5dd60084bf6540b2565d1ca28aeea6844d Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 15 Feb 2020 22:58:42 -0800 Subject: [PATCH] Fix crewmate-found text boxes overlapping in flip mode The problem was that the code seemed to be wrongly copy-pasted from the code for generating the trinket-found text boxes (to the point where even the comment for the crewmate-found text boxes didn't get changed from "//Found a trinket!"). For the trinket-found text boxes, they use y-positions 85 and 135 if not in flip mode, and y-positions 105 and 65 if the game IS in flip mode. These text boxes are positioned correctly in flip mode. However, for the crewmate-found text boxes, they use y-positions 85 and 135 if not in flip mode, as usual, but they use y-positions 105 and 135 if the game IS in flip mode. Looks like someone forgot to change the second y-position when copy-pasting code around. Which is actually a bit funny, because I can conclude from this that it seems like the code to position these text boxes in flip mode was bolted-on AFTER the initial code of these text boxes was written. I can also conclude (hot take incoming) that basically no one actually ever tested this game in flip mode (but that was already evident, given TerryCavanagh/VVVVVV#140, less strongly TerryCavanagh/VVVVVV#141, and TerryCavanagh/VVVVVV#142 is another flip-mode-related bug which I guess sorta kinda doesn't really count since text outline wasn't enabled until 2.3?). So I fixed the second y-position to be 65, just like the y-position the trinket text boxes use. I even took the opportunity to fix the comment to say "//Found a crewmate!" instead of "//Found a trinket!". --- desktop_version/src/Game.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index c674176e..b6eb7122 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -2012,7 +2012,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit statedelay = 15; break; case 1011: - //Found a trinket! + //Found a crewmate! advancetext = true; state++; if (dwgfx.flipmode) @@ -2024,15 +2024,15 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if(int(map.customcrewmates-crewmates)==0) { - dwgfx.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); + dwgfx.createtextbox(" All crewmates rescued! ", 50, 65, 174, 174, 174); } else if(map.customcrewmates-crewmates==1) { - dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 65, 174, 174, 174); } else { - dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 65, 174, 174, 174); } dwgfx.textboxcenterx();