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.name = SECTION_PROG_GAME;
|
||||||
section.subsection = SUBSECTION_GAME_PLAY;
|
section.subsection = SUBSECTION_GAME_PLAY;
|
||||||
|
|
||||||
musicEnabled = true;
|
|
||||||
debug = true;
|
debug = true;
|
||||||
musicEnabled = !debug;
|
musicEnabled = !debug;
|
||||||
}
|
}
|
||||||
@@ -44,10 +43,11 @@ Game::~Game()
|
|||||||
|
|
||||||
// Bucle para el juego
|
// Bucle para el juego
|
||||||
section_t Game::run()
|
section_t Game::run()
|
||||||
{
|
|
||||||
if (musicEnabled)
|
|
||||||
{
|
{
|
||||||
JA_PlayMusic(music);
|
JA_PlayMusic(music);
|
||||||
|
if (!musicEnabled)
|
||||||
|
{
|
||||||
|
JA_PauseMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (section.name == SECTION_PROG_GAME)
|
while (section.name == SECTION_PROG_GAME)
|
||||||
@@ -94,14 +94,12 @@ void Game::update()
|
|||||||
case SDL_SCANCODE_D:
|
case SDL_SCANCODE_D:
|
||||||
debug = !debug;
|
debug = !debug;
|
||||||
musicEnabled = !debug;
|
musicEnabled = !debug;
|
||||||
if (musicEnabled)
|
musicEnabled ? JA_ResumeMusic() : JA_PauseMusic();
|
||||||
{
|
break;
|
||||||
JA_PlayMusic(music);
|
|
||||||
}
|
case SDL_SCANCODE_M:
|
||||||
else
|
musicEnabled = !musicEnabled;
|
||||||
{
|
musicEnabled ? JA_ResumeMusic() : JA_PauseMusic();
|
||||||
JA_StopMusic();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_SCANCODE_R:
|
case SDL_SCANCODE_R:
|
||||||
@@ -130,6 +128,9 @@ void Game::update()
|
|||||||
case SDL_SCANCODE_F4:
|
case SDL_SCANCODE_F4:
|
||||||
screen->setWindowSize(4);
|
screen->setWindowSize(4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user