mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Axe scriptclass::resetgametomenu
This creates the game over screen for dying in No Death Mode. It's three lines long and it's only called once. There's no reason it has to be a separate function. From the name it sounds like it was meant to be a generic function but it's anything but that. So just inline it in to where it's called.
This commit is contained in:
@@ -464,7 +464,9 @@ void gamelogic(void)
|
||||
if (graphics.fademode == FADE_FULLY_BLACK)
|
||||
{
|
||||
game.copyndmresults();
|
||||
script.resetgametomenu();
|
||||
obj.entities.clear();
|
||||
game.quittomenu();
|
||||
game.createmenu(Menu::gameover);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2365,13 +2365,6 @@ void scriptclass::run(void)
|
||||
}
|
||||
}
|
||||
|
||||
void scriptclass::resetgametomenu(void)
|
||||
{
|
||||
obj.entities.clear();
|
||||
game.quittomenu();
|
||||
game.createmenu(Menu::gameover);
|
||||
}
|
||||
|
||||
static void gotoerrorloadinglevel(void)
|
||||
{
|
||||
game.createmenu(Menu::errorloadinglevel);
|
||||
|
||||
@@ -77,8 +77,6 @@ public:
|
||||
|
||||
void run(void);
|
||||
|
||||
void resetgametomenu(void);
|
||||
|
||||
void startgamemode(enum StartMode mode);
|
||||
|
||||
void teleport(void);
|
||||
|
||||
Reference in New Issue
Block a user