Browse Source

client: remove SDL_BYTEORDER usage

Make use of CMake endian checking in this places too.
Konstantin 2 years ago
parent
commit
88ef83db53
3 changed files with 3 additions and 3 deletions
  1. 1 1
      client/CMT.cpp
  2. 1 1
      client/render/CBitmapHandler.cpp
  3. 1 1
      client/renderSDL/SDL_PixelAccess.h

+ 1 - 1
client/CMT.cpp

@@ -839,7 +839,7 @@ static bool recreateWindow(int w, int h, int bpp, bool fullscreen, int displayIn
 	}
 	}
 
 
 
 
-	#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+	#ifdef VCMI_ENDIAN_BIG
 		int bmask = 0xff000000;
 		int bmask = 0xff000000;
 		int gmask = 0x00ff0000;
 		int gmask = 0x00ff0000;
 		int rmask = 0x0000ff00;
 		int rmask = 0x0000ff00;

+ 1 - 1
client/render/CBitmapHandler.cpp

@@ -81,7 +81,7 @@ SDL_Surface * BitmapHandler::loadH3PCX(ui8 * pcx, size_t size)
 	}
 	}
 	else
 	else
 	{
 	{
-#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+#ifdef VCMI_ENDIAN_BIG
 		int bmask = 0xff0000;
 		int bmask = 0xff0000;
 		int gmask = 0x00ff00;
 		int gmask = 0x00ff00;
 		int rmask = 0x0000ff;
 		int rmask = 0x0000ff;

+ 1 - 1
client/renderSDL/SDL_PixelAccess.h

@@ -68,7 +68,7 @@ namespace Channels
 		static channel_empty a;
 		static channel_empty a;
 	};
 	};
 
 
-#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+#ifdef VCMI_ENDIAN_BIG
 
 
 	template<>
 	template<>
 	struct px<4>
 	struct px<4>