diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-10 18:10:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-10 18:10:18 +0300 |
commit | 0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6 (patch) | |
tree | 9a77ccd24c730971199fb6d1e7c1b514631b6ed4 /src | |
parent | bff595c13f2e6bc98857d6f5d02ec79eefb751cc (diff) | |
download | manaverse-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.tar.gz manaverse-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.tar.bz2 manaverse-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.tar.xz manaverse-0ed6f6cd758b47e4c8cd9689ec3c218de34f80c6.zip |
Fix code style.
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics.cpp | 23 | ||||
-rw-r--r-- | src/gui/windowmenu.cpp | 3 |
2 files changed, 16 insertions, 10 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; 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) |