diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-17 20:13:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-17 20:13:48 +0300 |
commit | c2efedab22275302f0a10cc197424d345a021d18 (patch) | |
tree | 7488abbb3655451a3f6a1621e0708f72011af5f6 /src/resources/openglimagehelper.cpp | |
parent | 79aba82be3de5b6b571e2f59f7a34ded4b03160f (diff) | |
download | mv-c2efedab22275302f0a10cc197424d345a021d18.tar.gz mv-c2efedab22275302f0a10cc197424d345a021d18.tar.bz2 mv-c2efedab22275302f0a10cc197424d345a021d18.tar.xz mv-c2efedab22275302f0a10cc197424d345a021d18.zip |
Replace SDL int types to C++ types.
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r-- | src/resources/openglimagehelper.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index db75a7b0c..7606b9ec8 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -61,15 +61,15 @@ Resource *OpenGLImageHelper::load(SDL_RWops *rw, Dye const &dye) SDL_Surface *surf = convertTo32Bit(tmpImage); SDL_FreeSurface(tmpImage); - Uint32 *pixels = static_cast<Uint32 *>(surf->pixels); + uint32_t *pixels = static_cast<uint32_t *>(surf->pixels); DyePalette *pal = dye.getSPalete(); if (pal) { - for (Uint32 *p_end = pixels + surf->w * surf->h; + for (uint32_t *p_end = pixels + surf->w * surf->h; pixels != p_end; ++pixels) { - Uint8 *p = reinterpret_cast<Uint8 *>(pixels); + uint8_t *p = reinterpret_cast<uint8_t *>(pixels); const int alpha = *p & 255; if (!alpha) continue; @@ -78,10 +78,10 @@ Resource *OpenGLImageHelper::load(SDL_RWops *rw, Dye const &dye) } else { - for (Uint32 *p_end = pixels + surf->w * surf->h; + for (uint32_t *p_end = pixels + surf->w * surf->h; pixels != p_end; ++pixels) { - const Uint32 p = *pixels; + const uint32_t p = *pixels; const int alpha = (p >> 24) & 255; if (!alpha) continue; @@ -154,7 +154,7 @@ Image *OpenGLImageHelper::_GLload(SDL_Surface *tmpImage) SDL_SetAlpha(tmpImage, 0, SDL_ALPHA_OPAQUE); // Determine 32-bit masks based on byte order - Uint32 rmask, gmask, bmask, amask; + uint32_t rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN rmask = 0xff000000; gmask = 0x00ff0000; |