Afegit estat pre-logo per a poder fer reset mes millor

This commit is contained in:
2024-09-26 22:50:46 +02:00
parent 05e3fddb8f
commit 5ca4ee0bb8
4 changed files with 23 additions and 2 deletions

View File

@@ -11,6 +11,7 @@
#define PLAY_AREA_TOP 0
// Secciones del programa
#define SECTION_PROG_INIT 8
#define SECTION_PROG_LOGO 0
#define SECTION_PROG_INTRO 1
#define SECTION_PROG_TITLE 2

View File

@@ -950,6 +950,10 @@ int Director::run()
{
switch (section->name)
{
case SECTION_PROG_INIT:
section->name = SECTION_PROG_LOGO;
break;
case SECTION_PROG_LOGO:
runLogo();
break;
@@ -1194,7 +1198,7 @@ std::string Director::getLangFile(lang::lang_e lang)
case lang::en_UK:
return asset->get("en_UK.txt");
break;
default:
break;
}

View File

@@ -220,7 +220,7 @@ void Intro::checkInput()
// Comprueba si se va a resetear el juego
if (input->checkModInput(input_service, input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
{
section->name = SECTION_PROG_LOGO;
section->name = SECTION_PROG_INIT;
screen->showNotification("Reset");
return;
}

View File

@@ -111,6 +111,14 @@ void Logo::checkInput()
return;
}
// Comprueba si se va a resetear el juego
if (input->checkInput(input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD))
{
section->name = SECTION_PROG_INIT;
screen->showNotification("Reset");
return;
}
// Comprueba si se ha pulsado cualquier botón (de los usados para jugar)
if (input->checkAnyButtonPressed())
{
@@ -129,6 +137,14 @@ void Logo::checkInput()
return;
}
// Comprueba si se va a resetear el juego
if (input->checkModInput(input_service, input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
{
section->name = SECTION_PROG_INIT;
screen->showNotification("Reset");
return;
}
// Comprueba si se va a activar o desactivar el audio
if (input->checkModInput(input_service, input_mute, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
{