- [FIX] Variable pública innecesaria

- [NEW] Cheat mode
This commit is contained in:
2025-10-20 19:07:27 +02:00
parent 13e0e89aa8
commit aabf90351c
2 changed files with 9 additions and 1 deletions

View File

@@ -36,7 +36,6 @@ namespace arounders
arounder *siguiente; arounder *siguiente;
}; };
extern arounder *first;
extern arounder *seleccionat; extern arounder *seleccionat;
void init(); void init();

View File

@@ -15,6 +15,7 @@ namespace gamestate
const int no = 0; const int no = 0;
const int postfase = 1; const int postfase = 1;
const int mort = 2; const int mort = 2;
const int cheat = 3;
} }
draw::surface *faded = nullptr; draw::surface *faded = nullptr;
@@ -94,6 +95,7 @@ namespace gamestate
// I anem on toque // I anem on toque
if (play::exit==play::eixir::postfase) gamestate::postfase::init(); 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::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) // En qualsevol cas, renderitzem i eixim ja del bucle (fins que acabe el fadeout)
draw::render(); 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; return true;
} }