Añadido enter_id.cpp

Cambiados los defines de nombre de secciones y subsecciones
This commit is contained in:
2023-09-22 23:23:48 +02:00
parent 2e5f52d836
commit 337e6ed6cc
11 changed files with 490 additions and 108 deletions

View File

@@ -19,7 +19,7 @@ Logo::Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input)
// Inicializa variables
counter = 0;
section.name = PROG_SECTION_LOGO;
section.name = SECTION_PROG_LOGO;
section.subsection = 0;
ticks = 0;
ticksSpeed = 15;
@@ -40,7 +40,7 @@ void Logo::checkLogoEnd()
{
if (counter >= END_LOGO + 20)
{
section.name = PROG_SECTION_INTRO;
section.name = SECTION_PROG_INTRO;
section.subsection = 0;
}
}
@@ -54,7 +54,7 @@ void Logo::checkEvents()
// Evento de salida de la aplicación
if (eventHandler->type == SDL_QUIT)
{
section.name = PROG_SECTION_QUIT;
section.name = SECTION_PROG_QUIT;
break;
}
}
@@ -65,7 +65,7 @@ void Logo::checkInput()
{
if (input->checkInput(input_exit, REPEAT_FALSE))
{
section.name = PROG_SECTION_QUIT;
section.name = SECTION_PROG_QUIT;
}
else if (input->checkInput(input_window_fullscreen, REPEAT_FALSE))
@@ -85,8 +85,8 @@ void Logo::checkInput()
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE))
{
section.name = PROG_SECTION_TITLE;
section.subsection = TITLE_SECTION_1;
section.name = SECTION_PROG_TITLE;
section.subsection = SUBSECTION_TITLE_1;
}
}
@@ -148,7 +148,7 @@ section_t Logo::run()
{
JA_StopMusic();
while (section.name == PROG_SECTION_LOGO)
while (section.name == SECTION_PROG_LOGO)
{
update();
checkEvents();