mogut options.section a SceneManager

This commit is contained in:
2025-10-26 14:18:45 +01:00
parent df4965a84b
commit 51330db998
15 changed files with 129 additions and 120 deletions

View File

@@ -1,3 +1,5 @@
#include "game/scene_manager.hpp" // Para SceneManager
#include "game/scenes/ending.hpp"
#include <SDL3/SDL.h>
@@ -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;