mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Move title screen color initialization to main()
This fixes a bug where if you completed a custom level during command-line playtesting, when returning to the title screen, the background would be red and the text would be white. This is because playtesting skips over the code path of pressing ACTION to start the game and advance to the title screen, and the code path of that ACTION press specifically initializes the title screen colors to cyan. This is also caused by the fact that completing a custom level doesn't call map.nexttowercolour(), but my guess is that the intent there was that the player would select a custom level, complete it, and return to the title screen on the same screen with the same colors, so I decided not to add a map.nexttowercolour() there. Instead, I've moved the cyan color initialization to main(), so that it is always executed no matter what, and doesn't require you to take a specific code path to do it.
This commit is contained in:
parent
5e557ffd1a
commit
6b18e3875d
2 changed files with 4 additions and 2 deletions
|
@ -1686,8 +1686,6 @@ void titleinput()
|
|||
music.playef(18);
|
||||
game.screenshake = 10;
|
||||
game.flashlight = 5;
|
||||
graphics.titlebg.colstate = 10;
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -227,6 +227,10 @@ int main(int argc, char *argv[])
|
|||
game.menustart = false;
|
||||
game.mainmenu = 0;
|
||||
|
||||
// Initialize title screen to cyan
|
||||
graphics.titlebg.colstate = 10;
|
||||
map.nexttowercolour();
|
||||
|
||||
map.ypos = (700-29) * 8;
|
||||
graphics.towerbg.bypos = map.ypos / 2;
|
||||
graphics.titlebg.bypos = map.ypos / 2;
|
||||
|
|
Loading…
Reference in a new issue