Eliminados algunos warnings

This commit is contained in:
2022-09-12 19:20:57 +02:00
parent 4674c3dab2
commit b93dc86cb0

View File

@@ -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;
}
@@ -45,9 +44,10 @@ Game::~Game()
// Bucle para el juego
section_t Game::run()
{
if (musicEnabled)
JA_PlayMusic(music);
if (!musicEnabled)
{
JA_PlayMusic(music);
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;
}
}
}
@@ -184,7 +185,7 @@ void Game::renderDebugInfo()
}
// Pinta el texto
const int inc = debugText->getCharacterWidth() + 1;
const int inc = debugText->getCharacterWidth() + 1;
int line = 0;
std::string text = "";