X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Fsdl_texture.cpp;h=05bf5a2294afdfd8cdc39f5bb030063e76be6ebc;hb=4f423b9bbb6fa694b8c6bcc338e069aad45db3e3;hp=b5b6dc68946e850180d679b226168737e7610488;hpb=9a01b9f95278bd34e2d4f2668bfeff55d5ec4f5a;p=supertux.git diff --git a/src/video/sdl_texture.cpp b/src/video/sdl_texture.cpp index b5b6dc689..05bf5a229 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)) @@ -608,9 +611,11 @@ namespace SDL texture = optimize(image); //width = texture->w; //height = texture->h; - int numerator, denominator; - float xfactor = (float) config->screenwidth / SCREEN_WIDTH; - float yfactor = (float) config->screenheight / SCREEN_HEIGHT; + int numerator = 1; + int denominator = 1; + //FIXME: float xfactor = (float) config->screenwidth / SCREEN_WIDTH; + //FIXME: float yfactor = (float) config->screenheight / SCREEN_HEIGHT; + /* FIXME: if(xfactor < yfactor) { numerator = config->screenwidth; @@ -621,6 +626,7 @@ namespace SDL numerator = config->screenheight; denominator = SCREEN_HEIGHT; } + */ cache[NO_EFFECT][Color::WHITE] = scale(texture, numerator, denominator); }