elimina DEBUG_PAUSE: era una eina puntual de captures

This commit is contained in:
2026-05-16 23:25:40 +02:00
parent f10be8c277
commit 169a5ea7aa
4 changed files with 3 additions and 27 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
$<$<CONFIG:DEBUG>:DEBUG DEBUG_PAUSE>
$<$<CONFIG:DEBUG>:DEBUG>
$<$<CONFIG:RELEASE>:RELEASE_BUILD>
)
+1 -22
View File
@@ -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<int>(event->key.repeat) == 0) {
-3
View File
@@ -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
};