aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-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 {