fix: ja torna a funcionar el cicle de música per les diferents seccions
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include <iostream>
|
||||
|
||||
// Constructor
|
||||
HiScoreTable::HiScoreTable(Screen *screen, Asset *asset, Input *input, Lang *lang, param_t *param, options_t *options, section_t *section)
|
||||
HiScoreTable::HiScoreTable(Screen *screen, Asset *asset, Input *input, Lang *lang, param_t *param, options_t *options, section_t *section, JA_Music_t *music)
|
||||
{
|
||||
// Copia punteros
|
||||
this->screen = screen;
|
||||
@@ -12,6 +12,7 @@ HiScoreTable::HiScoreTable(Screen *screen, Asset *asset, Input *input, Lang *lan
|
||||
this->section = section;
|
||||
this->options = options;
|
||||
this->param = param;
|
||||
this->music = music;
|
||||
renderer = screen->getRenderer();
|
||||
|
||||
// Objetos
|
||||
@@ -68,6 +69,10 @@ void HiScoreTable::update()
|
||||
// Actualiza el contador de ticks
|
||||
ticks = SDL_GetTicks();
|
||||
|
||||
// Mantiene la música sonando
|
||||
if ((JA_GetMusicState() == JA_MUSIC_INVALID) || (JA_GetMusicState() == JA_MUSIC_STOPPED))
|
||||
JA_PlayMusic(music);
|
||||
|
||||
// Actualiza el objeto screen
|
||||
screen->update();
|
||||
|
||||
@@ -77,6 +82,7 @@ void HiScoreTable::update()
|
||||
// Gestiona el fade
|
||||
updateFade();
|
||||
|
||||
// Gestiona el contador y sus eventos
|
||||
counter++;
|
||||
|
||||
if (counter == 150)
|
||||
|
||||
Reference in New Issue
Block a user