From aabf90351ca5f2133483a1f4bcfee9f2a5b5ce70 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 20 Oct 2025 19:07:27 +0200 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Variable=20p=C3=BAblica=20innecesar?= =?UTF-8?q?ia=20-=20[NEW]=20Cheat=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/entities/arounders.h | 1 - source/gamestates/play.cpp | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/entities/arounders.h b/source/entities/arounders.h index b161a27..a9e771c 100644 --- a/source/entities/arounders.h +++ b/source/entities/arounders.h @@ -36,7 +36,6 @@ namespace arounders arounder *siguiente; }; - extern arounder *first; extern arounder *seleccionat; void init(); diff --git a/source/gamestates/play.cpp b/source/gamestates/play.cpp index 75e9ccc..738d975 100644 --- a/source/gamestates/play.cpp +++ b/source/gamestates/play.cpp @@ -15,6 +15,7 @@ namespace gamestate const int no = 0; const int postfase = 1; const int mort = 2; + const int cheat = 3; } draw::surface *faded = nullptr; @@ -94,6 +95,7 @@ namespace gamestate // I anem on toque if (play::exit==play::eixir::postfase) gamestate::postfase::init(); else if (play::exit==play::eixir::mort) gamestate::mort::init(); + else if (play::exit==play::eixir::cheat) gamestate::prefase::init(); } // En qualsevol cas, renderitzem i eixim ja del bucle (fins que acabe el fadeout) draw::render(); @@ -253,6 +255,13 @@ namespace gamestate } } + if (input::keyPressed(SDL_SCANCODE_F12)) { + game::setConfig("fase", game::getConfig("fase")+1); + draw::fadeout(); + audio::fadeOutMusic(); + play::exit = play::eixir::cheat; + } + return true; }