mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-02-01 21:55:01 +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;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Game::returntopausemenu()
|
||||
{
|
||||
ingame_titlemode = false;
|
||||
returntomenu(kludge_ingametemp);
|
||||
gamestate = MAPMODE;
|
||||
map.kludge_to_bg();
|
||||
}
|
||||
|
|
|
@ -407,6 +407,8 @@ public:
|
|||
bool over30mode;
|
||||
|
||||
bool ingame_titlemode;
|
||||
|
||||
void returntopausemenu();
|
||||
};
|
||||
|
||||
extern Game game;
|
||||
|
|
|
@ -377,10 +377,7 @@ void menuactionpress()
|
|||
music.playef(11);
|
||||
if (game.ingame_titlemode)
|
||||
{
|
||||
game.ingame_titlemode = false;
|
||||
game.returntomenu(game.kludge_ingametemp);
|
||||
game.gamestate = MAPMODE;
|
||||
map.kludge_to_bg();
|
||||
game.returntopausemenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -593,10 +590,7 @@ void menuactionpress()
|
|||
music.playef(11);
|
||||
if (game.ingame_titlemode)
|
||||
{
|
||||
game.ingame_titlemode = false;
|
||||
game.returntomenu(game.kludge_ingametemp);
|
||||
game.gamestate = MAPMODE;
|
||||
map.kludge_to_bg();
|
||||
game.returntopausemenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue