This commit is contained in:
2025-11-03 09:52:54 +01:00
parent 1409ab5bff
commit 3f1c737247
32 changed files with 254 additions and 243 deletions

View File

@@ -21,7 +21,7 @@
// Carga una paleta desde un archivo .gif
auto loadPalette(const std::string& file_path) -> Palette {
// Load file using ResourceHelper (supports both filesystem and pack)
auto buffer = jdd::ResourceHelper::loadFile(file_path);
auto buffer = Jdd::ResourceHelper::loadFile(file_path);
if (buffer.empty()) {
throw std::runtime_error("Error opening file: " + file_path);
}
@@ -48,7 +48,7 @@ auto readPalFile(const std::string& file_path) -> Palette {
palette.fill(0); // Inicializar todo con 0 (transparente por defecto)
// Load file using ResourceHelper (supports both filesystem and pack)
auto file_data = jdd::ResourceHelper::loadFile(file_path);
auto file_data = Jdd::ResourceHelper::loadFile(file_path);
if (file_data.empty()) {
throw std::runtime_error("No se pudo abrir el archivo .pal: " + file_path);
}
@@ -106,7 +106,7 @@ Surface::Surface(const std::string& file_path)
// Carga una superficie desde un archivo
auto Surface::loadSurface(const std::string& file_path) -> SurfaceData {
// Load file using ResourceHelper (supports both filesystem and pack)
std::vector<Uint8> buffer = jdd::ResourceHelper::loadFile(file_path);
std::vector<Uint8> buffer = Jdd::ResourceHelper::loadFile(file_path);
if (buffer.empty()) {
std::cerr << "Error opening file: " << file_path << '\n';
throw std::runtime_error("Error opening file");