mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Remove mainmenu from Game
Since mainmenu is only ever used in Input.cpp, I might as well make it clearer by moving it into a static global variable in Input.cpp. (The same applies to fadetolab/fadetomenu, but I didn't think much about those at the time... that'll be a refactor for later.)
This commit is contained in:
parent
be10487c5c
commit
100d986431
3 changed files with 3 additions and 4 deletions
|
@ -242,7 +242,6 @@ public:
|
||||||
bool startscript;
|
bool startscript;
|
||||||
std::string newscript;
|
std::string newscript;
|
||||||
|
|
||||||
int mainmenu;
|
|
||||||
bool menustart;
|
bool menustart;
|
||||||
|
|
||||||
//Teleporting
|
//Teleporting
|
||||||
|
|
|
@ -190,10 +190,11 @@ static void toggleflipmode(void)
|
||||||
|
|
||||||
static bool fadetomode = false;
|
static bool fadetomode = false;
|
||||||
static int fadetomodedelay = 0;
|
static int fadetomodedelay = 0;
|
||||||
|
static int gotomode = 0;
|
||||||
|
|
||||||
static void startmode(const int mode)
|
static void startmode(const int mode)
|
||||||
{
|
{
|
||||||
game.mainmenu = mode;
|
gotomode = mode;
|
||||||
graphics.fademode = 2; /* fading out */
|
graphics.fademode = 2; /* fading out */
|
||||||
fadetomode = true;
|
fadetomode = true;
|
||||||
fadetomodedelay = 16;
|
fadetomodedelay = 16;
|
||||||
|
@ -1668,7 +1669,7 @@ void titleinput(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fadetomode = false;
|
fadetomode = false;
|
||||||
script.startgamemode(game.mainmenu);
|
script.startgamemode(gotomode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -505,7 +505,6 @@ int main(int argc, char *argv[])
|
||||||
game.gamestate = PRELOADER;
|
game.gamestate = PRELOADER;
|
||||||
|
|
||||||
game.menustart = false;
|
game.menustart = false;
|
||||||
game.mainmenu = 0;
|
|
||||||
|
|
||||||
// Initialize title screen to cyan
|
// Initialize title screen to cyan
|
||||||
graphics.titlebg.colstate = 10;
|
graphics.titlebg.colstate = 10;
|
||||||
|
|
Loading…
Reference in a new issue