Permalink
Browse files

SDLVideo: use GetColorKey sprite method over directly using SDL

  • Loading branch information...
1 parent 9ae3141 commit 082d12b5246412ddb4ec242d13e8f3f7ba9e9688 @bradallred bradallred committed Jun 16, 2013
Showing with 1 addition and 6 deletions.
  1. +1 −6 gemrb/plugins/SDLVideo/SDLVideo.cpp
@@ -480,12 +480,7 @@ void SDLVideoDriver::BlitTile(const Sprite2D* spr, const Sprite2D* mask, int x,
const Uint8* mask_data = NULL;
Uint32 ck = 0;
if (mask) {
- mask_data = (Uint8*) (( SDL_Surface * ) mask->vptr)->pixels;
-#if SDL_VERSION_ATLEAST(1,3,0)
- SDL_GetColorKey(( SDL_Surface * ) mask->vptr, &ck);
-#else
- ck = (( SDL_Surface * ) mask->vptr)->format->colorkey;
-#endif
+ ck = mask->GetColorKey();
}
bool tint = false;

3 comments on commit 082d12b

@wjp
Member
wjp commented on 082d12b Jul 6, 2013

I'm not sure why, but this commit breaks the masked rendering of the canals in BG2's ar0900.

@wjp
Member
wjp commented on 082d12b Jul 6, 2013

Oh, mask_data is no longer being set of course.

@bradallred
Member

looks like i mistakenly deleted an extra line here. my bad.

Please sign in to comment.