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;
|
||||||
}
|
}
|
||||||
@@ -45,9 +44,10 @@ Game::~Game()
|
|||||||
// Bucle para el juego
|
// Bucle para el juego
|
||||||
section_t Game::run()
|
section_t Game::run()
|
||||||
{
|
{
|
||||||
if (musicEnabled)
|
JA_PlayMusic(music);
|
||||||
|
if (!musicEnabled)
|
||||||
{
|
{
|
||||||
JA_PlayMusic(music);
|
JA_PauseMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (section.name == SECTION_PROG_GAME)
|
while (section.name == SECTION_PROG_GAME)
|
||||||
@@ -90,18 +90,16 @@ void Game::update()
|
|||||||
case SDL_SCANCODE_ESCAPE:
|
case SDL_SCANCODE_ESCAPE:
|
||||||
section.name = SECTION_PROG_QUIT;
|
section.name = SECTION_PROG_QUIT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +185,7 @@ void Game::renderDebugInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pinta el texto
|
// Pinta el texto
|
||||||
const int inc = debugText->getCharacterWidth() + 1;
|
const int inc = debugText->getCharacterWidth() + 1;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
std::string text = "";
|
std::string text = "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user