From 89d789b122ebc362d4a4dce2bd1099904f13d78b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 21 Jun 2014 11:53:14 +0300 Subject: [PATCH] GRAPHICS: Added BE/LE to TS_ macros --- graphics/transparent_surface.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/graphics/transparent_surface.h b/graphics/transparent_surface.h index ca26b2679ab9..efb28149a587 100644 --- a/graphics/transparent_surface.h +++ b/graphics/transparent_surface.h @@ -35,9 +35,13 @@ * */ -// TODO: Find a better solution for this. -#define TS_RGB(R,G,B) (((R) << 24) | ((G) << 16) | (B << 8) | (A) +#ifdef SCUMM_LITTLE_ENDIAN +#define TS_RGB(R,G,B) ((0xff << 24) | ((R) << 16) | ((G) << 8) | (B)) #define TS_ARGB(A,R,G,B) (((R) << 24) | ((G) << 16) | ((B) << 8) | (A)) +#else +#define TS_RGB(R,G,B) (((R) << 24) | ((G) << 16) | (B << 8) | 0xff) +#define TS_ARGB(A,R,G,B) (((R) << 24) | ((G) << 16) | ((B) << 8) | (A)) +#endif namespace Graphics {