summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-10 18:10:18 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-10 18:10:18 +0300
commit0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6 (patch)
tree9a77ccd24c730971199fb6d1e7c1b514631b6ed4 /src/graphics.cpp
parentbff595c13f2e6bc98857d6f5d02ec79eefb751cc (diff)
downloadmv-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.tar.gz
mv-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.tar.bz2
mv-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.tar.xz
mv-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.zip
Fix code style.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 02257130c..6f3e5a23d 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -728,7 +728,8 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle)
int x, y;
const int bpp = mTarget->format->BytesPerPixel;
- Uint32 pixel = SDL_MapRGB(mTarget->format, mColor.r, mColor.g, mColor.b);
+ Uint32 pixel = SDL_MapRGB(mTarget->format,
+ mColor.r, mColor.g, mColor.b);
SDL_LockSurface(mTarget);
switch(bpp)
@@ -738,7 +739,8 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle)
{
for (x = x1; x < x2; x++)
{
- Uint8 *p = (Uint8 *)mTarget->pixels + y * mTarget->pitch + x * bpp;
+ Uint8 *p = (Uint8 *)mTarget->pixels
+ + y * mTarget->pitch + x * bpp;
*p = pixel;
//SDLputPixelAlpha(mTarget, x, y, mColor);
}
@@ -749,7 +751,8 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle)
{
for (x = x1; x < x2; x++)
{
- Uint8 *p = (Uint8 *)mTarget->pixels + y * mTarget->pitch + x * bpp;
+ Uint8 *p = (Uint8 *)mTarget->pixels
+ + y * mTarget->pitch + x * bpp;
*(Uint16 *)p = gcn::SDLAlpha16(pixel, *(Uint32 *)p,
mColor.a, mTarget->format);
//SDLputPixelAlpha(mTarget, x, y, mColor);
@@ -767,7 +770,8 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle)
{
for (x = x1; x < x2; x++)
{
- Uint8 *p = (Uint8 *)mTarget->pixels + y * mTarget->pitch + x * bpp;
+ Uint8 *p = (Uint8 *)mTarget->pixels
+ + y * mTarget->pitch + x * bpp;
if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
{
p[2] = (p[2] * ca + cb) >> 8;
@@ -795,15 +799,16 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle)
{
for (x = x1; x < x2; x++)
{
- Uint8 *p = (Uint8 *)mTarget->pixels + y * mTarget->pitch + x * bpp;
+ Uint8 *p = (Uint8 *)mTarget->pixels
+ + y * mTarget->pitch + x * bpp;
Uint32 dst = *(Uint32 *)p;
const unsigned int b = (pb + (dst & 0xff) * a1) >> 8;
const unsigned int g = (pg + (dst & 0xff00) * a1) >> 8;
- const unsigned int r = (pr + (dst & 0xff0000) * a1) >> 8;
+ const unsigned int r = (pr
+ + (dst & 0xff0000) * a1) >> 8;
- *(Uint32 *)p = ((b & 0xff) | (g & 0xff00) | (r & 0xff0000));
-
-// *(Uint32 *)p = gcn::SDLAlpha32(pixel, *(Uint32 *)p, mColor.a);
+ *(Uint32 *)p = ((b & 0xff)
+ | (g & 0xff00) | (r & 0xff0000));
}
}
break;