bug fixes

This commit is contained in:
2021-08-31 17:09:30 +02:00
parent ad5fb0fc22
commit 87aeaab6b8
2 changed files with 8 additions and 5 deletions

View File

@@ -2334,10 +2334,10 @@ void Game::resetItems()
// Devuelve un item en función del azar // Devuelve un item en función del azar
Uint8 Game::dropItem() Uint8 Game::dropItem()
{ {
if (mPlayer[0]->isPowerUp() || (mCoffeeMachineEnabled)) //if (mPlayer[0]->isPowerUp() || (mCoffeeMachineEnabled))
return NO_KIND; // return NO_KIND;
else //else
return ITEM_COFFEE_MACHINE; // return ITEM_COFFEE_MACHINE;
const Uint8 luckyNumber = rand() % 100; const Uint8 luckyNumber = rand() % 100;
const Uint8 item = rand() % 6; const Uint8 item = rand() % 6;
@@ -3271,6 +3271,9 @@ void Game::runPausedGame()
// Bucle para la pantalla de game over // Bucle para la pantalla de game over
void Game::runGameOverScreen() void Game::runGameOverScreen()
{ {
// Guarda los puntos
saveScoreFile();
// Reinicia el menu // Reinicia el menu
mMenuGameOver->reset(); mMenuGameOver->reset();

View File

@@ -143,7 +143,7 @@ void Text::initOffsetFromFile()
if (rfile.is_open() && rfile.good()) if (rfile.is_open() && rfile.good())
{ {
std::string buffer; std::string buffer;
printf("Reading %s file\n", mFile.c_str()); //printf("Reading %s file\n", mFile.c_str());
// Lee los dos primeros valores del fichero // Lee los dos primeros valores del fichero
std::getline(rfile, buffer); std::getline(rfile, buffer);