- Menú bàsic funcionant

This commit is contained in:
2024-07-06 14:25:03 +02:00
parent 2b60054466
commit f9733da46f
7 changed files with 71 additions and 9 deletions

View File

@@ -36,13 +36,18 @@ void game::init()
bool game::loop()
{
int option;
switch(current_module)
{
case M_LOGO:
if (!modules::logo::loop()) { modules::menu::init(); current_module = M_MENU; }
break;
case M_MENU:
if (!modules::menu::loop()) { modules::game::init(); current_module = M_GAME; }
option = modules::menu::loop();
if (option != OPTION_NONE) {
if (option == OPTION_EIXIR) return false;
if (option == OPTION_JUGAR) { modules::game::init(); current_module = M_GAME; }
}
break;
case M_GAME:
return modules::game::loop();