Index: client/CBitmapHandler.cpp
===================================================================
--- client/CBitmapHandler.cpp	(revision 2684)
+++ client/CBitmapHandler.cpp	(working copy)
@@ -81,15 +81,16 @@
 		for (int i=0;i<256;i++)
 		{
 			SDL_Color tp;
-#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+/* #if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+// it is not needed, and it does result in bad colors on Big endian architectures
 			tp.b = pcx[it++];
 			tp.g = pcx[it++];
 			tp.r = pcx[it++];
-#else
+#else */
 			tp.r = pcx[it++];
 			tp.g = pcx[it++];
 			tp.b = pcx[it++];
-#endif
+//#endif
 			tp.unused = 0;
 			ret->format->palette->colors[i] = tp;
 		}
Index: client/UIFramework/SDL_Extensions.h
===================================================================
--- client/UIFramework/SDL_Extensions.h	(revision 2684)
+++ client/UIFramework/SDL_Extensions.h	(working copy)
@@ -206,6 +206,9 @@
 template<int bpp, int incrementPtr>
 STRONG_INLINE void ColorPutter<bpp, incrementPtr>::PutColorAlphaSwitch(Uint8 *&ptr, const Uint8 & R, const Uint8 & G, const Uint8 & B, const Uint8 & A)
 {
+	Uint *ptr2 = ptr;
+	if (bpp == 4)
+		ptr2++;
 	switch (A)
 	{
 	case 255:
@@ -215,9 +218,9 @@
 		PutColor(ptr, R, G, B);
 		return;
 	case 128:  // optimized
-		PutColor(ptr,	((Uint16)R + (Uint16)ptr[2]) >> 1,
-			((Uint16)G + (Uint16)ptr[1]) >> 1,
-			((Uint16)B + (Uint16)ptr[0]) >> 1);
+		PutColor(ptr,	((Uint16)R + (Uint16)ptr2[1]) >> 1,
+			((Uint16)G + (Uint16)ptr2[2]) >> 1,
+			((Uint16)B + (Uint16)ptr2[3]) >> 1);
 		return;
 	default:
 		PutColor(ptr, R, G, B, A);
@@ -228,38 +231,44 @@
 template<int bpp, int incrementPtr>
 STRONG_INLINE void ColorPutter<bpp, incrementPtr>::PutColor(Uint8 *&ptr, const Uint8 & R, const Uint8 & G, const Uint8 & B, const Uint8 & A)
 {
-	PutColor(ptr, ((((Uint32)ptr[2]-(Uint32)R)*(Uint32)A) >> 8 ) + (Uint32)R,
-				  ((((Uint32)ptr[1]-(Uint32)G)*(Uint32)A) >> 8 ) + (Uint32)G,
-				  ((((Uint32)ptr[0]-(Uint32)B)*(Uint32)A) >> 8 ) + (Uint32)B);
+	Uint *ptr2 = ptr;
+	if (bpp == 4)
+		ptr2++;
+	PutColor(ptr, ((((Uint32)ptr2[1]-(Uint32)R)*(Uint32)A) >> 8 ) + (Uint32)R,
+				  ((((Uint32)ptr2[2]-(Uint32)G)*(Uint32)A) >> 8 ) + (Uint32)G,
+				  ((((Uint32)ptr2[3]-(Uint32)B)*(Uint32)A) >> 8 ) + (Uint32)B);
 }
 
-
 template<int bpp, int incrementPtr>
 STRONG_INLINE void ColorPutter<bpp, incrementPtr>::PutColor(Uint8 *&ptr, const Uint8 & R, const Uint8 & G, const Uint8 & B)
 {
 	if(incrementPtr == 0)
 	{
-		ptr[0] = B;
-		ptr[1] = G;
-		ptr[2] = R;
+		Uint8 *ptr2 = ptr;
+		if(bpp == 4)
+			*ptr2++ = 0;
+
+		ptr2[0] = R;
+		ptr2[1] = G;
+		ptr2[2] = B;
 	}
 	else if(incrementPtr == 1)
 	{
-		*ptr++ = B;
-		*ptr++ = G;
-		*ptr++ = R;
-
 		if(bpp == 4)
 			*ptr++ = 0;
+
+		*ptr++ = R;
+		*ptr++ = G;
+		*ptr++ = B;
 	}
 	else if(incrementPtr == -1)
 	{
+		*(--ptr) = B;
+		*(--ptr) = G;
+		*(--ptr) = R;
+
 		if(bpp == 4)
 			*(--ptr) = 0;
-
-		*(--ptr) = R;
-		*(--ptr) = G;
-		*(--ptr) = B;
 	}
 	else
 	{
@@ -270,7 +279,7 @@
 template<int bpp, int incrementPtr>
 STRONG_INLINE void ColorPutter<bpp, incrementPtr>::PutColorRow(Uint8 *&ptr, const SDL_Color & Color, size_t count)
 {
-	Uint32 pixel = ((Uint32)Color.b << 0 ) + ((Uint32)Color.g << 8) + ((Uint32)Color.r << 16);
+	Uint32 pixel = ((Uint32)Color.b << 16 ) + ((Uint32)Color.g << 8) + ((Uint32)Color.r << 0);
 
 	for (size_t i=0; i<count; i++)
 	{
@@ -359,4 +368,4 @@
 		if(incrementPtr == 1)
 			ptr += 2;
 	}
-}
\ No newline at end of file
+}
Index: client/UIFramework/SDL_Extensions.cpp
===================================================================
--- client/UIFramework/SDL_Extensions.cpp	(revision 2684)
+++ client/UIFramework/SDL_Extensions.cpp	(working copy)
@@ -822,11 +822,11 @@
 {
 	Uint32 ret = 0;
 	ret+=color->unused;
-	ret<<=8; //*=256
+	ret<<=8; // *=256
 	ret+=color->b;
-	ret<<=8; //*=256
+	ret<<=8; // *=256
 	ret+=color->g;
-	ret<<=8; //*=256
+	ret<<=8; // *=256
 	ret+=color->r;
 	return ret;
 }
@@ -984,9 +984,9 @@
 	Uint8 *p = getPxPtr(ekran, x, y);
 	getPutterFor(ekran, false)(p, R, G, B);
 
-	//needed?
-	if(ekran->format->BytesPerPixel==4)
-		p[3] = A;
+	// it is not needed, and it does result in bad colors on Big endian architectures
+	/* if(ekran->format->BytesPerPixel==4)
+		p[3] = A; */
 }
 
 void CSDL_Ext::SDL_PutPixelWithoutRefreshIfInSurf(SDL_Surface *ekran, const int & x, const int & y, const Uint8 & R, const Uint8 & G, const Uint8 & B, Uint8 A /*= 255*/)
