La música la tiene ahora la clase Director
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#define DEATH_COUNTER 350
|
||||
|
||||
// Constructor
|
||||
Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, param_t *param, options_t *options, section_t *section)
|
||||
Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, param_t *param, options_t *options, section_t *section, JA_Music_t *music)
|
||||
{
|
||||
// Copia los punteros
|
||||
this->renderer = renderer;
|
||||
@@ -14,6 +14,7 @@ Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *scree
|
||||
this->param = param;
|
||||
this->options = options;
|
||||
this->section = section;
|
||||
this->music = music;
|
||||
|
||||
// Pasa variables
|
||||
this->demo.enabled = demo;
|
||||
@@ -150,8 +151,6 @@ Game::~Game()
|
||||
JA_DeleteSound(clockSound);
|
||||
JA_DeleteSound(powerBallSound);
|
||||
JA_DeleteSound(coffeeMachineSound);
|
||||
|
||||
JA_DeleteMusic(gameMusic);
|
||||
}
|
||||
|
||||
// Inicializa las variables necesarias para la sección 'Game'
|
||||
@@ -499,9 +498,6 @@ void Game::loadMedia()
|
||||
stageChangeSound = JA_LoadSound(asset->get("stage_change.wav").c_str());
|
||||
coffeeMachineSound = JA_LoadSound(asset->get("title.wav").c_str());
|
||||
|
||||
// Musicas
|
||||
gameMusic = JA_LoadMusic(asset->get("playing.ogg").c_str());
|
||||
|
||||
if (options->console)
|
||||
{
|
||||
std::cout << "** RESOURCES FOR GAME SECTION LOADED" << std::endl
|
||||
@@ -3001,7 +2997,7 @@ void Game::run()
|
||||
{
|
||||
if (players[0]->isAlive())
|
||||
{
|
||||
JA_PlayMusic(gameMusic);
|
||||
JA_PlayMusic(music);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user