From 5612fb3a7f20a9385ba786bb25d25081b86259dd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 4 Jun 2017 03:18:46 +0300 Subject: Fix code style. --- src/resources/sdlimagehelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources/sdlimagehelper.cpp') diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index 3c1653ca4..afb81d170 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -145,7 +145,7 @@ Image *SDLImageHelper::createTextSurface(SDL_Surface *const tmpImage, uint32_t c = (static_cast(tmpImage->pixels))[i]; const unsigned v = (c & fmt->Amask) >> fmt->Ashift; - const uint8_t a = static_cast((v << fmt->Aloss) + const uint8_t a = static_cast((v << fmt->Aloss) + (v >> (8 - (fmt->Aloss << 1)))); const uint8_t a2 = CAST_U8( @@ -235,7 +235,7 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage) cilk_for (size_t i = 0; i < sz; ++ i) { const unsigned v = (pixels[i] & amask) >> ashift; - const uint8_t a = static_cast((v << aloss) + const uint8_t a = static_cast((v << aloss) + (v >> (8 - (aloss << 1)))); if (a != 255) -- cgit v1.2.3-60-g2f50