mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -372,6 +372,8 @@ void Game::init(void)
|
|||||||
|
|
||||||
fadetomenu = false;
|
fadetomenu = false;
|
||||||
fadetomenudelay = 0;
|
fadetomenudelay = 0;
|
||||||
|
fadetolab = false;
|
||||||
|
fadetolabdelay = 0;
|
||||||
|
|
||||||
/* Terry's Patrons... */
|
/* Terry's Patrons... */
|
||||||
superpatrons.push_back("Anders Ekermo");
|
superpatrons.push_back("Anders Ekermo");
|
||||||
|
|||||||
@@ -383,6 +383,8 @@ public:
|
|||||||
void returntolab();
|
void returntolab();
|
||||||
bool fadetomenu;
|
bool fadetomenu;
|
||||||
int fadetomenudelay;
|
int fadetomenudelay;
|
||||||
|
bool fadetolab;
|
||||||
|
int fadetolabdelay;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Game game;
|
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.menuoffset==0)
|
||||||
{
|
{
|
||||||
if (graphics.flipmode)
|
if (graphics.flipmode)
|
||||||
@@ -2001,6 +2014,8 @@ void mapinput()
|
|||||||
game.swnmode = false;
|
game.swnmode = false;
|
||||||
graphics.fademode = 2;
|
graphics.fademode = 2;
|
||||||
music.fadeout();
|
music.fadeout();
|
||||||
|
game.fadetolab = true;
|
||||||
|
game.fadetolabdelay = 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user