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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user