1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-24 13:38:29 +02:00

Move fading to menu to separate variables

Alright, so what I've done here is made exiting to the menu entirely
separate from Terry's State Machine, and thus it can now take place
entirely within MAPMODE instead of having to go back to GAMEMODE. Also,
it's faster by 15 frames since we don't need to wait for the map screen
to go back down.
This commit is contained in:
Misa 2020-05-07 15:23:55 -07:00 committed by Ethan Lee
parent 69aeac2410
commit 17e7c6983b
3 changed files with 20 additions and 0 deletions

View File

@ -370,6 +370,9 @@ void Game::init(void)
playry = 0;
playgc = 0;
fadetomenu = false;
fadetomenudelay = 0;
/* Terry's Patrons... */
superpatrons.push_back("Anders Ekermo");
superpatrons.push_back("Andreas K|mper");

View File

@ -381,6 +381,8 @@ public:
void quittomenu();
void returntolab();
bool fadetomenu;
int fadetomenudelay;
};
extern Game game;

View File

@ -1812,6 +1812,19 @@ void mapinput()
game.press_action = false;
game.press_map = false;
if (game.fadetomenu)
{
if (game.fadetomenudelay > 0)
{
game.fadetomenudelay--;
}
else
{
game.quittomenu();
game.fadetomenu = false;
}
}
if(graphics.menuoffset==0)
{
if (graphics.flipmode)
@ -1970,6 +1983,8 @@ void mapinput()
graphics.fademode = 2;
music.fadeout();
map.nexttowercolour();
game.fadetomenu = true;
game.fadetomenudelay = 15;
}
}