From: Holger Schemel Date: Wed, 29 Jun 2016 18:35:11 +0000 (+0200) Subject: fixed zooming surfaces to keep alpha channel X-Git-Tag: 4.0.0.0~56 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5208004f5801d92d705032715eb063b8412613f2;p=rocksndiamonds.git fixed zooming surfaces to keep alpha channel --- diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 0e8945d5..60b40b3a 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -2124,7 +2124,8 @@ SDL_Surface *zoomSurface(SDL_Surface *src, int dst_width, int dst_height) { /* new source surface is 32 bit with a defined RGB ordering */ zoom_src = SDL_CreateRGBSurface(SURFACE_FLAGS, src->w, src->h, 32, - 0x000000ff, 0x0000ff00, 0x00ff0000, 0); + 0x000000ff, 0x0000ff00, 0x00ff0000, + (src->format->Amask ? 0xff000000 : 0)); SDL_BlitSurface(src, NULL, zoom_src, NULL); is_32bit = TRUE; is_converted = TRUE; @@ -2137,7 +2138,8 @@ SDL_Surface *zoomSurface(SDL_Surface *src, int dst_width, int dst_height) zoom_dst = SDL_CreateRGBSurface(SURFACE_FLAGS, dst_width, dst_height, 32, zoom_src->format->Rmask, zoom_src->format->Gmask, - zoom_src->format->Bmask, 0); + zoom_src->format->Bmask, + zoom_src->format->Amask); } else {