src/video/SDL_RLEaccel.c
changeset 1456 84de7511f79f
parent 1428 5f52867ba65c
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
     1.1 --- a/src/video/SDL_RLEaccel.c	Mon Feb 27 22:14:40 2006 +0000
     1.2 +++ b/src/video/SDL_RLEaccel.c	Wed Mar 01 09:43:47 2006 +0000
     1.3 @@ -587,12 +587,12 @@
     1.4  	unsigned n = (length);						\
     1.5  	Uint16 *src = (Uint16 *)(from);					\
     1.6  	Uint16 *dst = (Uint16 *)(to);					\
     1.7 -	if(((unsigned long)src ^ (unsigned long)dst) & 3) {		\
     1.8 +	if(((uintptr_t)src ^ (uintptr_t)dst) & 3) {			\
     1.9  	    /* source and destination not in phase, blit one by one */	\
    1.10  	    while(n--)							\
    1.11  		BLEND16_50(dst, src, mask);				\
    1.12  	} else {							\
    1.13 -	    if((unsigned long)src & 3) {				\
    1.14 +	    if((uintptr_t)src & 3) {					\
    1.15  		/* first odd pixel */					\
    1.16  		BLEND16_50(dst, src, mask);				\
    1.17  		n--;							\
    1.18 @@ -1055,7 +1055,7 @@
    1.19  	    } while(ofs < w);						  \
    1.20  	    /* skip padding if necessary */				  \
    1.21  	    if(sizeof(Ptype) == 2)					  \
    1.22 -		srcbuf += (unsigned long)srcbuf & 2;			  \
    1.23 +		srcbuf += (uintptr_t)srcbuf & 2;			  \
    1.24  	    /* blit translucent pixels on the same line */		  \
    1.25  	    ofs = 0;							  \
    1.26  	    do {							  \
    1.27 @@ -1147,7 +1147,7 @@
    1.28  		    } while(ofs < w);
    1.29  
    1.30  		    /* skip padding */
    1.31 -		    srcbuf += (unsigned long)srcbuf & 2;
    1.32 +		    srcbuf += (uintptr_t)srcbuf & 2;
    1.33  
    1.34  		    /* skip translucent line */
    1.35  		    ofs = 0;
    1.36 @@ -1211,7 +1211,7 @@
    1.37  		} while(ofs < w);					 \
    1.38  		/* skip padding if necessary */				 \
    1.39  		if(sizeof(Ptype) == 2)					 \
    1.40 -		    srcbuf += (unsigned long)srcbuf & 2;		 \
    1.41 +		    srcbuf += (uintptr_t)srcbuf & 2;		 	 \
    1.42  		/* blit translucent pixels on the same line */		 \
    1.43  		ofs = 0;						 \
    1.44  		do {							 \
    1.45 @@ -1547,7 +1547,7 @@
    1.46  	    } while(x < w);
    1.47  
    1.48  	    /* Make sure the next output address is 32-bit aligned */
    1.49 -	    dst += (unsigned long)dst & 2;
    1.50 +	    dst += (uintptr_t)dst & 2;
    1.51  
    1.52  	    /* Next, encode all translucent pixels of the same scan line */
    1.53  	    x = 0;
    1.54 @@ -1874,7 +1874,7 @@
    1.55  
    1.56  	/* skip padding if needed */
    1.57  	if(bpp == 2)
    1.58 -	    srcbuf += (unsigned long)srcbuf & 2;
    1.59 +	    srcbuf += (uintptr_t)srcbuf & 2;
    1.60  	
    1.61  	/* copy translucent pixels */
    1.62  	ofs = 0;