canvi de pc

This commit is contained in:
2025-03-05 07:44:12 +01:00
parent 57481a1e97
commit 33038e8509
23 changed files with 173 additions and 164 deletions

View File

@@ -68,11 +68,11 @@ private:
public:
// Constructor
Surface(std::shared_ptr<SurfaceData> surface_data_dest, int w, int h);
Surface(std::shared_ptr<SurfaceData> surface_data_dest = nullptr, int w = 0, int h = 0);
Surface(std::shared_ptr<SurfaceData> surface_data_dest, const std::string &file_path);
// Destructor
~Surface();
~Surface() = default;
// Carga una SurfaceData desde un archivo
SurfaceData loadSurface(const std::string &file_path);
@@ -124,10 +124,10 @@ public:
void setPalette(const std::array<Uint32, 256> &palette) { palette_ = palette; }
void setSurface(std::shared_ptr<SurfaceData> surface) { surface_data_ = surface; }
// Permite que una Surface apunte al SurfaceData de otra Surface
void redirectSurfaceDataTo(const std::shared_ptr<SurfaceData> &newSurfaceData) { surface_data_ = newSurfaceData; }
void redirectSurfaceDataTo(const std::shared_ptr<Surface> &otherSurface) { surface_data_ = otherSurface->getSurfaceData(); }
// Método para redirigir surface_data_ al surface_data_ de otro objeto
void redirectSurfaceDataTo(const std::shared_ptr<SurfaceData> &newSurfaceData);
void redirectSurfaceDataTo(const std::shared_ptr<Surface> &otherSurface);
// Método para restaurar
void restoreOriginalSurfaceData() { surface_data_ = original_surface_data_; }
// Método para restaurar surface_data_ al valor original
void restoreOriginalSurfaceData();
};