comparison src/video/SDL_shape.c @ 4808:2ae79ed78a5a

More work on color-key mode.
author Eli Gottlieb <eligottlieb@gmail.com>
date Fri, 23 Jul 2010 01:48:42 -0400
parents c9eb95f29770
children 329708ffe2a7
comparison
equal deleted inserted replaced
4807:c9eb95f29770 4808:2ae79ed78a5a
94 case(ShapeModeReverseBinarizeAlpha): 94 case(ShapeModeReverseBinarizeAlpha):
95 bitmap[bitmap_pixel / ppb] |= (alpha <= mode.parameters.binarizationCutoff ? value : 0) << ((ppb - 1) - (bitmap_pixel % ppb)); 95 bitmap[bitmap_pixel / ppb] |= (alpha <= mode.parameters.binarizationCutoff ? value : 0) << ((ppb - 1) - (bitmap_pixel % ppb));
96 break; 96 break;
97 case(ShapeModeColorKey): 97 case(ShapeModeColorKey):
98 key = mode.parameters.colorKey; 98 key = mode.parameters.colorKey;
99 bitmap[bitmap_pixel / ppb] |= (key.r == r && key.g == g && key.b == b ? value : 0) << ((ppb - 1) - (bitmap_pixel % ppb)); 99 bitmap[bitmap_pixel / ppb] |= ((key.r == r && key.g == g && key.b == b) ? value : 0) << ((ppb - 1) - (bitmap_pixel % ppb));
100 break; 100 break;
101 } 101 }
102 } 102 }
103 } 103 }
104 if(SDL_MUSTLOCK(shape)) 104 if(SDL_MUSTLOCK(shape))