1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix visual artefacts on the map when using 32 bits screen depth.

This commit is contained in:
Frank Zago
2009-05-17 02:35:28 +00:00
parent 0d5de20a7a
commit ce9b7b48ca

View File

@@ -509,6 +509,8 @@ void CSDL_Ext::blitWithRotate1(SDL_Surface *src,SDL_Rect * srcRect, SDL_Surface
for(int j=0; j<dstRect->w; j++, sp++)
{
const SDL_Color * const color = src->format->palette->colors+(*sp);
if (dst->format->BytesPerPixel == 4)
*(--dp) = 0;
*(--dp) = color->r;
*(--dp) = color->g;
*(--dp) = color->b;
@@ -535,6 +537,8 @@ void CSDL_Ext::blitWithRotate2(SDL_Surface *src,SDL_Rect * srcRect, SDL_Surface
*(dp++) = color->b;
*(dp++) = color->g;
*(dp++) = color->r;
if (dst->format->BytesPerPixel == 4)
*(dp++) = 0;
}
sp += src->w - dstRect->w;
}
@@ -557,6 +561,8 @@ void CSDL_Ext::blitWithRotate3(SDL_Surface *src,SDL_Rect * srcRect, SDL_Surface
for(int j=0; j<dstRect->w; j++, sp++)
{
const SDL_Color * const color = src->format->palette->colors+(*sp);
if (dst->format->BytesPerPixel == 4)
*(--dp) = 0;
*(--dp) = color->r;
*(--dp) = color->g;
*(--dp) = color->b;