1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

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!".
This commit is contained in:
Misa 2020-02-15 22:58:42 -08:00 committed by Ethan Lee
parent c665d5b8c8
commit 1b04cb5dd6

View file

@ -2012,7 +2012,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit
statedelay = 15; statedelay = 15;
break; break;
case 1011: case 1011:
//Found a trinket! //Found a crewmate!
advancetext = true; advancetext = true;
state++; state++;
if (dwgfx.flipmode) if (dwgfx.flipmode)
@ -2024,15 +2024,15 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit
if(int(map.customcrewmates-crewmates)==0) 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) 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 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(); dwgfx.textboxcenterx();