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

@@ -16,7 +16,7 @@
Director::Director(int argc, char *argv[])
{
// Inicializa variables
section.name = PROG_SECTION_LOGO;
section.name = SECTION_PROG_LOGO;
// Inicializa las opciones del programa
initOptions();
@@ -691,7 +691,7 @@ void Director::runTitle()
void Director::runGame()
{
const int numPlayers = section.subsection == GAME_SECTION_PLAY_1P ? 1 : 2;
const int numPlayers = section.subsection == SUBSECTION_GAME_PLAY_1P ? 1 : 2;
game = new Game(numPlayers, 0, renderer, screen, asset, lang, input, false, options);
setSection(game->run());
delete game;
@@ -700,23 +700,23 @@ void Director::runGame()
void Director::run()
{
// Bucle principal
while (section.name != PROG_SECTION_QUIT)
while (section.name != SECTION_PROG_QUIT)
{
switch (section.name)
{
case PROG_SECTION_LOGO:
case SECTION_PROG_LOGO:
runLogo();
break;
case PROG_SECTION_INTRO:
case SECTION_PROG_INTRO:
runIntro();
break;
case PROG_SECTION_TITLE:
case SECTION_PROG_TITLE:
runTitle();
break;
case PROG_SECTION_GAME:
case SECTION_PROG_GAME:
runGame();
break;
}