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

@@ -92,8 +92,8 @@ public:
// Establece un color en la paleta
void setColor(int index, Uint32 color);
// Limpia la superficie de destino con un color
void clear(std::shared_ptr<SurfaceData> surface, Uint8 color);
// Rellena la superficie con un color
void clear(Uint8 color);
// Vuelca la superficie a una textura
void copyToTexture(SDL_Renderer *renderer, SDL_Texture *texture);
@@ -106,4 +106,10 @@ public:
int getTransparentColor() const { return transparent_color_; }
int getWidth() const { return surface_->width; }
int getHeight() const { return surface_->height; }
// Setters
void setTransparentColor(int color) { transparent_color_ = color; }
void setSurfaceDest(std::shared_ptr<SurfaceData> surface_dest) { surface_dest_ = surface_dest; }
void setPalette(const std::array<Uint32, 256> &palette) { palette_ = palette; }
void setSurface(std::shared_ptr<SurfaceData> surface) { surface_ = surface; }
};