This commit is contained in:
2025-10-27 13:01:11 +01:00
parent 5d8811026d
commit cdb9bde6aa
23 changed files with 392 additions and 392 deletions

View File

@@ -35,8 +35,7 @@ Palette loadPalette(const std::string& file_path) {
}
// Cargar la paleta usando los datos del buffer
GIF::Gif gif;
std::vector<uint32_t> pal = gif.loadPalette(buffer.data());
std::vector<uint32_t> pal = GIF::Gif::loadPalette(buffer.data());
if (pal.empty()) {
throw std::runtime_error("No palette found in GIF file: " + file_path);
}
@@ -435,7 +434,7 @@ void Surface::copyToTexture(SDL_Renderer* renderer, SDL_Texture* texture) {
throw std::runtime_error("Renderer or texture is null.");
}
if (surface_data_->width <= 0 || surface_data_->height <= 0 || (surface_data_->data.get() == nullptr)) {
if (surface_data_->width <= 0 || surface_data_->height <= 0 || (surface_data_->data == nullptr)) {
throw std::runtime_error("Invalid surface dimensions or data.");
}
@@ -474,7 +473,7 @@ void Surface::copyToTexture(SDL_Renderer* renderer, SDL_Texture* texture, SDL_FR
throw std::runtime_error("Renderer or texture is null.");
}
if (surface_data_->width <= 0 || surface_data_->height <= 0 || (surface_data_->data.get() == nullptr)) {
if (surface_data_->width <= 0 || surface_data_->height <= 0 || (surface_data_->data == nullptr)) {
throw std::runtime_error("Invalid surface dimensions or data.");
}