gonna fer un commit per si reventa algo: estic a meitat implementar surfaces
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
struct Color;
|
||||
|
||||
// Definiciones de tipos
|
||||
struct Surface
|
||||
/*struct Surface
|
||||
{
|
||||
std::shared_ptr<Uint8[]> data;
|
||||
Uint16 w, h;
|
||||
@@ -19,7 +19,7 @@ struct Surface
|
||||
// Constructor
|
||||
Surface(Uint16 width, Uint16 height, std::shared_ptr<Uint8[]> pixels)
|
||||
: data(pixels), w(width), h(height) {}
|
||||
};
|
||||
};*/
|
||||
|
||||
class Texture
|
||||
{
|
||||
@@ -27,7 +27,7 @@ private:
|
||||
// Objetos y punteros
|
||||
SDL_Renderer *renderer_; // Renderizador donde dibujar la textura
|
||||
SDL_Texture *texture_ = nullptr; // La textura
|
||||
std::shared_ptr<Surface> surface_ = nullptr; // Surface para usar imagenes en formato gif con paleta
|
||||
//std::shared_ptr<Surface> surface_ = nullptr; // Surface para usar imagenes en formato gif con paleta
|
||||
|
||||
// Variables
|
||||
std::string path_; // Ruta de la imagen de la textura
|
||||
|
||||
Reference in New Issue
Block a user