Transició a surface: vaig per title.cpp

This commit is contained in:
2025-03-02 21:56:19 +01:00
parent db3a0d7263
commit 8f1d1df5d6
27 changed files with 416 additions and 490 deletions

View File

@@ -98,11 +98,11 @@ void Surface::setColor(int index, Uint32 color)
palette_.at(index) = color;
}
// Limpia la superficie de destino con un color
void Surface::clear(std::shared_ptr<SurfaceData> surface, Uint8 color)
// Rellena la superficie con un color
void Surface::clear(Uint8 color)
{
const size_t total_pixels = surface->width * surface->height;
std::fill(surface->data, surface->data + total_pixels, color);
const size_t total_pixels = surface_->width * surface_->height;
std::fill(surface_->data, surface_->data + total_pixels, color);
}
// Pone un pixel en la superficie de destino