- [NEW] Pantalla de game over

- [NEW] Stats
This commit is contained in:
2024-07-24 23:05:24 +02:00
parent 3a51938d80
commit 0a1b4f8715
8 changed files with 165 additions and 15 deletions

View File

@@ -12,6 +12,7 @@
#include "m_menu.h"
#include "m_logo.h"
#include "m_ingame.h"
#include "m_gameover.h"
#include "m_menu_tecles.h"
#include "m_menu_audio.h"
@@ -19,8 +20,9 @@
#define M_MENU 1
#define M_GAME 2
#define M_INGAME 3
#define M_MENU_TECLES 4
#define M_MENU_AUDIO 5
#define M_GAMEOVER 4
#define M_MENU_TECLES 5
#define M_MENU_AUDIO 6
int current_module = M_LOGO;
int zoom = 3;
@@ -113,11 +115,16 @@ bool game::loop()
}
break;
case M_GAME:
if (!modules::game::loop()) {
if (editor::isDevMode()) {
return false;
} else {
modules::ingame::init(); current_module = M_INGAME;
option = modules::game::loop();
if (option!=GAME_NONE) {
if (option==GAME_MENU) {
if (editor::isDevMode()) {
return false;
} else {
modules::ingame::init(); current_module = M_INGAME;
}
} else if (option==GAME_DEAD) {
modules::gameover::init(); current_module = M_GAMEOVER;
}
}
break;
@@ -128,6 +135,11 @@ bool game::loop()
if (option == INGAME_CONTINUAR) { current_module = M_GAME; }
}
break;
case M_GAMEOVER:
if (!modules::gameover::loop()) {
modules::menu::init(); current_module = M_MENU;
}
break;
case M_MENU_TECLES:
if (modules::menu_tecles::loop() == MENU_TECLES_TORNAR) {
modules::menu::init(); current_module = M_MENU;