1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Implemented per-surface alpha for images that have palettes with alpha

This commit is contained in:
Ivan Savenko
2024-07-19 12:03:29 +00:00
parent c40eea6e10
commit b256919dab
3 changed files with 30 additions and 15 deletions

View File

@@ -119,9 +119,9 @@ void SDLImageConst::draw(SDL_Surface * where, SDL_Palette * palette, const Point
if (palette && surf->format->palette)
SDL_SetSurfacePalette(surf, palette);
if(surf->format->palette && alpha == SDL_ALPHA_OPAQUE && mode == EImageBlitMode::ALPHA)
if(surf->format->palette && mode == EImageBlitMode::ALPHA)
{
CSDL_Ext::blit8bppAlphaTo24bpp(surf, sourceRect, where, destShift);
CSDL_Ext::blit8bppAlphaTo24bpp(surf, sourceRect, where, destShift, alpha);
}
else
{