mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01: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:
parent
17e7c6983b
commit
fc2f269548
3 changed files with 19 additions and 0 deletions
|
@ -372,6 +372,8 @@ void Game::init(void)
|
|||
|
||||
fadetomenu = false;
|
||||
fadetomenudelay = 0;
|
||||
fadetolab = false;
|
||||
fadetolabdelay = 0;
|
||||
|
||||
/* Terry's Patrons... */
|
||||
superpatrons.push_back("Anders Ekermo");
|
||||
|
|
|
@ -383,6 +383,8 @@ public:
|
|||
void returntolab();
|
||||
bool fadetomenu;
|
||||
int fadetomenudelay;
|
||||
bool fadetolab;
|
||||
int fadetolabdelay;
|
||||
};
|
||||
|
||||
extern Game game;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue