Añadidos nuevos trucos

This commit is contained in:
2022-11-06 15:00:03 +01:00
parent 0cb83657be
commit bf59cc01e4
3 changed files with 25 additions and 12 deletions

View File

@@ -19,7 +19,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
this->options = options;
// ****
currentRoom = "01.room";
currentRoom = "03.room";
const int x = 29;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
@@ -44,7 +44,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
board.items = 0;
board.rooms = 1;
board.music = true;
board.jailEnabled = false;
board.jailEnabled = options->cheat.jailEnabled;
setScoreBoardColor();
roomTracker->addRoom(currentRoom);
paused = false;
@@ -95,7 +95,7 @@ void Game::checkEventHandler()
case SDL_SCANCODE_D:
debug->switchEnabled();
options->invincible = debug->getEnabled();
options->cheat.invincible = debug->getEnabled();
board.music = !debug->getEnabled();
board.music ? JA_ResumeMusic() : JA_PauseMusic();
break;
@@ -379,13 +379,13 @@ void Game::checkGameOver()
// Mata al jugador
void Game::killPlayer()
{
if (options->invincible)
if (options->cheat.invincible)
{
return;
}
// Resta una vida al jugador
if (!options->infiniteLives)
if (!options->cheat.infiniteLives)
{
board.lives--;
}