callbacks de merda

This commit is contained in:
2026-04-06 15:45:28 +02:00
parent fccc27fca0
commit a52e6c709e
10 changed files with 154 additions and 110 deletions

View File

@@ -13,6 +13,7 @@
#include "core/rendering/sprite/sprite.hpp" // Para SSprite
#include "core/rendering/surface.hpp" // Para Surface
#include "core/resources/resource_cache.hpp" // Para Resource
#include "core/system/event_buffer.hpp" // Para EventBuffer
#include "core/system/global_events.hpp" // Para check
#include "game/options.hpp" // Para Options, SectionState, options, Section
#include "game/scene_manager.hpp" // Para SceneManager
@@ -56,8 +57,7 @@ Logo::Logo()
// Comprueba el manejador de eventos
void Logo::handleEvents() {
SDL_Event event;
while (SDL_PollEvent(&event)) {
for (const auto& event : EventBuffer::events) {
GlobalEvents::handle(event);
}
}
@@ -228,14 +228,6 @@ void Logo::render() { // NOLINT(readability-convert-member-functions-to-static)
Screen::get()->render();
}
// Bucle para el logo del juego
void Logo::run() {
while (SceneManager::current == SceneManager::Scene::LOGO) {
update();
render();
}
}
// Termina la sección
void Logo::endSection() {
SceneManager::current = SceneManager::Scene::TITLE;