From: Tim Goya Date: Fri, 24 Aug 2007 18:43:08 +0000 (+0000) Subject: SDL: don't take note of a color in the optimizer if the pixel is strictly transparent X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f50d272e41f0f8354f5006dfaddc5e3587ca0b7d;p=supertux.git SDL: don't take note of a color in the optimizer if the pixel is strictly transparent SVN-Revision: 5156 --- diff --git a/src/video/sdl_texture.cpp b/src/video/sdl_texture.cpp index b5b6dc689..21645507e 100644 --- a/src/video/sdl_texture.cpp +++ b/src/video/sdl_texture.cpp @@ -483,7 +483,10 @@ namespace semitransparent++; squaredalphasum += alpha * alpha; } - colors[((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0) >> 4)] = true; + if(alpha != 0) + { + colors[((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0) >> 4)] = true; + } } } if(SDL_MUSTLOCK(src))