eliminada la clase Debug en Release

This commit is contained in:
2025-11-16 20:44:15 +01:00
parent 24a71395da
commit e4a61a7241
8 changed files with 29 additions and 2 deletions

View File

@@ -221,9 +221,11 @@ void handle() {
//handleToggleDebug();
break;
#ifdef _DEBUG
case InputAction::SHOW_DEBUG_INFO:
handleShowDebugInfo();
break;
#endif
case InputAction::NONE:
default:

View File

@@ -322,7 +322,9 @@ void Screen::textureToRenderer() {
// Renderiza todos los overlays
void Screen::renderOverlays() {
renderNotifications();
#ifdef _DEBUG
renderInfo();
#endif
}
// Localiza la paleta dentro del vector de paletas

View File

@@ -1,5 +1,7 @@
#pragma once
#ifdef _DEBUG
#include <SDL3/SDL.h>
#include <string> // Para string
@@ -37,4 +39,6 @@ class Debug {
int x_ = 0; // Posicion donde escribir el texto de debug
int y_ = 0; // Posición donde escribir el texto de debug
bool enabled_ = false; // Indica si esta activo el modo debug
};
};
#endif // _DEBUG

View File

@@ -18,7 +18,9 @@
#include "core/resources/resource_helper.hpp" // Para ResourceHelper
#include "core/resources/resource_list.hpp" // Para Asset, AssetType
#include "core/resources/resource_loader.hpp" // Para ResourceLoader
#ifdef _DEBUG
#include "core/system/debug.hpp" // Para Debug
#endif
#include "game/gameplay/cheevos.hpp" // Para Cheevos
#include "game/options.hpp" // Para Options, options, OptionsVideo
#include "game/scene_manager.hpp" // Para SceneManager
@@ -143,7 +145,9 @@ Director::Director(std::vector<std::string> const& args) {
// Aplica las teclas configuradas desde Options
Input::get()->applyKeyboardBindingsFromOptions();
#ifdef _DEBUG
Debug::init();
#endif
// Special handling for cheevos.bin - also needs filesystem path
#ifdef RELEASE_BUILD
@@ -160,7 +164,9 @@ Director::~Director() {
// Destruye los singletones
Cheevos::destroy();
#ifdef _DEBUG
Debug::destroy();
#endif
Input::destroy();
Notifier::destroy();
Resource::Cache::destroy();

View File

@@ -82,8 +82,10 @@ void Player::move(float delta_time) {
break;
}
syncSpriteAndCollider(); // Actualiza la posición del sprite y las colisiones
#ifdef _DEBUG
Debug::get()->add(std::string("X: " + std::to_string(static_cast<int>(x_))));
Debug::get()->add(std::string("Y: " + std::to_string(static_cast<int>(y_))));
#endif
}
void Player::handleConveyorBelts() {

View File

@@ -2,7 +2,9 @@
#include <algorithm> // Para std::ranges::any_of
#ifdef _DEBUG
#include "core/system/debug.hpp" // Para Debug
#endif
#include "utils/defines.hpp" // Para Collision
// Constructor

View File

@@ -3,7 +3,9 @@
#include "core/rendering/screen.hpp"
#include "core/rendering/surface.hpp"
#include "core/rendering/surface_sprite.hpp"
#ifdef _DEBUG
#include "core/system/debug.hpp"
#endif
#include "game/gameplay/collision_map.hpp"
#include "utils/utils.hpp"