Mercurial > sdl-ios-xcode
diff src/video/SDL_blit_A.c @ 3363:90aec03bf9fd
Fixed bug #627
Increased accuracy of alpha blend calculation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Oct 2009 07:48:57 +0000 |
parents | ff602fdfdedc |
children | baeff5f3203b |
line wrap: on
line diff
--- a/src/video/SDL_blit_A.c Sat Oct 10 07:34:15 2009 +0000 +++ b/src/video/SDL_blit_A.c Sat Oct 10 07:48:57 2009 +0000 @@ -629,7 +629,7 @@ dR = (dstpixel >> 8) & 0xf8; \ dG = (dstpixel >> 3) & 0xfc; \ dB = (dstpixel << 3) & 0xf8; \ - ACCURATE_ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ + ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ *((unsigned short *)dst) = ( \ ((dR & 0xf8) << 8) | ((dG & 0xfc) << 3) | (dB >> 3) \ ); \ @@ -775,7 +775,7 @@ if(sA && Pixel != ckey) { \ RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB); \ DISEMBLE_RGB(((Uint8 *)dstp), 4, dstfmt, Pixel, dR, dG, dB); \ - ACCURATE_ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ + ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ ASSEMBLE_RGBA(((Uint8 *)dstp), 4, dstfmt, dR, dG, dB, dA); \ } \ dstp++; \ @@ -882,7 +882,7 @@ DISEMBLE_RGBA((Uint8 *)srcp, 4, srcfmt, Pixel, sR, sG, sB, sA); \ if(sA) { \ DISEMBLE_RGBA((Uint8 *)dstp, 4, dstfmt, Pixel, dR, dG, dB, dA); \ - ACCURATE_ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ + ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ ASSEMBLE_RGBA((Uint8 *)dstp, 4, dstfmt, dR, dG, dB, dA); \ } \ ++srcp; \ @@ -1082,7 +1082,7 @@ unsigned sR, sG, sB, dR, dG, dB; \ DISEMBLE_RGB(((Uint8 *)srcp), 4, srcfmt, Pixel, sR, sG, sB); \ DISEMBLE_RGB(((Uint8 *)dstp), 4, dstfmt, Pixel, dR, dG, dB); \ - ACCURATE_ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ + ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \ ASSEMBLE_RGBA(((Uint8 *)dstp), 4, dstfmt, dR, dG, dB, dA); \ ++srcp; \ ++dstp; \