Removes "resume" option from menu when game over.
This commit is contained in:
parent
988d6c5cac
commit
252955bc8d
16
src/main.c
16
src/main.c
|
@ -295,6 +295,21 @@ initInGameMenu(void)
|
||||||
createMenu(&inGameMenu, menu_items, 3);
|
createMenu(&inGameMenu, menu_items, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
createInGameGameOverMenu(void)
|
||||||
|
{
|
||||||
|
struct MENU_ITEM menu_items[] = {
|
||||||
|
{ "MAIN MENU", goToMainMenu },
|
||||||
|
{ "QUIT", exitGame },
|
||||||
|
};
|
||||||
|
|
||||||
|
if (inGameMenu) {
|
||||||
|
menu_destroy(inGameMenu);
|
||||||
|
inGameMenu = NULL;
|
||||||
|
}
|
||||||
|
createMenu(&inGameMenu, menu_items, 2);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
initMainMenu(void)
|
initMainMenu(void)
|
||||||
{
|
{
|
||||||
|
@ -553,6 +568,7 @@ run_game(void)
|
||||||
gui_event_message("You died!");
|
gui_event_message("You died!");
|
||||||
mixer_play_effect(SPLAT);
|
mixer_play_effect(SPLAT);
|
||||||
gGameState = GAME_OVER;
|
gGameState = GAME_OVER;
|
||||||
|
createInGameGameOverMenu();
|
||||||
} else {
|
} else {
|
||||||
check_next_level();
|
check_next_level();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue