From 87aeaab6b81941a04875b7586c9e15236b55d4b3 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Tue, 31 Aug 2021 17:09:30 +0200 Subject: [PATCH] bug fixes --- source/game.cpp | 11 +++++++---- source/text.cpp | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/game.cpp b/source/game.cpp index e4bd8e0..e945da0 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -2334,10 +2334,10 @@ void Game::resetItems() // Devuelve un item en función del azar Uint8 Game::dropItem() { - if (mPlayer[0]->isPowerUp() || (mCoffeeMachineEnabled)) - return NO_KIND; - else - return ITEM_COFFEE_MACHINE; + //if (mPlayer[0]->isPowerUp() || (mCoffeeMachineEnabled)) + // return NO_KIND; + //else + // return ITEM_COFFEE_MACHINE; const Uint8 luckyNumber = rand() % 100; const Uint8 item = rand() % 6; @@ -3271,6 +3271,9 @@ void Game::runPausedGame() // Bucle para la pantalla de game over void Game::runGameOverScreen() { + // Guarda los puntos + saveScoreFile(); + // Reinicia el menu mMenuGameOver->reset(); diff --git a/source/text.cpp b/source/text.cpp index 2c847a1..626af92 100644 --- a/source/text.cpp +++ b/source/text.cpp @@ -143,7 +143,7 @@ void Text::initOffsetFromFile() if (rfile.is_open() && rfile.good()) { 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 std::getline(rfile, buffer);