aboutsummaryrefslogtreecommitdiff
path: root/graphics/transparent_surface.h
diff options
context:
space:
mode:
authorEugene Sandulenko2014-06-21 11:53:14 +0300
committerEugene Sandulenko2014-06-23 15:39:31 +0300
commit89d789b122ebc362d4a4dce2bd1099904f13d78b (patch)
treeabbe7c9182f62680b65eb8cdd139e068d433945b /graphics/transparent_surface.h
parent2d9d23adde3505946aab61d187c91f04b69c7583 (diff)
downloadscummvm-rg350-89d789b122ebc362d4a4dce2bd1099904f13d78b.tar.gz
scummvm-rg350-89d789b122ebc362d4a4dce2bd1099904f13d78b.tar.bz2
scummvm-rg350-89d789b122ebc362d4a4dce2bd1099904f13d78b.zip
GRAPHICS: Added BE/LE to TS_ macros
Diffstat (limited to 'graphics/transparent_surface.h')
-rw-r--r--graphics/transparent_surface.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/graphics/transparent_surface.h b/graphics/transparent_surface.h
index ca26b2679a..efb28149a5 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 {