diff src/video/SDL_blit_A.c @ 1428:5f52867ba65c

Update for Visual C++ 6.0
author Sam Lantinga <slouken@libsdl.org>
date Fri, 24 Feb 2006 18:24:57 +0000
parents d910939febfa
children 9ebbbb4ae53b
line wrap: on
line diff
--- a/src/video/SDL_blit_A.c	Fri Feb 24 17:03:06 2006 +0000
+++ b/src/video/SDL_blit_A.c	Fri Feb 24 18:24:57 2006 +0000
@@ -1483,9 +1483,9 @@
 			if(w) {
 				Uint16 d = *dstp, s;
 				if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
-					s = prev_sw;
+					s = (Uint16)prev_sw;
 				else
-					s = prev_sw >> 16;
+					s = (Uint16)(prev_sw >> 16);
 				*dstp = BLEND16_50(d, s, mask);
 				srcp++;
 				dstp++;
@@ -1858,7 +1858,7 @@
 				d = (d | d << 16) & 0x07e0f81f;
 				d += (s - d) * alpha >> 5;
 				d &= 0x07e0f81f;
-				*dstp++ = d | d >> 16;
+				*dstp++ = (Uint16)(d | d >> 16);
 			}, width);
 			srcp += srcskip;
 			dstp += dstskip;
@@ -1894,7 +1894,7 @@
 				d = (d | d << 16) & 0x03e07c1f;
 				d += (s - d) * alpha >> 5;
 				d &= 0x03e07c1f;
-				*dstp++ = d | d >> 16;
+				*dstp++ = (Uint16)(d | d >> 16);
 			}, width);
 			srcp += srcskip;
 			dstp += dstskip;
@@ -1922,8 +1922,7 @@
 		   Benchmark this! */
 		if(alpha) {   
 		  if(alpha == (SDL_ALPHA_OPAQUE >> 3)) {
-		    *dstp = (s >> 8 & 0xf800) + (s >> 5 & 0x7e0)
-			  + (s >> 3  & 0x1f);
+		    *dstp = (Uint16)((s >> 8 & 0xf800) + (s >> 5 & 0x7e0) + (s >> 3  & 0x1f));
 		  } else {
 		    Uint32 d = *dstp;
 		    /*
@@ -1935,7 +1934,7 @@
 		    d = (d | d << 16) & 0x07e0f81f;
 		    d += (s - d) * alpha >> 5;
 		    d &= 0x07e0f81f;
-		    *dstp = d | d >> 16;
+		    *dstp = (Uint16)(d | d >> 16);
 		  }
 		}
 		srcp++;
@@ -1967,8 +1966,7 @@
 		   Benchmark this! */
 		if(alpha) {   
 		  if(alpha == (SDL_ALPHA_OPAQUE >> 3)) {
-		    *dstp = (s >> 9 & 0x7c00) + (s >> 6 & 0x3e0)
-			  + (s >> 3  & 0x1f);
+		    *dstp = (Uint16)((s >> 9 & 0x7c00) + (s >> 6 & 0x3e0) + (s >> 3  & 0x1f));
 		  } else {
 		    Uint32 d = *dstp;
 		    /*
@@ -1980,7 +1978,7 @@
 		    d = (d | d << 16) & 0x03e07c1f;
 		    d += (s - d) * alpha >> 5;
 		    d &= 0x03e07c1f;
-		    *dstp = d | d >> 16;
+		    *dstp = (Uint16)(d | d >> 16);
 		  }
 		}
 		srcp++;