Classe Screen melitonada
This commit is contained in:
@@ -72,7 +72,8 @@ Director::Director(int argc, char *argv[])
|
||||
input = new Input(asset->get("gamecontrollerdb.txt"));
|
||||
initInput();
|
||||
|
||||
screen = new Screen(window, renderer, asset, input);
|
||||
Screen::Init(window, renderer, asset, input);
|
||||
screen = Screen::get();
|
||||
|
||||
// Carga los sonidos del juego
|
||||
loadSounds();
|
||||
@@ -87,7 +88,7 @@ Director::~Director()
|
||||
|
||||
delete asset;
|
||||
delete input;
|
||||
delete screen;
|
||||
Screen::Destroy();
|
||||
|
||||
deleteSounds();
|
||||
deleteMusics();
|
||||
@@ -599,7 +600,7 @@ void Director::deleteMusics()
|
||||
// Ejecuta la sección con el logo
|
||||
void Director::runLogo()
|
||||
{
|
||||
logo = new Logo(screen, asset, input);
|
||||
logo = new Logo(asset, input);
|
||||
logo->run();
|
||||
delete logo;
|
||||
}
|
||||
@@ -607,7 +608,7 @@ void Director::runLogo()
|
||||
// Ejecuta la sección con la secuencia de introducción
|
||||
void Director::runIntro()
|
||||
{
|
||||
intro = new Intro(screen, asset, input, getMusic(musics, "intro.ogg"));
|
||||
intro = new Intro(asset, input, getMusic(musics, "intro.ogg"));
|
||||
intro->run();
|
||||
delete intro;
|
||||
}
|
||||
@@ -615,7 +616,7 @@ void Director::runIntro()
|
||||
// Ejecuta la sección con el titulo del juego
|
||||
void Director::runTitle()
|
||||
{
|
||||
title = new Title(screen, asset, input, getMusic(musics, "title.ogg"));
|
||||
title = new Title(asset, input, getMusic(musics, "title.ogg"));
|
||||
title->run();
|
||||
delete title;
|
||||
}
|
||||
@@ -625,7 +626,7 @@ void Director::runGame()
|
||||
{
|
||||
const int playerID = section::options;
|
||||
const int currentStage = 0;
|
||||
game = new Game(playerID, currentStage, GAME_MODE_DEMO_OFF, screen, asset, input, getMusic(musics, "playing.ogg"));
|
||||
game = new Game(playerID, currentStage, GAME_MODE_DEMO_OFF, asset, input, getMusic(musics, "playing.ogg"));
|
||||
game->run();
|
||||
delete game;
|
||||
}
|
||||
@@ -633,7 +634,7 @@ void Director::runGame()
|
||||
// Ejecuta la sección donde se muestran las instrucciones
|
||||
void Director::runInstructions()
|
||||
{
|
||||
instructions = new Instructions(screen, asset, input, getMusic(musics, "title.ogg"));
|
||||
instructions = new Instructions(asset, input, getMusic(musics, "title.ogg"));
|
||||
instructions->run();
|
||||
delete instructions;
|
||||
}
|
||||
@@ -641,7 +642,7 @@ void Director::runInstructions()
|
||||
// Ejecuta la sección donde se muestra la tabla de puntuaciones
|
||||
void Director::runHiScoreTable()
|
||||
{
|
||||
hiScoreTable = new HiScoreTable(screen, asset, input, getMusic(musics, "title.ogg"));
|
||||
hiScoreTable = new HiScoreTable(asset, input, getMusic(musics, "title.ogg"));
|
||||
hiScoreTable->run();
|
||||
delete hiScoreTable;
|
||||
}
|
||||
@@ -651,7 +652,7 @@ void Director::runDemoGame()
|
||||
{
|
||||
const int playerID = (rand() % 2) + 1;
|
||||
const int currentStage = 0;
|
||||
demoGame = new Game(playerID, currentStage, GAME_MODE_DEMO_ON, screen, asset, input, nullptr);
|
||||
demoGame = new Game(playerID, currentStage, GAME_MODE_DEMO_ON, asset, input, nullptr);
|
||||
demoGame->run();
|
||||
delete demoGame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user