afegit el namespace Logger

This commit is contained in:
2025-10-19 18:10:55 +02:00
parent df6e7e5155
commit 413c3c30a6
17 changed files with 107 additions and 96 deletions

View File

@@ -17,6 +17,7 @@
#include "resource_helper.hpp" // Para ResourceHelper
#include "stb_image.h" // Para stbi_image_free, stbi_load, STBI_rgb_alpha
#include "utils.hpp"
#include "ui/logger.hpp"
// Constructor
Texture::Texture(SDL_Renderer* renderer, std::string path)
@@ -82,7 +83,7 @@ auto Texture::loadFromFile(const std::string& file_path) -> bool {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error: Fichero no encontrado %s", getFileName(file_path).c_str());
throw std::runtime_error("Fichero no encontrado: " + getFileName(file_path));
}
printWithDots("Texture : ", getFileName(file_path), "[ LOADED ]");
Logger::dots("Texture : ", getFileName(file_path), "[ LOADED ]");
int pitch;
SDL_PixelFormat pixel_format;
@@ -330,7 +331,7 @@ auto Texture::loadPaletteFromFile(const std::string& file_path, bool quiet) -> P
}
if (!quiet) {
printWithDots("Palette : ", getFileName(file_path), "[ LOADED ]");
Logger::dots("Palette : ", getFileName(file_path), "[ LOADED ]");
}
// Usar la nueva función loadPalette, que devuelve un vector<uint32_t>