Eliminados algunos warnings
This commit is contained in:
@@ -25,7 +25,6 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input)
|
||||
section.name = SECTION_PROG_GAME;
|
||||
section.subsection = SUBSECTION_GAME_PLAY;
|
||||
|
||||
musicEnabled = true;
|
||||
debug = true;
|
||||
musicEnabled = !debug;
|
||||
}
|
||||
@@ -44,10 +43,11 @@ Game::~Game()
|
||||
|
||||
// Bucle para el juego
|
||||
section_t Game::run()
|
||||
{
|
||||
if (musicEnabled)
|
||||
{
|
||||
JA_PlayMusic(music);
|
||||
if (!musicEnabled)
|
||||
{
|
||||
JA_PauseMusic();
|
||||
}
|
||||
|
||||
while (section.name == SECTION_PROG_GAME)
|
||||
@@ -94,14 +94,12 @@ void Game::update()
|
||||
case SDL_SCANCODE_D:
|
||||
debug = !debug;
|
||||
musicEnabled = !debug;
|
||||
if (musicEnabled)
|
||||
{
|
||||
JA_PlayMusic(music);
|
||||
}
|
||||
else
|
||||
{
|
||||
JA_StopMusic();
|
||||
}
|
||||
musicEnabled ? JA_ResumeMusic() : JA_PauseMusic();
|
||||
break;
|
||||
|
||||
case SDL_SCANCODE_M:
|
||||
musicEnabled = !musicEnabled;
|
||||
musicEnabled ? JA_ResumeMusic() : JA_PauseMusic();
|
||||
break;
|
||||
|
||||
case SDL_SCANCODE_R:
|
||||
@@ -130,6 +128,9 @@ void Game::update()
|
||||
case SDL_SCANCODE_F4:
|
||||
screen->setWindowSize(4);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user