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

@@ -14,6 +14,7 @@
#include "core/rendering/text.hpp" // Para Text, Text::CENTER_FLAG, Text::COLOR_FLAG
#include "core/resources/resource_cache.hpp" // Para Resource
#include "core/resources/resource_list.hpp" // Para Asset
#include "core/system/event_buffer.hpp" // Para EventBuffer
#include "core/system/global_events.hpp" // Para check
#include "game/gameplay/cheevos.hpp" // Para Cheevos, Achievement
#include "game/options.hpp" // Para Options, options, SectionState, Section
@@ -53,8 +54,7 @@ Title::~Title() { // NOLINT(modernize-use-equals-default)
// Comprueba el manejador de eventos
void Title::handleEvents() {
SDL_Event event;
while (SDL_PollEvent(&event)) {
for (const auto& event : EventBuffer::events) {
GlobalEvents::handle(event);
// Manejo especial para captura de botones de gamepad
@@ -311,14 +311,6 @@ void Title::render() {
Screen::get()->render();
}
// Bucle para el logo del juego
void Title::run() {
while (SceneManager::current == SceneManager::Scene::TITLE) {
update();
render();
}
}
// Crea y rellena la textura para mostrar los logros
void Title::createCheevosTexture() { // NOLINT(readability-convert-member-functions-to-static)
// Define la zona central del menu (entre el logo y la marquesina)