From 51330db99841a37995e51427edb56c33f669f4bb Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 26 Oct 2025 14:18:45 +0100 Subject: [PATCH] mogut options.section a SceneManager --- source/core/input/global_inputs.cpp | 26 +++++++++-------- source/core/system/director.cpp | 24 ++++++++-------- source/game/gameplay/defaults.hpp | 8 ------ source/game/gameplay/options.cpp | 4 --- source/game/gameplay/options.hpp | 40 --------------------------- source/game/scene_manager.hpp | 39 ++++++++++++++++++++++++++ source/game/scenes/credits.cpp | 10 ++++--- source/game/scenes/ending.cpp | 10 ++++--- source/game/scenes/ending2.cpp | 12 ++++---- source/game/scenes/game.cpp | 16 ++++++----- source/game/scenes/game_over.cpp | 12 ++++---- source/game/scenes/loading_screen.cpp | 12 ++++---- source/game/scenes/logo.cpp | 14 ++++++---- source/game/scenes/title.cpp | 18 ++++++------ source/utils/global_events.cpp | 4 ++- 15 files changed, 129 insertions(+), 120 deletions(-) create mode 100644 source/game/scene_manager.hpp diff --git a/source/core/input/global_inputs.cpp b/source/core/input/global_inputs.cpp index e0bb5e5..f4b098e 100644 --- a/source/core/input/global_inputs.cpp +++ b/source/core/input/global_inputs.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "core/input/global_inputs.hpp" #include @@ -13,11 +15,11 @@ namespace globalInputs { void quit() { - const std::string code = Options::section.section == Options::Scene::GAME ? "PRESS AGAIN TO RETURN TO MENU" : "PRESS AGAIN TO EXIT"; + const std::string code = SceneManager::current == SceneManager::Scene::GAME ? "PRESS AGAIN TO RETURN TO MENU" : "PRESS AGAIN TO EXIT"; auto code_found = stringInVector(Notifier::get()->getCodes(), code); if (code_found) { // Si la notificación de salir está activa, cambia de sección - Options::section.section = Options::section.section == Options::Scene::GAME ? Options::Scene::TITLE : Options::Scene::QUIT; + SceneManager::current = SceneManager::current == SceneManager::Scene::GAME ? SceneManager::Scene::TITLE : SceneManager::Scene::QUIT; } else { // Si la notificación de salir no está activa, muestra la notificación Notifier::get()->show({code}, NotificationText::CENTER, 2000, -1, true, code); @@ -26,16 +28,16 @@ void quit() { // Cambia de seccion void skip_section() { - switch (Options::section.section) { - case Options::Scene::LOGO: - case Options::Scene::LOADING_SCREEN: - case Options::Scene::CREDITS: - case Options::Scene::DEMO: - case Options::Scene::GAME_OVER: - case Options::Scene::ENDING: - case Options::Scene::ENDING2: - Options::section.section = Options::Scene::TITLE; - Options::section.subsection = Options::SceneOptions::NONE; + switch (SceneManager::current) { + case SceneManager::Scene::LOGO: + case SceneManager::Scene::LOADING_SCREEN: + case SceneManager::Scene::CREDITS: + case SceneManager::Scene::DEMO: + case SceneManager::Scene::GAME_OVER: + case SceneManager::Scene::ENDING: + case SceneManager::Scene::ENDING2: + SceneManager::current = SceneManager::Scene::TITLE; + SceneManager::options = SceneManager::Options::NONE; break; default: diff --git a/source/core/system/director.cpp b/source/core/system/director.cpp index 623236a..d84e3f2 100644 --- a/source/core/system/director.cpp +++ b/source/core/system/director.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "core/system/director.hpp" #include @@ -542,41 +544,41 @@ void Director::runGame() { int Director::run() { // Bucle principal - while (Options::section.section != Options::Scene::QUIT) { - switch (Options::section.section) { - case Options::Scene::LOGO: + while (SceneManager::current != SceneManager::Scene::QUIT) { + switch (SceneManager::current) { + case SceneManager::Scene::LOGO: runLogo(); break; - case Options::Scene::LOADING_SCREEN: + case SceneManager::Scene::LOADING_SCREEN: runLoadingScreen(); break; - case Options::Scene::TITLE: + case SceneManager::Scene::TITLE: runTitle(); break; - case Options::Scene::CREDITS: + case SceneManager::Scene::CREDITS: runCredits(); break; - case Options::Scene::DEMO: + case SceneManager::Scene::DEMO: runDemo(); break; - case Options::Scene::GAME: + case SceneManager::Scene::GAME: runGame(); break; - case Options::Scene::GAME_OVER: + case SceneManager::Scene::GAME_OVER: runGameOver(); break; - case Options::Scene::ENDING: + case SceneManager::Scene::ENDING: runEnding(); break; - case Options::Scene::ENDING2: + case SceneManager::Scene::ENDING2: runEnding2(); break; diff --git a/source/game/gameplay/defaults.hpp b/source/game/gameplay/defaults.hpp index 049dec5..064b9b7 100644 --- a/source/game/gameplay/defaults.hpp +++ b/source/game/gameplay/defaults.hpp @@ -7,8 +7,6 @@ // Forward declarations from Options namespace namespace Options { -enum class Scene; -enum class SceneOptions; enum class ControlScheme; enum class NotificationPosition; } // namespace Options @@ -65,12 +63,6 @@ constexpr Options::NotificationPosition NOTIFICATION_POSITION = Options::Notific constexpr bool NOTIFICATION_SOUND = true; // Sonido de las notificaciones por defecto const Uint8 NOTIFICATION_COLOR = static_cast(PaletteColor::BLUE); // Color de las notificaciones por defecto -// ============================================================================= -// SCENE -// ============================================================================= -constexpr Options::Scene SCENE = Options::Scene::LOGO; // Sección por defecto -constexpr Options::SceneOptions SUBSECTION = Options::SceneOptions::LOGO_TO_INTRO; // Subsección por defecto - // ============================================================================= // CONTROL // ============================================================================= diff --git a/source/game/gameplay/options.cpp b/source/game/gameplay/options.cpp index 6bc651f..c02991e 100644 --- a/source/game/gameplay/options.cpp +++ b/source/game/gameplay/options.cpp @@ -26,18 +26,14 @@ Notification notifications; // Opciones relativas a las notificaciones; Window window; // Opciones relativas a la ventana Audio audio; // Opciones relativas al audio ControlScheme keys; // Teclas usadas para jugar -SceneState section; // Sección actual del programa bool setOptions(const std::string& var, const std::string& value); // Crea e inicializa las opciones del programa void init() { - #ifdef DEBUG - section = SceneState(Scene::ENDING2, SceneOptions::LOGO_TO_INTRO); console = true; #else - section = SceneState(Scene::LOGO, SceneOptions::LOGO_TO_INTRO); console = false; #endif } diff --git a/source/game/gameplay/options.hpp b/source/game/gameplay/options.hpp index 230585d..3078ee7 100644 --- a/source/game/gameplay/options.hpp +++ b/source/game/gameplay/options.hpp @@ -20,29 +20,6 @@ constexpr int convertVolume(int volume_percent) { } } // namespace VolumeHelpers -// Secciones del programa -enum class Scene { - LOGO, - LOADING_SCREEN, - TITLE, - CREDITS, - GAME, - DEMO, - GAME_OVER, - ENDING, - ENDING2, - QUIT -}; - -// Subsecciones -enum class SceneOptions { - NONE, - LOGO_TO_INTRO, - LOGO_TO_TITLE, - TITLE_WITH_LOADING_SCREEN, - TITLE_WITHOUT_LOADING_SCREEN -}; - // Posiciones de las notificaciones enum class NotificationPosition { UPPER_LEFT, @@ -125,22 +102,6 @@ struct Notification { } }; -// Estructura para saber la seccion y subseccion del programa -struct SceneState { - Scene section; - SceneOptions subsection; - - // Constructor por defecto - SceneState() - : section(GameDefaults::SCENE), - subsection(GameDefaults::SUBSECTION) {} - - // Constructor - SceneState(Scene scene, SceneOptions scene_options) - : section(scene), - subsection(scene_options) {} -}; - // Estructura para albergar trucos struct Cheat { enum class State : bool { @@ -362,7 +323,6 @@ extern Notification notifications; // Opciones relativas a las notificaciones; extern Window window; // Opciones relativas a la ventana extern Audio audio; // Opciones relativas al audio extern ControlScheme keys; // Teclas usadas para jugar -extern SceneState section; // Sección actual del programa // --- Funciones --- void init(); // Crea e inicializa las opciones del programa diff --git a/source/game/scene_manager.hpp b/source/game/scene_manager.hpp new file mode 100644 index 0000000..a06b654 --- /dev/null +++ b/source/game/scene_manager.hpp @@ -0,0 +1,39 @@ +#pragma once + +/* + Namespace SceneManager: gestiona el flujo entre las diferentes escenas del juego. + + Define las escenas principales del programa y las opciones de transición entre ellas. + Proporciona variables globales inline para gestionar el estado actual de la escena. +*/ + +namespace SceneManager { + +// --- Escenas del programa --- +enum class Scene { + LOGO, // Pantalla del logo + LOADING_SCREEN, // Pantalla de carga + TITLE, // Pantalla de título/menú principal + CREDITS, // Créditos del juego + GAME, // Juego principal + DEMO, // Modo demostración + GAME_OVER, // Pantalla de game over + ENDING, // Final del juego (ending 1) + ENDING2, // Final del juego (ending 2) + QUIT // Salir del programa +}; + +// --- Opciones para transiciones entre escenas --- +enum class Options { + NONE, // Sin opciones especiales + LOGO_TO_INTRO, // Del logo a la intro + LOGO_TO_TITLE, // Del logo al título + TITLE_WITH_LOADING_SCREEN, // Al título mostrando pantalla de carga + TITLE_WITHOUT_LOADING_SCREEN // Al título sin pantalla de carga +}; + +// --- Variables de estado globales (inline C++17) --- +inline Scene current = Scene::LOGO; // Escena actual +inline Options options = Options::NONE; // Opciones de la escena actual + +} // namespace SceneManager diff --git a/source/game/scenes/credits.cpp b/source/game/scenes/credits.cpp index 8ce3557..6ffd756 100644 --- a/source/game/scenes/credits.cpp +++ b/source/game/scenes/credits.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/credits.hpp" #include @@ -19,8 +21,8 @@ Credits::Credits() : shining_sprite_(std::make_shared(Resource::get()->getSurface("shine.gif"), Resource::get()->getAnimations("shine.ani"))) { // Inicializa variables - Options::section.section = Options::Scene::CREDITS; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::CREDITS; + SceneManager::options = SceneManager::Options::NONE; shining_sprite_->setPos({194, 174, 8, 8}); // Cambia el color del borde @@ -165,7 +167,7 @@ void Credits::updateCounter() { // Comprueba si ha terminado la sección if (counter_ > 1200) { - Options::section.section = Options::Scene::DEMO; + SceneManager::current = SceneManager::Scene::DEMO; } } @@ -218,7 +220,7 @@ void Credits::render() { // Bucle para el logo del juego void Credits::run() { - while (Options::section.section == Options::Scene::CREDITS) { + while (SceneManager::current == SceneManager::Scene::CREDITS) { update(); checkEvents(); render(); diff --git a/source/game/scenes/ending.cpp b/source/game/scenes/ending.cpp index 89ee56a..b9555bd 100644 --- a/source/game/scenes/ending.cpp +++ b/source/game/scenes/ending.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/ending.hpp" #include @@ -23,8 +25,8 @@ Ending::Ending() cover_counter_(0), ticks_(0), current_scene_(0) { - Options::section.section = Options::Scene::ENDING; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::ENDING; + SceneManager::options = SceneManager::Options::NONE; // Inicializa los textos iniTexts(); @@ -359,7 +361,7 @@ void Ending::iniScenes() { void Ending::run() { JA_PlayMusic(Resource::get()->getMusic("ending1.ogg")); - while (Options::section.section == Options::Scene::ENDING) { + while (SceneManager::current == SceneManager::Scene::ENDING) { update(); checkEvents(); render(); @@ -423,7 +425,7 @@ void Ending::checkChangeScene() { cover_counter_ = 0; if (current_scene_ == 5) { // Termina el bucle - Options::section.section = Options::Scene::ENDING2; + SceneManager::current = SceneManager::Scene::ENDING2; // Mantiene los valores anteriores current_scene_ = 4; diff --git a/source/game/scenes/ending2.cpp b/source/game/scenes/ending2.cpp index 169c73a..71e35ee 100644 --- a/source/game/scenes/ending2.cpp +++ b/source/game/scenes/ending2.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/ending2.hpp" #include @@ -20,8 +22,8 @@ // Constructor Ending2::Ending2() : state_(EndingState::PRE_CREDITS, SDL_GetTicks(), STATE_PRE_CREDITS_DURATION_) { - Options::section.section = Options::Scene::ENDING2; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::ENDING2; + SceneManager::options = SceneManager::Options::NONE; // Inicializa el vector de colores const std::vector COLORS = {"white", "yellow", "cyan", "green", "magenta", "red", "blue", "black"}; @@ -146,7 +148,7 @@ void Ending2::checkInput() { void Ending2::run() { JA_PlayMusic(Resource::get()->getMusic("ending2.ogg")); - while (Options::section.section == Options::Scene::ENDING2) { + while (SceneManager::current == SceneManager::Scene::ENDING2) { update(); checkEvents(); render(); @@ -179,8 +181,8 @@ void Ending2::updateState() { case EndingState::FADING: if (state_.hasEnded(EndingState::FADING)) { - Options::section.section = Options::Scene::LOGO; - Options::section.subsection = Options::SceneOptions::LOGO_TO_INTRO; + SceneManager::current = SceneManager::Scene::LOGO; + SceneManager::options = SceneManager::Options::LOGO_TO_INTRO; } break; diff --git a/source/game/scenes/game.cpp b/source/game/scenes/game.cpp index 6938d6b..cc2ab6f 100644 --- a/source/game/scenes/game.cpp +++ b/source/game/scenes/game.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/game.hpp" #include @@ -58,8 +60,8 @@ Game::Game(GameMode mode) Cheevos::get()->enable(!Options::cheats.enabled()); // Deshabilita los logros si hay trucos activados Cheevos::get()->clearUnobtainableState(); - Options::section.section = (mode_ == GameMode::GAME) ? Options::Scene::GAME : Options::Scene::DEMO; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = (mode_ == GameMode::GAME) ? SceneManager::Scene::GAME : SceneManager::Scene::DEMO; + SceneManager::options = SceneManager::Options::NONE; } Game::~Game() { @@ -100,7 +102,7 @@ void Game::run() { JA_PauseMusic(); } - while (Options::section.section == Options::Scene::GAME || Options::section.section == Options::Scene::DEMO) { + while (SceneManager::current == SceneManager::Scene::GAME || SceneManager::current == SceneManager::Scene::DEMO) { update(); checkEvents(); render(); @@ -335,7 +337,7 @@ void Game::checkIfPlayerIsAlive() { // Comprueba si ha terminado la partida void Game::checkGameOver() { if (board_->lives < 0 && black_screen_counter_ > 17) { - Options::section.section = Options::Scene::GAME_OVER; + SceneManager::current = SceneManager::Scene::GAME_OVER; } } @@ -427,7 +429,7 @@ bool Game::checkEndGame() { // Comprueba los logros de completar el juego checkEndGameCheevos(); - Options::section.section = Options::Scene::ENDING; + SceneManager::current = SceneManager::Scene::ENDING; return true; } @@ -610,8 +612,8 @@ void Game::DEMO_checkRoomChange() { demo_.counter = 0; demo_.room_index++; if (demo_.room_index == (int)demo_.rooms.size()) { - Options::section.section = Options::Scene::LOGO; - Options::section.subsection = Options::SceneOptions::LOGO_TO_TITLE; + SceneManager::current = SceneManager::Scene::LOGO; + SceneManager::options = SceneManager::Options::LOGO_TO_TITLE; } else { changeRoom(demo_.rooms[demo_.room_index]); } diff --git a/source/game/scenes/game_over.cpp b/source/game/scenes/game_over.cpp index 7a1c198..2dca4f6 100644 --- a/source/game/scenes/game_over.cpp +++ b/source/game/scenes/game_over.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/game_over.hpp" #include @@ -23,8 +25,8 @@ GameOver::GameOver() pre_counter_(0), counter_(0), ticks_(0) { - Options::section.section = Options::Scene::GAME_OVER; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::GAME_OVER; + SceneManager::options = SceneManager::Options::NONE; player_sprite_->setPosX(GAMECANVAS_CENTER_X + 10); player_sprite_->setPosY(30); @@ -112,7 +114,7 @@ void GameOver::checkInput() { // Bucle principal void GameOver::run() { - while (Options::section.section == Options::Scene::GAME_OVER) { + while (SceneManager::current == SceneManager::Scene::GAME_OVER) { update(); checkEvents(); render(); @@ -156,7 +158,7 @@ void GameOver::updateCounters() { // Comprueba si ha terminado la sección else if (counter_ == COUNTER_SECTION_END_) { - Options::section.section = Options::Scene::LOGO; - Options::section.subsection = Options::SceneOptions::LOGO_TO_TITLE; + SceneManager::current = SceneManager::Scene::LOGO; + SceneManager::options = SceneManager::Options::LOGO_TO_TITLE; } } \ No newline at end of file diff --git a/source/game/scenes/loading_screen.cpp b/source/game/scenes/loading_screen.cpp index 8871825..b42ea5d 100644 --- a/source/game/scenes/loading_screen.cpp +++ b/source/game/scenes/loading_screen.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/loading_screen.hpp" #include @@ -25,8 +27,8 @@ LoadingScreen::LoadingScreen() screen_surface_->clear(static_cast(PaletteColor::WHITE)); // Inicializa variables - Options::section.section = Options::Scene::LOADING_SCREEN; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::LOADING_SCREEN; + SceneManager::options = SceneManager::Options::NONE; // Establece el orden de las lineas para imitar el direccionamiento de memoria del spectrum for (int i = 0; i < 192; ++i) { @@ -96,8 +98,8 @@ void LoadingScreen::updateLoad() { // Comprueba si ha terminado la intro if (load_counter_ >= 768) { - Options::section.section = Options::Scene::TITLE; - Options::section.subsection = Options::SceneOptions::TITLE_WITH_LOADING_SCREEN; + SceneManager::current = SceneManager::Scene::TITLE; + SceneManager::options = SceneManager::Options::TITLE_WITH_LOADING_SCREEN; JA_StopMusic(); } } @@ -189,7 +191,7 @@ void LoadingScreen::run() { Screen::get()->clearRenderer(); Screen::get()->render(); - while (Options::section.section == Options::Scene::LOADING_SCREEN) { + while (SceneManager::current == SceneManager::Scene::LOADING_SCREEN) { update(); checkEvents(); render(); diff --git a/source/game/scenes/logo.cpp b/source/game/scenes/logo.cpp index e149134..3b1c3ac 100644 --- a/source/game/scenes/logo.cpp +++ b/source/game/scenes/logo.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/logo.hpp" #include @@ -30,7 +32,7 @@ Logo::Logo() } // Inicializa variables - Options::section.section = Options::Scene::LOGO; + SceneManager::current = SceneManager::Scene::LOGO; // Inicializa el vector de colores const std::vector COLORS = { @@ -206,7 +208,7 @@ void Logo::render() { // Bucle para el logo del juego void Logo::run() { - while (Options::section.section == Options::Scene::LOGO) { + while (SceneManager::current == SceneManager::Scene::LOGO) { update(); checkEvents(); render(); @@ -215,11 +217,11 @@ void Logo::run() { // Termina la sección void Logo::endSection() { - if (Options::section.subsection == Options::SceneOptions::LOGO_TO_TITLE) { - Options::section.section = Options::Scene::TITLE; + if (SceneManager::options == SceneManager::Options::LOGO_TO_TITLE) { + SceneManager::current = SceneManager::Scene::TITLE; } - else if (Options::section.subsection == Options::SceneOptions::LOGO_TO_INTRO) { - Options::section.section = Options::Scene::LOADING_SCREEN; + else if (SceneManager::options == SceneManager::Options::LOGO_TO_INTRO) { + SceneManager::current = SceneManager::Scene::LOADING_SCREEN; } } \ No newline at end of file diff --git a/source/game/scenes/title.cpp b/source/game/scenes/title.cpp index cb517e1..7e67350 100644 --- a/source/game/scenes/title.cpp +++ b/source/game/scenes/title.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "game/scenes/title.hpp" #include @@ -25,9 +27,9 @@ Title::Title() loading_screen_sprite_(std::make_shared(loading_screen_surface_, 0, 0, loading_screen_surface_->getWidth(), loading_screen_surface_->getHeight())), bg_surface_(std::make_shared(Options::game.width, Options::game.height)) { // Inicializa variables - state_ = Options::section.subsection == Options::SceneOptions::TITLE_WITH_LOADING_SCREEN ? TitleState::SHOW_LOADING_SCREEN : TitleState::SHOW_MENU; - Options::section.section = Options::Scene::TITLE; - Options::section.subsection = Options::SceneOptions::NONE; + state_ = SceneManager::options == SceneManager::Options::TITLE_WITH_LOADING_SCREEN ? TitleState::SHOW_LOADING_SCREEN : TitleState::SHOW_MENU; + SceneManager::current = SceneManager::Scene::TITLE; + SceneManager::options = SceneManager::Options::NONE; initMarquee(); // Crea y rellena la textura para mostrar los logros @@ -68,8 +70,8 @@ void Title::checkEvents() { if (!show_cheevos_) { switch (event.key.key) { case SDLK_1: - Options::section.section = Options::Scene::GAME; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::GAME; + SceneManager::options = SceneManager::Options::NONE; break; case SDLK_2: @@ -180,8 +182,8 @@ void Title::update() { // Si el contador alcanza cierto valor, termina la seccion if (counter_ == 2200) { if (!show_cheevos_) { - Options::section.section = Options::Scene::CREDITS; - Options::section.subsection = Options::SceneOptions::NONE; + SceneManager::current = SceneManager::Scene::CREDITS; + SceneManager::options = SceneManager::Options::NONE; } } break; @@ -228,7 +230,7 @@ void Title::render() { // Bucle para el logo del juego void Title::run() { - while (Options::section.section == Options::Scene::TITLE) { + while (SceneManager::current == SceneManager::Scene::TITLE) { update(); checkEvents(); render(); diff --git a/source/utils/global_events.cpp b/source/utils/global_events.cpp index eb473cc..80a6c66 100644 --- a/source/utils/global_events.cpp +++ b/source/utils/global_events.cpp @@ -1,3 +1,5 @@ +#include "game/scene_manager.hpp" // Para SceneManager + #include "utils/global_events.hpp" #include "core/input/mouse.hpp" @@ -8,7 +10,7 @@ namespace globalEvents { void check(const SDL_Event& event) { // Evento de salida de la aplicación if (event.type == SDL_EVENT_QUIT) { - Options::section.section = Options::Scene::QUIT; + SceneManager::current = SceneManager::Scene::QUIT; return; }