From c2efedab22275302f0a10cc197424d345a021d18 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Jun 2012 20:13:48 +0300 Subject: Replace SDL int types to C++ types. --- src/guichan/sdl/sdlgraphics.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/guichan/sdl/sdlgraphics.cpp') diff --git a/src/guichan/sdl/sdlgraphics.cpp b/src/guichan/sdl/sdlgraphics.cpp index 63ed8bbc2..e50017c38 100644 --- a/src/guichan/sdl/sdlgraphics.cpp +++ b/src/guichan/sdl/sdlgraphics.cpp @@ -209,10 +209,10 @@ namespace gcn SDL_LockSurface(mTarget); - Uint8 *p = static_cast(mTarget->pixels) + uint8_t *p = static_cast(mTarget->pixels) + y * mTarget->pitch + x1 * bpp; - Uint32 pixel = SDL_MapRGB(mTarget->format, + uint32_t pixel = SDL_MapRGB(mTarget->format, mColor.r, mColor.g, mColor.b); @@ -225,7 +225,7 @@ namespace gcn case 2: { - Uint16* q = reinterpret_cast(p); + uint16_t* q = reinterpret_cast(p); for (; x1 <= x2; ++x1) *(q++) = pixel; break; @@ -256,7 +256,7 @@ namespace gcn case 4: { - Uint32 *q = reinterpret_cast(p); + uint32_t *q = reinterpret_cast(p); for (; x1 <= x2; ++x1) { if (mAlpha) @@ -322,10 +322,10 @@ namespace gcn SDL_LockSurface(mTarget); - Uint8 *p = static_cast(mTarget->pixels) + uint8_t *p = static_cast(mTarget->pixels) + y1 * mTarget->pitch + x * bpp; - Uint32 pixel = SDL_MapRGB(mTarget->format, mColor.r, + uint32_t pixel = SDL_MapRGB(mTarget->format, mColor.r, mColor.g, mColor.b); switch (bpp) @@ -341,7 +341,7 @@ namespace gcn case 2: for (; y1 <= y2; ++ y1) { - *reinterpret_cast(p) = pixel; + *reinterpret_cast(p) = pixel; p += mTarget->pitch; } break; @@ -374,12 +374,12 @@ namespace gcn { if (mAlpha) { - *reinterpret_cast(p) = SDLAlpha32(pixel, - *reinterpret_cast(p), mColor.a); + *reinterpret_cast(p) = SDLAlpha32(pixel, + *reinterpret_cast(p), mColor.a); } else { - *reinterpret_cast(p) = pixel; + *reinterpret_cast(p) = pixel; } p += mTarget->pitch; } -- cgit v1.2.3-60-g2f50