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; }