Skip to content

Commit

Permalink
SDLSprite: dont indiscriminately set RLE
Browse files Browse the repository at this point in the history
  • Loading branch information
bradallred committed Jul 8, 2013
1 parent c3d3e46 commit 420838c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gemrb/plugins/SDLVideo/SDLSurfaceSprite2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ SDLSurfaceSprite2D::SDLSurfaceSprite2D (int Width, int Height, int Bpp, void* pi
{
surface = SDL_CreateRGBSurfaceFrom( pixels, Width, Height, Bpp < 8 ? 8 : Bpp, Width * ( Bpp / 8 ),
rmask, gmask, bmask, amask );
SetSurfaceRLE(true);
}

SDLSurfaceSprite2D::SDLSurfaceSprite2D(const SDLSurfaceSprite2D &obj)
: Sprite2D(obj)
{
// SDL_ConvertSurface should copy colorkey/palette/pixels
// SDL_ConvertSurface should copy colorkey/palette/pixels/surface RLE
surface = SDL_ConvertSurface(obj.surface, obj.surface->format, obj.surface->flags);
pixels = surface->pixels;
}
Expand Down Expand Up @@ -100,6 +99,7 @@ void SDLSurfaceSprite2D::SetColorKey(ieDword ck)
#else
SDL_SetColorKey(surface, SDL_SRCCOLORKEY | SDL_RLEACCEL, ck);
#endif
SetSurfaceRLE(true);
}

Color SDLSurfaceSprite2D::GetPixel(unsigned short x, unsigned short y) const
Expand Down

0 comments on commit 420838c

Please sign in to comment.