Mercurial > sdl-ios-xcode
diff src/video/SDL_RLEaccel.c @ 1456:84de7511f79f
Fixed a bunch of 64-bit compatibility problems
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 01 Mar 2006 09:43:47 +0000 |
parents | 5f52867ba65c |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/video/SDL_RLEaccel.c Mon Feb 27 22:14:40 2006 +0000 +++ b/src/video/SDL_RLEaccel.c Wed Mar 01 09:43:47 2006 +0000 @@ -587,12 +587,12 @@ unsigned n = (length); \ Uint16 *src = (Uint16 *)(from); \ Uint16 *dst = (Uint16 *)(to); \ - if(((unsigned long)src ^ (unsigned long)dst) & 3) { \ + if(((uintptr_t)src ^ (uintptr_t)dst) & 3) { \ /* source and destination not in phase, blit one by one */ \ while(n--) \ BLEND16_50(dst, src, mask); \ } else { \ - if((unsigned long)src & 3) { \ + if((uintptr_t)src & 3) { \ /* first odd pixel */ \ BLEND16_50(dst, src, mask); \ n--; \ @@ -1055,7 +1055,7 @@ } while(ofs < w); \ /* skip padding if necessary */ \ if(sizeof(Ptype) == 2) \ - srcbuf += (unsigned long)srcbuf & 2; \ + srcbuf += (uintptr_t)srcbuf & 2; \ /* blit translucent pixels on the same line */ \ ofs = 0; \ do { \ @@ -1147,7 +1147,7 @@ } while(ofs < w); /* skip padding */ - srcbuf += (unsigned long)srcbuf & 2; + srcbuf += (uintptr_t)srcbuf & 2; /* skip translucent line */ ofs = 0; @@ -1211,7 +1211,7 @@ } while(ofs < w); \ /* skip padding if necessary */ \ if(sizeof(Ptype) == 2) \ - srcbuf += (unsigned long)srcbuf & 2; \ + srcbuf += (uintptr_t)srcbuf & 2; \ /* blit translucent pixels on the same line */ \ ofs = 0; \ do { \ @@ -1547,7 +1547,7 @@ } while(x < w); /* Make sure the next output address is 32-bit aligned */ - dst += (unsigned long)dst & 2; + dst += (uintptr_t)dst & 2; /* Next, encode all translucent pixels of the same scan line */ x = 0; @@ -1874,7 +1874,7 @@ /* skip padding if needed */ if(bpp == 2) - srcbuf += (unsigned long)srcbuf & 2; + srcbuf += (uintptr_t)srcbuf & 2; /* copy translucent pixels */ ofs = 0;