From 169a5ea7aa58a370c99634188411e3dda1013a54 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 16 May 2026 23:25:40 +0200 Subject: [PATCH] elimina DEBUG_PAUSE: era una eina puntual de captures --- CLAUDE.md | 2 +- CMakeLists.txt | 2 +- source/game/game.cpp | 23 +---------------------- source/game/game.h | 3 --- 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 00987ad..00aa4c0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ Dependencies: `libsdl3-dev` and `g++` (Linux) or `clang++` (macOS). Build system ```bash make # Release build -make debug # Debug build (defines DEBUG and PAUSE) +make debug # Debug build (defines DEBUG) make release # Empaqueta .tar.gz / .dmg / .zip segons SO make pack # Regenera resources.pack make compile_shaders # Compila shaders GLSL → headers SPIR-V (requereix glslc) diff --git a/CMakeLists.txt b/CMakeLists.txt index 114fce3..3695a74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${DIR_SOURCES}) # Añadir definiciones de compilación dependiendo del tipo de build target_compile_definitions(${PROJECT_NAME} PRIVATE - $<$:DEBUG DEBUG_PAUSE> + $<$:DEBUG> $<$:RELEASE_BUILD> ) diff --git a/source/game/game.cpp b/source/game/game.cpp index d51190c..dca6e08 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -63,11 +63,7 @@ Game::Game(int num_players, int current_stage, SDL_Renderer *renderer, bool demo // Pasa variables this->demo_.enabled = demo; this->num_players_ = num_players; -#ifdef DEBUG_PAUSE - this->current_stage_ = 3; -#else this->current_stage_ = current_stage; -#endif if (num_players == 1) { // Si solo juega un jugador, permite jugar tanto con teclado como con mando player_one_control_ = Options::inputs[0].device_type; Options::inputs[0].device_type = Input::Device::ANY; @@ -106,9 +102,6 @@ Game::Game(int num_players, int current_stage, SDL_Renderer *renderer, bool demo // Inicializa las variables necesarias para la sección 'Game' init(); -#ifdef DEBUG_PAUSE - pause = false; -#endif } Game::~Game() { @@ -270,8 +263,7 @@ void Game::init() { balloons_popped_ += stage_[i].power_to_complete; } - total_power_to_complete_game_ = std::accumulate(std::begin(stage_), std::end(stage_), 0, - [](int acc, const auto &s) { return acc + s.power_to_complete; }); + total_power_to_complete_game_ = std::accumulate(std::begin(stage_), std::end(stage_), 0, [](int acc, const auto &s) { return acc + s.power_to_complete; }); // Modo demo demo_.recording = false; @@ -2730,13 +2722,8 @@ void Game::iterate() { } } -#ifdef DEBUG_PAUSE - if (!pause) - update(); -#else // Actualiza la lógica del juego update(); -#endif // Dibuja los objetos render(); @@ -2759,14 +2746,6 @@ void Game::handleEvent(const SDL_Event *event) { } } -#ifdef DEBUG_PAUSE - if (event->type == SDL_EVENT_KEY_DOWN) { - if (event->key.scancode == SDL_SCANCODE_P) { - pause = !pause; - } - } -#endif - // Eventos específicos de la pantalla de game over if (section_->subsection == SUBSECTION_GAME_GAMEOVER) { if (event->type == SDL_EVENT_KEY_DOWN && static_cast(event->key.repeat) == 0) { diff --git a/source/game/game.h b/source/game/game.h index ad9eb9e..a593ffc 100644 --- a/source/game/game.h +++ b/source/game/game.h @@ -384,7 +384,4 @@ class Game { bool pause_initialized_; // Indica si la pausa ha sido inicializada bool game_over_initialized_; // Indica si el game over ha sido inicializado int game_over_post_fade_; // Opción a realizar cuando termina el fundido del game over -#ifdef DEBUG_PAUSE - bool pause; -#endif };