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

Move returning to lab to separate variables

Again, what I've done here is removed the over-reliance on Terry's State
Machine to return to the lab, and just moved it into separate variables
instead. This means that returning to the lab is ALMOST entirely
self-contained in MAPMODE, except there's a quick jaunt over to GAMEMODE
to run a script because you can only run scripts in GAMEMODE.
This commit is contained in:
Misa 2020-05-07 15:30:26 -07:00 committed by Ethan Lee
parent 17e7c6983b
commit fc2f269548
3 changed files with 19 additions and 0 deletions

View File

@ -372,6 +372,8 @@ void Game::init(void)
fadetomenu = false;
fadetomenudelay = 0;
fadetolab = false;
fadetolabdelay = 0;
/* Terry's Patrons... */
superpatrons.push_back("Anders Ekermo");

View File

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

View File

@ -1825,6 +1825,19 @@ void mapinput()
}
}
if (game.fadetolab)
{
if (game.fadetolabdelay > 0)
{
game.fadetolabdelay--;
}
else
{
game.returntolab();
game.fadetolab = false;
}
}
if(graphics.menuoffset==0)
{
if (graphics.flipmode)
@ -2001,6 +2014,8 @@ void mapinput()
game.swnmode = false;
graphics.fademode = 2;
music.fadeout();
game.fadetolab = true;
game.fadetolabdelay = 15;
}
}