src/video/SDL_blit_N.c
changeset 1428 5f52867ba65c
parent 1402 d910939febfa
child 1443 9ebbbb4ae53b
     1.1 --- a/src/video/SDL_blit_N.c	Fri Feb 24 17:03:06 2006 +0000
     1.2 +++ b/src/video/SDL_blit_N.c	Fri Feb 24 18:24:57 2006 +0000
     1.3 @@ -858,9 +858,9 @@
     1.4  
     1.5  /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */
     1.6  #define RGB888_RGB332(dst, src) { \
     1.7 -	dst = (((src)&0x00E00000)>>16)| \
     1.8 -	      (((src)&0x0000E000)>>11)| \
     1.9 -	      (((src)&0x000000C0)>>6); \
    1.10 +	dst = (Uint8)((((src)&0x00E00000)>>16)| \
    1.11 +	              (((src)&0x0000E000)>>11)| \
    1.12 +	              (((src)&0x000000C0)>>6)); \
    1.13  }
    1.14  static void Blit_RGB888_index8(SDL_BlitInfo *info)
    1.15  {
    1.16 @@ -962,9 +962,9 @@
    1.17  }
    1.18  /* Special optimized blit for RGB 8-8-8 --> RGB 5-5-5 */
    1.19  #define RGB888_RGB555(dst, src) { \
    1.20 -	*(Uint16 *)(dst) = (((*src)&0x00F80000)>>9)| \
    1.21 -	                   (((*src)&0x0000F800)>>6)| \
    1.22 -	                   (((*src)&0x000000F8)>>3); \
    1.23 +	*(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \
    1.24 +	                            (((*src)&0x0000F800)>>6)| \
    1.25 +	                            (((*src)&0x000000F8)>>3)); \
    1.26  }
    1.27  #define RGB888_RGB555_TWO(dst, src) { \
    1.28  	*(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \
    1.29 @@ -1082,9 +1082,9 @@
    1.30  }
    1.31  /* Special optimized blit for RGB 8-8-8 --> RGB 5-6-5 */
    1.32  #define RGB888_RGB565(dst, src) { \
    1.33 -	*(Uint16 *)(dst) = (((*src)&0x00F80000)>>8)| \
    1.34 -	                   (((*src)&0x0000FC00)>>5)| \
    1.35 -	                   (((*src)&0x000000F8)>>3); \
    1.36 +	*(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \
    1.37 +	                            (((*src)&0x0000FC00)>>5)| \
    1.38 +	                            (((*src)&0x000000F8)>>3)); \
    1.39  }
    1.40  #define RGB888_RGB565_TWO(dst, src) { \
    1.41  	*(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \
    1.42 @@ -2101,7 +2101,7 @@
    1.43  	Uint32 rgbmask = ~srcfmt->Amask;
    1.44  	int srcbpp;
    1.45  	Uint32 Pixel;
    1.46 -	Uint8  sR, sG, sB;
    1.47 +	unsigned sR, sG, sB;
    1.48  
    1.49  	/* Set up some basic variables */
    1.50  	srcbpp = srcfmt->BytesPerPixel;
    1.51 @@ -2115,9 +2115,9 @@
    1.52  								sR, sG, sB);
    1.53  				if ( (Pixel & rgbmask) != ckey ) {
    1.54  				  	/* Pack RGB into 8bit pixel */
    1.55 -				  	*dst = ((sR>>5)<<(3+2))|
    1.56 -						((sG>>5)<<(2)) |
    1.57 -						((sB>>6)<<(0)) ;
    1.58 +				  	*dst = (Uint8)(((sR>>5)<<(3+2))|
    1.59 +						           ((sG>>5)<<(2)) |
    1.60 +						           ((sB>>6)<<(0)));
    1.61  				}
    1.62  				dst++;
    1.63  				src += srcbpp;
    1.64 @@ -2134,9 +2134,9 @@
    1.65  								sR, sG, sB);
    1.66  				if ( (Pixel & rgbmask) != ckey ) {
    1.67  				  	/* Pack RGB into 8bit pixel */
    1.68 -				  	*dst = palmap[((sR>>5)<<(3+2))|
    1.69 -							((sG>>5)<<(2))  |
    1.70 -							((sB>>6)<<(0))  ];
    1.71 +				  	*dst = (Uint8)palmap[((sR>>5)<<(3+2))|
    1.72 +							             ((sG>>5)<<(2))  |
    1.73 +							             ((sB>>6)<<(0))  ];
    1.74  				}
    1.75  				dst++;
    1.76  				src += srcbpp;
    1.77 @@ -2232,7 +2232,7 @@
    1.78  	Uint8 srcbpp;
    1.79  	Uint8 dstbpp;
    1.80  	Uint32 Pixel;
    1.81 -	Uint8  sR, sG, sB, sA;
    1.82 +	unsigned sR, sG, sB, sA;
    1.83  
    1.84  	/* Set up some basic variables */
    1.85  	srcbpp = srcfmt->BytesPerPixel;