mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-03-08 23:05:13 +01:00
Move returning to pause menu code to separate function
This code is getting a bit more complicated now, we should maybe stop copy-pasting it everywhere.
This commit is contained in:
parent
6582801dc9
commit
aa40eb6327
3 changed files with 12 additions and 8 deletions
|
@ -7755,3 +7755,11 @@ void Game::returntoeditor()
|
||||||
map.scrolldir = 0;
|
map.scrolldir = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void Game::returntopausemenu()
|
||||||
|
{
|
||||||
|
ingame_titlemode = false;
|
||||||
|
returntomenu(kludge_ingametemp);
|
||||||
|
gamestate = MAPMODE;
|
||||||
|
map.kludge_to_bg();
|
||||||
|
}
|
||||||
|
|
|
@ -407,6 +407,8 @@ public:
|
||||||
bool over30mode;
|
bool over30mode;
|
||||||
|
|
||||||
bool ingame_titlemode;
|
bool ingame_titlemode;
|
||||||
|
|
||||||
|
void returntopausemenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
|
@ -377,10 +377,7 @@ void menuactionpress()
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
if (game.ingame_titlemode)
|
if (game.ingame_titlemode)
|
||||||
{
|
{
|
||||||
game.ingame_titlemode = false;
|
game.returntopausemenu();
|
||||||
game.returntomenu(game.kludge_ingametemp);
|
|
||||||
game.gamestate = MAPMODE;
|
|
||||||
map.kludge_to_bg();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -593,10 +590,7 @@ void menuactionpress()
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
if (game.ingame_titlemode)
|
if (game.ingame_titlemode)
|
||||||
{
|
{
|
||||||
game.ingame_titlemode = false;
|
game.returntopausemenu();
|
||||||
game.returntomenu(game.kludge_ingametemp);
|
|
||||||
game.gamestate = MAPMODE;
|
|
||||||
map.kludge_to_bg();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue