- Menú bàsic funcionant
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user