diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/being/compoundsprite.cpp | 16 | ||||
-rw-r--r-- | src/eventsmanager.cpp | 8 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.cpp | 8 | ||||
-rw-r--r-- | src/render/safeopenglgraphics.cpp | 8 | ||||
-rw-r--r-- | src/resources/atlas/atlasmanager.cpp | 16 | ||||
-rw-r--r-- | src/resources/dye/dye.cpp | 4 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_replacescolor.cpp | 16 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_replacesoglcolor.cpp | 2 | ||||
-rw-r--r-- | src/resources/imagehelper.cpp | 48 | ||||
-rw-r--r-- | src/resources/mobileopenglscreenshothelper.cpp | 2 | ||||
-rw-r--r-- | src/resources/openglimagehelper.cpp | 48 | ||||
-rw-r--r-- | src/resources/safeopenglimagehelper.cpp | 48 | ||||
-rw-r--r-- | src/resources/sdlgfxblitfunc.cpp | 8 | ||||
-rw-r--r-- | src/resources/sdlimagehelper.cpp | 16 | ||||
-rw-r--r-- | src/test/testlauncher.cpp | 4 |
15 files changed, 126 insertions, 126 deletions
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp index ebb4466b3..55388c9a3 100644 --- a/src/being/compoundsprite.cpp +++ b/src/being/compoundsprite.cpp @@ -324,15 +324,15 @@ void CompoundSprite::redraw() const #ifndef USE_SDL2 #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0xff000000; - const int gmask = 0x00ff0000; - const int bmask = 0x0000ff00; - const int amask = 0x000000ff; + const uint32_t rmask = 0xff000000U; + const uint32_t gmask = 0x00ff0000U; + const uint32_t bmask = 0x0000ff00U; + const uint32_t amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0x000000ff; - const int gmask = 0x0000ff00; - const int bmask = 0x00ff0000; - const int amask = 0xff000000; + const uint32_t rmask = 0x000000ffU; + const uint32_t gmask = 0x0000ff00U; + const uint32_t bmask = 0x00ff0000U; + const uint32_t amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN SDL_Surface *const surface = MSDL_CreateRGBSurface(SDL_HWSURFACE, diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 986d9cf9e..ee9a46136 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -156,10 +156,10 @@ bool EventsManager::handleEvents() const { if (!handleCommonEvents(event)) { - switch (event.type) - { #ifdef ANDROID #ifndef USE_SDL2 + switch (event.type) + { case SDL_ACTIVEEVENT: if ((event.active.state & SDL_APPACTIVE) && !event.active.gain) @@ -169,11 +169,11 @@ bool EventsManager::handleEvents() const } break; -#endif // USE_SDL2 -#endif // ANDROID default: break; } +#endif // USE_SDL2 +#endif // ANDROID } #ifdef USE_MUMBLE diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index f9f84a030..32ce4f95a 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -416,10 +416,10 @@ void NormalOpenGLGraphics::testDraw() restrict2 { GLfloat tex[] = { - 0.0F, 0.781250f, - 0.0F, 0.781250f, - 0.0F, 0.585938f, - 0.0F, 0.585938f + 0.0F, 0.781250F, + 0.0F, 0.781250F, + 0.0F, 0.585938F, + 0.0F, 0.585938F }; GLint vert[] = diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index 03ff2cc28..04df20ec6 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -210,13 +210,13 @@ void SafeOpenGLGraphics::testDraw() restrict2 if (SafeOpenGLImageHelper::mTextureType == GL_TEXTURE_2D) { glBegin(GL_QUADS); - glTexCoord2f(0.0F, 0.781250f); + glTexCoord2f(0.0F, 0.781250F); glVertex2i(0, 0); - glTexCoord2f(0.0F, 0.781250f); + glTexCoord2f(0.0F, 0.781250F); glVertex2i(800, 0); - glTexCoord2f(0.0F, 0.585938f); + glTexCoord2f(0.0F, 0.585938F); glVertex2i(800, 600); - glTexCoord2f(0.0F, 0.585938f); + glTexCoord2f(0.0F, 0.585938F); glVertex2i(0, 600); glEnd(); } diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp index e1c847909..513f87976 100644 --- a/src/resources/atlas/atlasmanager.cpp +++ b/src/resources/atlas/atlasmanager.cpp @@ -314,16 +314,16 @@ void AtlasManager::createSDLAtlas(TextureAtlas *const atlas) { BLOCK_START("AtlasManager::createSDLAtlas") #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int rmask = 0xff000000; - const unsigned int gmask = 0x00ff0000; - const unsigned int bmask = 0x0000ff00; - const unsigned int amask = 0x000000ff; + const uint32_t rmask = 0xff000000U; + const uint32_t gmask = 0x00ff0000U; + const uint32_t bmask = 0x0000ff00U; + const uint32_t amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int rmask = 0x000000ff; - const unsigned int gmask = 0x0000ff00; - const unsigned int bmask = 0x00ff0000; - const unsigned int amask = 0xff000000; + const uint32_t rmask = 0x000000ffU; + const uint32_t gmask = 0x0000ff00U; + const uint32_t bmask = 0x00ff0000U; + const uint32_t amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN // do not create atlas based on only one image diff --git a/src/resources/dye/dye.cpp b/src/resources/dye/dye.cpp index df4d165cc..d9c766af3 100644 --- a/src/resources/dye/dye.cpp +++ b/src/resources/dye/dye.cpp @@ -232,10 +232,10 @@ void Dye::normalOGLDye(uint32_t *restrict pixels, { const uint32_t p = *pixels; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const int alpha = p & 255; + const uint32_t alpha = p & 255U; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const int alpha = p & 0xff000000; + const uint32_t alpha = p & 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN if (alpha == 0) diff --git a/src/resources/dye/dyepalette_replacescolor.cpp b/src/resources/dye/dyepalette_replacescolor.cpp index 4c987aa9d..6f0cb7d30 100644 --- a/src/resources/dye/dyepalette_replacescolor.cpp +++ b/src/resources/dye/dyepalette_replacescolor.cpp @@ -52,10 +52,10 @@ void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, { uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int data = (*pixels) & 0x00ffffff; + const unsigned int data = (*pixels) & 0x00ffffffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int data = (*pixels) & 0xffffff00; + const unsigned int data = (*pixels) & 0xffffff00U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); @@ -111,7 +111,7 @@ void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, for (int ptr = 0; ptr < bufEnd; ptr += 4) { - __m128i mask = _mm_set1_epi32(0xffffff00); + __m128i mask = _mm_set1_epi32(0xffffff00U); // __m128i base = _mm_load_si128(reinterpret_cast<__m128i*>(pixels)); __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); @@ -142,10 +142,10 @@ void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, { uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int data = pixels[ptr] & 0x00ffffff; + const unsigned int data = pixels[ptr] & 0x00ffffffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int data = pixels[ptr] & 0xffffff00; + const unsigned int data = pixels[ptr] & 0xffffff00U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); @@ -192,7 +192,7 @@ void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, for (int ptr = 0; ptr < bufEnd; ptr += 8) { - __m256i mask = _mm256_set1_epi32(0xffffff00); + __m256i mask = _mm256_set1_epi32(0xffffff00U); // __m256i base = _mm256_load_si256(reinterpret_cast<__m256i*>(pixels)); __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); @@ -223,10 +223,10 @@ void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, { uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int data = pixels[ptr] & 0x00ffffff; + const unsigned int data = pixels[ptr] & 0x00ffffffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int data = pixels[ptr] & 0xffffff00; + const unsigned int data = pixels[ptr] & 0xffffff00U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); diff --git a/src/resources/dye/dyepalette_replacesoglcolor.cpp b/src/resources/dye/dyepalette_replacesoglcolor.cpp index a23c64f1f..f4bd31dd0 100644 --- a/src/resources/dye/dyepalette_replacesoglcolor.cpp +++ b/src/resources/dye/dyepalette_replacesoglcolor.cpp @@ -238,7 +238,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { - const DyeColor &col = *it; + const DyeColor &col = *it; ++ it; const DyeColor &col2 = *it; diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index 3585e99bf..cc787f46d 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -78,16 +78,16 @@ Image *ImageHelper::load(SDL_RWops *const rw, Dye const &dye) rgba.BytesPerPixel = 4; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rgba.Rmask = 0x000000FF; - rgba.Gmask = 0x0000FF00; - rgba.Bmask = 0x00FF0000; - rgba.Amask = 0xFF000000; + rgba.Rmask = 0x000000FFU; + rgba.Gmask = 0x0000FF00U; + rgba.Bmask = 0x00FF0000U; + rgba.Amask = 0xFF000000U; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - rgba.Rmask = 0xFF000000; - rgba.Gmask = 0x00FF0000; - rgba.Bmask = 0x0000FF00; - rgba.Amask = 0x000000FF; + rgba.Rmask = 0xFF000000U; + rgba.Gmask = 0x00FF0000U; + rgba.Bmask = 0x0000FF00U; + rgba.Amask = 0x000000FFU; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN SDL_Surface *const surf = MSDL_ConvertSurface( @@ -144,30 +144,30 @@ SDL_Surface* ImageHelper::convertTo32Bit(SDL_Surface *const tmpImage) RGBAFormat.BitsPerPixel = 32; RGBAFormat.BytesPerPixel = 4; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - RGBAFormat.Rmask = 0xFF000000; + RGBAFormat.Rmask = 0xFF000000U; RGBAFormat.Rshift = 0; RGBAFormat.Rloss = 0; - RGBAFormat.Gmask = 0x00FF0000; + RGBAFormat.Gmask = 0x00FF0000U; RGBAFormat.Gshift = 8; RGBAFormat.Gloss = 0; - RGBAFormat.Bmask = 0x0000FF00; + RGBAFormat.Bmask = 0x0000FF00U; RGBAFormat.Bshift = 16; RGBAFormat.Bloss = 0; - RGBAFormat.Amask = 0x000000FF; + RGBAFormat.Amask = 0x000000FFU; RGBAFormat.Ashift = 24; RGBAFormat.Aloss = 0; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - RGBAFormat.Rmask = 0x000000FF; + RGBAFormat.Rmask = 0x000000FFU; RGBAFormat.Rshift = 24; RGBAFormat.Rloss = 0; - RGBAFormat.Gmask = 0x0000FF00; + RGBAFormat.Gmask = 0x0000FF00U; RGBAFormat.Gshift = 16; RGBAFormat.Gloss = 0; - RGBAFormat.Bmask = 0x00FF0000; + RGBAFormat.Bmask = 0x00FF0000U; RGBAFormat.Bshift = 8; RGBAFormat.Bloss = 0; - RGBAFormat.Amask = 0xFF000000; + RGBAFormat.Amask = 0xFF000000U; RGBAFormat.Ashift = 0; RGBAFormat.Aloss = 0; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN @@ -239,16 +239,16 @@ SDL_Surface *ImageHelper::create32BitSurface(int width, int height) const { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0xff000000; - const int gmask = 0x00ff0000; - const int bmask = 0x0000ff00; - const int amask = 0x000000ff; + const uint32_t rmask = 0xff000000U; + const uint32_t gmask = 0x00ff0000U; + const uint32_t bmask = 0x0000ff00U; + const uint32_t amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0x000000ff; - const int gmask = 0x0000ff00; - const int bmask = 0x00ff0000; - const int amask = 0xff000000; + const uint32_t rmask = 0x000000ffU; + const uint32_t gmask = 0x0000ff00U; + const uint32_t bmask = 0x00ff0000U; + const uint32_t amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN return MSDL_CreateRGBSurface(SDL_SWSURFACE, diff --git a/src/resources/mobileopenglscreenshothelper.cpp b/src/resources/mobileopenglscreenshothelper.cpp index e726a723b..76a41c949 100644 --- a/src/resources/mobileopenglscreenshothelper.cpp +++ b/src/resources/mobileopenglscreenshothelper.cpp @@ -62,7 +62,7 @@ SDL_Surface *MobileOpenGLScreenshotHelper::getScreenshot() SDL_Surface *const tmpImage = MSDL_CreateRGBSurface( SDL_SWSURFACE, w, h, 32, - 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000); + 0x00ff0000U, 0x0000ff00U, 0x000000ffU, 0xff000000U); if (tmpImage == nullptr) return nullptr; diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index ff3a2e4f3..81ef529fd 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -162,16 +162,16 @@ SDL_Surface *OpenGLImageHelper::convertSurfaceNormalize(SDL_Surface *tmpImage, // Determine 32-bit masks based on byte order uint32_t rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; - gmask = 0x00ff0000; - bmask = 0x0000ff00; - amask = 0x000000ff; + rmask = 0xff000000U; + gmask = 0x00ff0000U; + bmask = 0x0000ff00U; + amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0x000000ff; - gmask = 0x0000ff00; - bmask = 0x00ff0000; - amask = 0xff000000; + rmask = 0x000000ffU; + gmask = 0x0000ff00U; + bmask = 0x00ff0000U; + amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN if (tmpImage->format->BitsPerPixel != 32 @@ -215,16 +215,16 @@ SDL_Surface *OpenGLImageHelper::convertSurface(SDL_Surface *tmpImage, // Determine 32-bit masks based on byte order uint32_t rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; - gmask = 0x00ff0000; - bmask = 0x0000ff00; - amask = 0x000000ff; + rmask = 0xff000000U; + gmask = 0x00ff0000U; + bmask = 0x0000ff00U; + amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0x000000ff; - gmask = 0x0000ff00; - bmask = 0x00ff0000; - amask = 0xff000000; + rmask = 0x000000ffU; + gmask = 0x0000ff00U; + bmask = 0x00ff0000U; + amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN if (tmpImage->format->BitsPerPixel != 32 @@ -442,16 +442,16 @@ SDL_Surface *OpenGLImageHelper::create32BitSurface(int width, int height) const { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0xff000000; - const int gmask = 0x00ff0000; - const int bmask = 0x0000ff00; - const int amask = 0x000000ff; + const uint32_t rmask = 0xff000000U; + const uint32_t gmask = 0x00ff0000U; + const uint32_t bmask = 0x0000ff00U; + const uint32_t amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0x000000ff; - const int gmask = 0x0000ff00; - const int bmask = 0x00ff0000; - const int amask = 0xff000000; + const uint32_t rmask = 0x000000ffU; + const uint32_t gmask = 0x0000ff00U; + const uint32_t bmask = 0x00ff0000U; + const uint32_t amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN width = powerOfTwo(width); diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp index 70b2c31a1..e80f4de9c 100644 --- a/src/resources/safeopenglimagehelper.cpp +++ b/src/resources/safeopenglimagehelper.cpp @@ -162,16 +162,16 @@ SDL_Surface *SafeOpenGLImageHelper::convertSurfaceNormalize(SDL_Surface // Determine 32-bit masks based on byte order uint32_t rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; - gmask = 0x00ff0000; - bmask = 0x0000ff00; - amask = 0x000000ff; + rmask = 0xff000000U; + gmask = 0x00ff0000U; + bmask = 0x0000ff00U; + amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0x000000ff; - gmask = 0x0000ff00; - bmask = 0x00ff0000; - amask = 0xff000000; + rmask = 0x000000ffU; + gmask = 0x0000ff00U; + bmask = 0x00ff0000U; + amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN if (tmpImage->format->BitsPerPixel != 32 @@ -216,16 +216,16 @@ SDL_Surface *SafeOpenGLImageHelper::convertSurface(SDL_Surface *tmpImage, // Determine 32-bit masks based on byte order uint32_t rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; - gmask = 0x00ff0000; - bmask = 0x0000ff00; - amask = 0x000000ff; + rmask = 0xff000000U; + gmask = 0x00ff0000U; + bmask = 0x0000ff00U; + amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0x000000ff; - gmask = 0x0000ff00; - bmask = 0x00ff0000; - amask = 0xff000000; + rmask = 0x000000ffU; + gmask = 0x0000ff00U; + bmask = 0x00ff0000U; + amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN if (tmpImage->format->BitsPerPixel != 32 @@ -417,16 +417,16 @@ SDL_Surface *SafeOpenGLImageHelper::create32BitSurface(int width, int height) const { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0xff000000; - const int gmask = 0x00ff0000; - const int bmask = 0x0000ff00; - const int amask = 0x000000ff; + const uint32_t rmask = 0xff000000U; + const uint32_t gmask = 0x00ff0000U; + const uint32_t bmask = 0x0000ff00U; + const uint32_t amask = 0x000000ffU; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0x000000ff; - const int gmask = 0x0000ff00; - const int bmask = 0x00ff0000; - const int amask = 0xff000000; + const uint32_t rmask = 0x000000ffU; + const uint32_t gmask = 0x0000ff00U; + const uint32_t bmask = 0x00ff0000U; + const uint32_t amask = 0xff000000U; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN width = powerOfTwo(width); diff --git a/src/resources/sdlgfxblitfunc.cpp b/src/resources/sdlgfxblitfunc.cpp index fa74c82c3..7151d21bf 100644 --- a/src/resources/sdlgfxblitfunc.cpp +++ b/src/resources/sdlgfxblitfunc.cpp @@ -365,10 +365,10 @@ static void _SDL_gfxBlitBlitterRGBA(const SDL_gfxBlitInfo *const info) sA = ((pixel & srcfmt->Amask) >> srcfmt->Ashift); pixel = *(reinterpret_cast<uint32_t *>(dst)); - dR = pixel & 0xff; - dG = ((pixel & 0xff00) >> 8); - dB = ((pixel & 0xff0000) >> 16); - dA = ((pixel & 0xff000000) >> 24); + dR = pixel & 0xffU; + dG = ((pixel & 0xff00U) >> 8); + dB = ((pixel & 0xff0000U) >> 16); + dA = ((pixel & 0xff000000U) >> 24); sAA = GFX_ALPHA_ADJUST_ARRAY[sA & 255]; dR = (((sR - dR) * (sAA)) / 255) + dR; diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index 0ed5c9f52..e9db78e9e 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -73,23 +73,23 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) rgba.Aloss = 0; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rgba.Rmask = 0x000000FF; + rgba.Rmask = 0x000000FFU; rgba.Rshift = 24; - rgba.Gmask = 0x0000FF00; + rgba.Gmask = 0x0000FF00U; rgba.Gshift = 16; - rgba.Bmask = 0x00FF0000; + rgba.Bmask = 0x00FF0000U; rgba.Bshift = 8; - rgba.Amask = 0xFF000000; + rgba.Amask = 0xFF000000U; rgba.Ashift = 0; #else // SDL_BYTEORDER == SDL_BIG_ENDIAN - rgba.Rmask = 0xFF000000; + rgba.Rmask = 0xFF000000U; rgba.Rshift = 0; - rgba.Gmask = 0x00FF0000; + rgba.Gmask = 0x00FF0000U; rgba.Gshift = 8; - rgba.Bmask = 0x0000FF00; + rgba.Bmask = 0x0000FF00U; rgba.Bshift = 16; - rgba.Amask = 0x000000FF; + rgba.Amask = 0x000000FFU; rgba.Ashift = 24; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 2e886b2c9..cea9e3274 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -751,7 +751,7 @@ int TestLauncher::testDraw() mainGraphics->drawRectangle(Rect(0, 0, 400, 200)); mainGraphics->setColor(Color(0xFFU, 0x00U, 0x00U, 0xB0U)); - img[0]->setAlpha(0.5f); + img[0]->setAlpha(0.5F); mainGraphics->drawImage(img[0], 190, 383); img[0]->setAlpha(1.0F); @@ -791,7 +791,7 @@ int TestLauncher::testDraw() mainGraphics->drawTileCollection(col); - img[0]->setAlpha(0.3f); + img[0]->setAlpha(0.3F); mainGraphics->drawRescaledPattern(img[0], 250, 150, 250, 300, 30, 100); for (int f = 0; f < 255; f ++) |