src/video/SDL_blit.h
branchSDL-1.2
changeset 4293 63b54ddd38ea
parent 4159 a1b03ba2fcd0
child 4367 2d00ed718720
     1.1 --- a/src/video/SDL_blit.h	Sat Oct 10 07:33:18 2009 +0000
     1.2 +++ b/src/video/SDL_blit.h	Sat Oct 10 07:48:15 2009 +0000
     1.3 @@ -384,22 +384,9 @@
     1.4  /* Blend the RGB values of two Pixels based on a source alpha value */
     1.5  #define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB)	\
     1.6  do {						\
     1.7 -	dR = (((sR-dR)*(A))>>8)+dR;		\
     1.8 -	dG = (((sG-dG)*(A))>>8)+dG;		\
     1.9 -	dB = (((sB-dB)*(A))>>8)+dB;		\
    1.10 -} while(0)
    1.11 -
    1.12 -/* Blend the RGB values of two Pixels based on a source alpha value */
    1.13 -#define ACCURATE_ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB)	\
    1.14 -do {						\
    1.15 -    unsigned tR, tG, tB, tA; \
    1.16 -    tA = 255 - sA; \
    1.17 -    tR = 1 + (sR * sA) + (dR * tA); \
    1.18 -    dR = (tR + (tR >> 8)) >> 8; \
    1.19 -    tG = 1 + (sG * sA) + (dG * tA); \
    1.20 -    dG = (tG + (tG >> 8)) >> 8; \
    1.21 -    tB = 1 + (sB * sA) + (dB * tA); \
    1.22 -    dB = (tB + (tB >> 8)) >> 8; \
    1.23 +	dR = (((sR-dR)*(A)+255)>>8)+dR;		\
    1.24 +	dG = (((sG-dG)*(A)+255)>>8)+dG;		\
    1.25 +	dB = (((sB-dB)*(A)+255)>>8)+dB;		\
    1.26  } while(0)
    1.27  
    1.28