fix: corregido error al dibujar texturas desde gif. Faltaba activar el blendmode
añadidas mas paletas para el jugador1 cambiada la manera de representar la inmunidad para el jugador
This commit is contained in:
@@ -38,7 +38,8 @@ Texture::Texture(SDL_Renderer *renderer, std::string path, bool verbose)
|
||||
surface = loadSurface(path.c_str());
|
||||
addPalette(path.c_str());
|
||||
setPaletteColor(0, 0, 0x00000000);
|
||||
createBlank(renderer, width, height);
|
||||
createBlank(renderer, width, height, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING);
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
flipSurface();
|
||||
}
|
||||
}
|
||||
@@ -76,7 +77,7 @@ bool Texture::loadFromFile(std::string path, SDL_Renderer *renderer, bool verbos
|
||||
if (req_format == STBI_rgb)
|
||||
{
|
||||
depth = 24;
|
||||
pitch = 3 * width; // 3 bytes por pixel * pixels per linea
|
||||
pitch = 3 * width; // 3 bytes por pixel * pixels por linea
|
||||
pixel_format = SDL_PIXELFORMAT_RGB24;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user