diff --git a/data/fonts/BBHSansHegarty-Regular.ttf b/data/fonts/BBHSansHegarty-Regular.ttf deleted file mode 100644 index f834b91..0000000 Binary files a/data/fonts/BBHSansHegarty-Regular.ttf and /dev/null differ diff --git a/data/fonts/Exo2-Regular.ttf b/data/fonts/Exo2-Regular.ttf new file mode 100644 index 0000000..f987335 Binary files /dev/null and b/data/fonts/Exo2-Regular.ttf differ diff --git a/data/fonts/FunnelSans-Regular.ttf b/data/fonts/FunnelSans-Regular.ttf deleted file mode 100644 index 3e497ba..0000000 Binary files a/data/fonts/FunnelSans-Regular.ttf and /dev/null differ diff --git a/data/fonts/JetBrainsMono-Regular.ttf b/data/fonts/JetBrainsMono-Regular.ttf deleted file mode 100644 index 436c982..0000000 Binary files a/data/fonts/JetBrainsMono-Regular.ttf and /dev/null differ diff --git a/data/fonts/Minecraftia-Regular.ttf b/data/fonts/Minecraftia-Regular.ttf deleted file mode 100644 index 7247ad7..0000000 Binary files a/data/fonts/Minecraftia-Regular.ttf and /dev/null differ diff --git a/data/fonts/PixelOperator.ttf b/data/fonts/PixelOperator.ttf deleted file mode 100644 index 34fe947..0000000 Binary files a/data/fonts/PixelOperator.ttf and /dev/null differ diff --git a/data/fonts/determination.ttf b/data/fonts/determination.ttf deleted file mode 100644 index 69e732b..0000000 Binary files a/data/fonts/determination.ttf and /dev/null differ diff --git a/data/fonts/dogica.ttf b/data/fonts/dogica.ttf deleted file mode 100644 index 2d1ac57..0000000 Binary files a/data/fonts/dogica.ttf and /dev/null differ diff --git a/data/fonts/rainyhearts.ttf b/data/fonts/rainyhearts.ttf deleted file mode 100644 index 245cd40..0000000 Binary files a/data/fonts/rainyhearts.ttf and /dev/null differ diff --git a/source/defines.hpp b/source/defines.hpp index e43281c..eb77580 100644 --- a/source/defines.hpp +++ b/source/defines.hpp @@ -25,6 +25,9 @@ constexpr float WINDOW_SCALE_MIN = 0.5f; // Escala mínima (50% de la resoluci // Configuración de física constexpr float GRAVITY_FORCE = 0.2f; // Fuerza de gravedad (píxeles/frame²) +// Fuente de la interfaz +#define APP_FONT "data/fonts/Exo2-Regular.ttf" + // Configuración de interfaz constexpr float THEME_TRANSITION_DURATION = 0.5f; // Duración de transiciones LERP entre temas (segundos) diff --git a/source/external/texture.cpp b/source/external/texture.cpp index 71bd417..8aed99c 100644 --- a/source/external/texture.cpp +++ b/source/external/texture.cpp @@ -50,11 +50,7 @@ bool Texture::loadFromFile(const std::string &file_path) { delete[] resourceData; // Liberar buffer temporal if (data != nullptr) { - if (ResourceManager::isPackLoaded()) { - std::cout << "Imagen cargada desde pack: " << filename.c_str() << std::endl; - } else { - std::cout << "Imagen cargada desde disco: " << filename.c_str() << std::endl; - } + std::cout << "[Textura] " << filename << " (" << (ResourceManager::isPackLoaded() ? "pack" : "disco") << ")\n"; } } diff --git a/source/shapes/png_shape.cpp b/source/shapes/png_shape.cpp index 09ef7b2..a3eb156 100644 --- a/source/shapes/png_shape.cpp +++ b/source/shapes/png_shape.cpp @@ -22,7 +22,11 @@ PNGShape::PNGShape(const char* png_path) { } bool PNGShape::loadPNG(const char* resource_key) { - std::cout << "[PNGShape] Cargando recurso: " << resource_key << std::endl; + { + std::string fn = std::string(resource_key); + fn = fn.substr(fn.find_last_of("\\/") + 1); + std::cout << "[PNGShape] " << fn << " (" << (ResourceManager::isPackLoaded() ? "pack" : "disco") << ")\n"; + } unsigned char* file_data = nullptr; size_t file_size = 0; if (!ResourceManager::loadResource(resource_key, file_data, file_size)) { diff --git a/source/text/textrenderer.cpp b/source/text/textrenderer.cpp index a39a742..ce35613 100644 --- a/source/text/textrenderer.cpp +++ b/source/text/textrenderer.cpp @@ -1,6 +1,7 @@ #include "textrenderer.hpp" #include #include +#include #include "resource_manager.hpp" TextRenderer::TextRenderer() : renderer_(nullptr), font_(nullptr), font_size_(0), use_antialiasing_(true), font_data_buffer_(nullptr) { @@ -44,7 +45,11 @@ bool TextRenderer::init(SDL_Renderer* renderer, const char* font_path, int font_ // CRÍTICO: NO eliminar fontData aquí - SDL_ttf necesita estos datos en memoria // mientras la fuente esté abierta. Se liberará en cleanup() font_data_buffer_ = fontData; - SDL_Log("Fuente cargada desde ResourceManager: %s (%lu bytes)", font_path, (unsigned long)fontDataSize); + { + std::string fn = std::string(font_path); + fn = fn.substr(fn.find_last_of("\\/") + 1); + std::cout << "[Fuente] " << fn << " (" << (ResourceManager::isPackLoaded() ? "pack" : "disco") << ")\n"; + } return true; } else { delete[] fontData; @@ -102,7 +107,10 @@ bool TextRenderer::reinitialize(int new_font_size) { // Mantener buffer en memoria (NO eliminar) font_data_buffer_ = fontData; font_size_ = new_font_size; - SDL_Log("Fuente recargada desde ResourceManager: %s (tamaño %d)", font_path_.c_str(), new_font_size); + { + std::string fn = font_path_.substr(font_path_.find_last_of("\\/") + 1); + std::cout << "[Fuente] " << fn << " (" << (ResourceManager::isPackLoaded() ? "pack" : "disco") << ")\n"; + } return true; } else { delete[] fontData; diff --git a/source/ui/app_logo.cpp b/source/ui/app_logo.cpp index 01e59a2..a56f4bc 100644 --- a/source/ui/app_logo.cpp +++ b/source/ui/app_logo.cpp @@ -65,12 +65,6 @@ bool AppLogo::initialize(SDL_Renderer* renderer, int screen_width, int screen_he int logo_base_target_height = static_cast(base_screen_height_ * APPLOGO_HEIGHT_PERCENT); int logo_native_target_height = static_cast(native_screen_height_ * APPLOGO_HEIGHT_PERCENT); - std::cout << "Pre-escalando logos:" << std::endl; - std::cout << " Base: " << base_screen_width_ << "x" << base_screen_height_ - << " (altura logo: " << logo_base_target_height << "px)" << std::endl; - std::cout << " Nativa: " << native_screen_width_ << "x" << native_screen_height_ - << " (altura logo: " << logo_native_target_height << "px)" << std::endl; - // ======================================================================== // 3. Cargar y escalar LOGO1 (data/logo/logo.png) a 2 versiones // ======================================================================== @@ -193,7 +187,7 @@ bool AppLogo::initialize(SDL_Renderer* renderer, int screen_width, int screen_he logo2_current_width_ = logo2_base_width_; logo2_current_height_ = logo2_base_height_; - std::cout << "Logos pre-escalados exitosamente (4 texturas creadas)" << std::endl; + std::cout << "[Logo] logo.png + logo2.png (base " << logo_base_target_height << "px, nativa " << logo_native_target_height << "px)\n"; return true; } diff --git a/source/ui/help_overlay.cpp b/source/ui/help_overlay.cpp index 2e3e558..e9bb58e 100644 --- a/source/ui/help_overlay.cpp +++ b/source/ui/help_overlay.cpp @@ -2,6 +2,7 @@ #include // for std::min +#include "defines.hpp" #include "text/textrenderer.hpp" #include "theme_manager.hpp" @@ -101,7 +102,7 @@ void HelpOverlay::initialize(SDL_Renderer* renderer, ThemeManager* theme_mgr, in // Crear renderer de texto con tamaño dinámico text_renderer_ = new TextRenderer(); - text_renderer_->init(renderer, "data/fonts/FunnelSans-Regular.ttf", font_size, true); + text_renderer_->init(renderer, APP_FONT, font_size, true); calculateBoxDimensions(); } diff --git a/source/ui/logo_scaler.cpp b/source/ui/logo_scaler.cpp index 91d0465..c4d54f6 100644 --- a/source/ui/logo_scaler.cpp +++ b/source/ui/logo_scaler.cpp @@ -41,7 +41,6 @@ bool LogoScaler::detectNativeResolution(int& native_width, int& native_height) { SDL_free(displays); - std::cout << "Resolución nativa detectada: " << native_width << "x" << native_height << std::endl; return true; } @@ -73,8 +72,6 @@ unsigned char* LogoScaler::loadAndScale(const std::string& path, return nullptr; } - std::cout << "Imagen cargada: " << path << " (" << orig_width << "x" << orig_height << ")" << std::endl; - // 2. Calcular tamaño final manteniendo aspect ratio // El alto está fijado por target_height (APPLOGO_HEIGHT_PERCENT) // Calcular ancho proporcional al aspect ratio original @@ -82,8 +79,6 @@ unsigned char* LogoScaler::loadAndScale(const std::string& path, out_width = static_cast(target_height * aspect_ratio); out_height = target_height; - std::cout << " Escalando a: " << out_width << "x" << out_height << std::endl; - // 3. Alocar buffer para imagen escalada (RGBA = 4 bytes por píxel) unsigned char* scaled_data = static_cast(malloc(out_width * out_height * 4)); if (scaled_data == nullptr) { @@ -109,7 +104,6 @@ unsigned char* LogoScaler::loadAndScale(const std::string& path, return nullptr; } - std::cout << " Escalado completado correctamente" << std::endl; return scaled_data; } diff --git a/source/ui/ui_manager.cpp b/source/ui/ui_manager.cpp index e43dfcc..dd029e4 100644 --- a/source/ui/ui_manager.cpp +++ b/source/ui/ui_manager.cpp @@ -90,8 +90,8 @@ void UIManager::initialize(SDL_Renderer* renderer, ThemeManager* theme_manager, text_renderer_notifier_ = new TextRenderer(); // Inicializar renderers con tamaño dinámico - text_renderer_debug_->init(renderer, "data/fonts/FunnelSans-Regular.ttf", std::max(9, current_font_size_ - 2), true); - text_renderer_notifier_->init(renderer, "data/fonts/FunnelSans-Regular.ttf", current_font_size_, true); + text_renderer_debug_->init(renderer, APP_FONT, std::max(9, current_font_size_ - 2), true); + text_renderer_notifier_->init(renderer, APP_FONT, current_font_size_, true); // Crear y configurar sistema de notificaciones notifier_ = new Notifier();