Menudo puto lio de renamar coses, a vore si tot va quedant al lloc que els structs i els enums estan revolant i duplicats per tots llocs

This commit is contained in:
2024-10-11 20:12:50 +02:00
parent a9ca23138d
commit 3a6950f3a4
28 changed files with 445 additions and 454 deletions

View File

@@ -31,7 +31,7 @@
#include "options.h" // for options, loadOptionsFile, saveO...
#include "param.h" // for param, loadParamsFromFile
#include "screen.h" // for Screen
#include "section.h" // for name_e, name, options, options_e
#include "section.h" // for SectionName, name, options, SectionOptions
#include "title.h" // for Title
#include "utils.h" // for MusicFile, SoundFile, opt...
#include <memory>
@@ -44,12 +44,12 @@
Director::Director(int argc, char *argv[])
{
#ifdef RECORDING
section::name = section::NAME_GAME;
section::options = section::OPTIONS_GAME_PLAY_1P;
section::name = section::Name::GAME;
section::options = section::Options::GAME_PLAY_1P;
#elif DEBUG
section::name = section::NAME_LOGO;
section::name = section::Name::LOGO;
#else
section::name = section::NAME_LOGO;
section::name = section::Name::LOGO;
#endif
// Comprueba los parametros del programa
@@ -631,7 +631,7 @@ void Director::runTitle()
// Ejecuta la sección donde se juega al juego
void Director::runGame()
{
const auto playerID = section::options == section::OPTIONS_GAME_PLAY_1P ? 1 : 2;
const auto playerID = section::options == section::Options::GAME_PLAY_1P ? 1 : 2;
constexpr auto currentStage = 0;
auto game = new Game(playerID, currentStage, GAME_MODE_DEMO_OFF, getMusic(musics_, "playing.ogg"));
game->run();
@@ -667,39 +667,39 @@ void Director::runDemoGame()
int Director::run()
{
// Bucle principal
while (section::name != section::NAME_QUIT)
while (section::name != section::Name::QUIT)
{
switch (section::name)
{
case section::NAME_INIT:
section::name = section::NAME_LOGO;
case section::Name::INIT:
section::name = section::Name::LOGO;
break;
case section::NAME_LOGO:
case section::Name::LOGO:
runLogo();
break;
case section::NAME_INTRO:
case section::Name::INTRO:
runIntro();
break;
case section::NAME_TITLE:
case section::Name::TITLE:
runTitle();
break;
case section::NAME_GAME:
case section::Name::GAME:
runGame();
break;
case section::NAME_HI_SCORE_TABLE:
case section::Name::HI_SCORE_TABLE:
runHiScoreTable();
break;
case section::NAME_GAME_DEMO:
case section::Name::GAME_DEMO:
runDemoGame();
break;
case section::NAME_INSTRUCTIONS:
case section::Name::INSTRUCTIONS:
runInstructions();
break;
@@ -708,7 +708,7 @@ int Director::run()
}
}
const int returnCode = section::options == section::OPTIONS_QUIT_NORMAL ? 0 : 1;
const int returnCode = section::options == section::Options::QUIT_NORMAL ? 0 : 1;
return returnCode;
}