Llevats uns punterets que sobraven en director.cpp

This commit is contained in:
2024-10-10 09:23:16 +02:00
parent 6fe294c59d
commit fc8fdc5fe5

View File

@@ -596,7 +596,7 @@ void Director::loadMusics()
// Ejecuta la sección con el logo
void Director::runLogo()
{
auto *logo = new Logo();
auto logo = new Logo();
logo->run();
delete logo;
}
@@ -604,7 +604,7 @@ void Director::runLogo()
// Ejecuta la sección con la secuencia de introducción
void Director::runIntro()
{
auto *intro = new Intro(getMusic(musics, "intro.ogg"));
auto intro = new Intro(getMusic(musics, "intro.ogg"));
intro->run();
delete intro;
}
@@ -612,7 +612,7 @@ void Director::runIntro()
// Ejecuta la sección con el titulo del juego
void Director::runTitle()
{
auto *title = new Title(getMusic(musics, "title.ogg"));
auto title = new Title(getMusic(musics, "title.ogg"));
title->run();
delete title;
}
@@ -622,7 +622,7 @@ void Director::runGame()
{
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"));
auto game = new Game(playerID, currentStage, GAME_MODE_DEMO_OFF, getMusic(musics, "playing.ogg"));
game->run();
delete game;
}
@@ -630,7 +630,7 @@ void Director::runGame()
// Ejecuta la sección donde se muestran las instrucciones
void Director::runInstructions()
{
auto *instructions = new Instructions(getMusic(musics, "title.ogg"));
auto instructions = new Instructions(getMusic(musics, "title.ogg"));
instructions->run();
delete instructions;
}
@@ -638,7 +638,7 @@ void Director::runInstructions()
// Ejecuta la sección donde se muestra la tabla de puntuaciones
void Director::runHiScoreTable()
{
auto *hiScoreTable = new HiScoreTable(getMusic(musics, "title.ogg"));
auto hiScoreTable = new HiScoreTable(getMusic(musics, "title.ogg"));
hiScoreTable->run();
delete hiScoreTable;
}
@@ -648,7 +648,7 @@ void Director::runDemoGame()
{
const auto playerID = (rand() % 2) + 1;
constexpr auto currentStage = 0;
auto *game = new Game(playerID, currentStage, GAME_MODE_DEMO_ON, nullptr);
auto game = new Game(playerID, currentStage, GAME_MODE_DEMO_ON, nullptr);
game->run();
delete game;
}