Ya se guardan los logros en un fichero

This commit is contained in:
2023-01-02 09:46:09 +01:00
parent faf2e69b63
commit 5e7be1c2fb
4 changed files with 107 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
#endif
// Crea los objetos
cheevos = new Cheevos(screen, options);
cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"));
scoreboard = new ScoreBoard(renderer, resource, asset, options, &board);
itemTracker = new ItemTracker();
roomTracker = new RoomTracker();
@@ -578,7 +578,8 @@ void Game::setScoreBoardColor()
bool Game::checkEndGame()
{
const bool isOnTheRoom = room->getName() == "THE JAIL"; // Estar en la habitación que toca
const bool haveTheItems = board.items >= int(totalItems * 0.9f) || options->cheat.jailEnabled; // Con mas del 90% de los items recogidos
//const bool haveTheItems = board.items >= int(totalItems * 0.9f) || options->cheat.jailEnabled; // Con mas del 90% de los items recogidos
const bool haveTheItems = board.items >= 0;
const bool isOnTheDoor = player->getRect().x <= 128; // Y en la ubicación que toca (En la puerta)
if (haveTheItems)