fix alpha of fog of war

This commit is contained in:
Tim Felgentreff 2020-04-16 16:40:59 +02:00
parent f3eb06e12a
commit 3adf7599c5

View file

@ -679,7 +679,7 @@ void CMap::InitFogOfWar()
// Generate Alpha Fog surface. // Generate Alpha Fog surface.
// //
if (FogGraphic->Surface->format->BytesPerPixel == 1) { if (FogGraphic->Surface->format->BytesPerPixel == 1) {
s = SDL_ConvertSurfaceFormat(FogGraphic->Surface, SDL_PIXELFORMAT_RGB888, 0); s = SDL_ConvertSurfaceFormat(FogGraphic->Surface, SDL_PIXELFORMAT_RGBA8888, 0);
SDL_SetSurfaceAlphaMod(s, FogOfWarOpacity); SDL_SetSurfaceAlphaMod(s, FogOfWarOpacity);
} else { } else {
// Copy the top row to a new surface // Copy the top row to a new surface