From 0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 10 Jun 2011 18:10:18 +0300 Subject: Fix code style. --- src/graphics.cpp | 23 ++++++++++++++--------- src/gui/windowmenu.cpp | 3 ++- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'src') 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; diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index b73e5fad0..fd1582656 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -95,7 +95,8 @@ WindowMenu::WindowMenu(): KeyboardConfig::KEY_WINDOW_SHORTCUT); addButton(N_("SP"), _("Spells"), x, h, KeyboardConfig::KEY_WINDOW_SPELLS); addButton(N_("DR"), _("Drop"), x, h, KeyboardConfig::KEY_WINDOW_DROP); - addButton(N_("YK"), _("Did you know"), x, h, KeyboardConfig::KEY_WINDOW_DIDYOUKNOW); + addButton(N_("YK"), _("Did you know"), x, h, + KeyboardConfig::KEY_WINDOW_DIDYOUKNOW); addButton(N_("SET"), _("Setup"), x, h, KeyboardConfig::KEY_WINDOW_SETUP); if (graphics) -- cgit v1.2.3-60-g2f50