Merdetes en la faena, básicament arreglar uns quants iniciadors de variables en les clases

This commit is contained in:
2024-10-23 14:00:19 +02:00
parent 528533fd9b
commit 95478134dd
15 changed files with 79 additions and 134 deletions

View File

@@ -15,13 +15,8 @@
// Constructor
Texture::Texture(SDL_Renderer *renderer, const std::string &path)
: texture_(nullptr),
renderer_(renderer),
surface_(nullptr),
width_(0),
height_(0),
path_(path),
current_palette_(0)
: renderer_(renderer),
path_(path)
{
// Carga el fichero en la textura
if (!path_.empty())
@@ -40,10 +35,10 @@ Texture::Texture(SDL_Renderer *renderer, const std::string &path)
{
// Crea la surface desde un fichero
surface_ = loadSurface(path_);
// Añade la propia paleta del fichero a la lista
addPaletteFromFile(path_);
//setPaletteColor(0, 0, 0x00000000);
addPaletteFromFile(path_);
// setPaletteColor(0, 0, 0x00000000);
// Crea la textura, establece el BlendMode y copia la surface a la textura
createBlank(width_, height_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING);