aboutsummaryrefslogtreecommitdiff
path: root/graphics/colormasks.h
diff options
context:
space:
mode:
authorAndre Heider2009-08-30 16:57:21 +0000
committerAndre Heider2009-08-30 16:57:21 +0000
commit78cbed0cc8748bcefaf891d24bb80e1797bf9d7f (patch)
tree56d628c9477ce8a578258f5228388cbd7376ae23 /graphics/colormasks.h
parent18c43c1d901405b55eb43bdbb9bdca4719828663 (diff)
downloadscummvm-rg350-78cbed0cc8748bcefaf891d24bb80e1797bf9d7f.tar.gz
scummvm-rg350-78cbed0cc8748bcefaf891d24bb80e1797bf9d7f.tar.bz2
scummvm-rg350-78cbed0cc8748bcefaf891d24bb80e1797bf9d7f.zip
Added the ColorMask ARGB3444 for Gamecube/Wii
svn-id: r43828
Diffstat (limited to 'graphics/colormasks.h')
-rw-r--r--graphics/colormasks.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics/colormasks.h b/graphics/colormasks.h
index 3b5a84a03e..c8f21d3564 100644
--- a/graphics/colormasks.h
+++ b/graphics/colormasks.h
@@ -238,6 +238,33 @@ struct ColorMasks<8888> {
};
};
+#ifdef __WII__
+/* Gamecube/Wii specific ColorMask ARGB3444 */
+template<>
+struct ColorMasks<3444> {
+ enum {
+ kBytesPerPixel = 2,
+
+ kAlphaBits = 3,
+ kRedBits = 4,
+ kGreenBits = 4,
+ kBlueBits = 4,
+
+ kBlueShift = 0,
+ kGreenShift = kBlueBits,
+ kRedShift = kGreenBits+kBlueBits,
+ kAlphaShift = kGreenBits+kBlueBits+kRedBits,
+
+ kAlphaMask = ((1 << kAlphaBits) - 1) << kAlphaShift,
+ kRedMask = ((1 << kRedBits) - 1) << kRedShift,
+ kGreenMask = ((1 << kGreenBits) - 1) << kGreenShift,
+ kBlueMask = ((1 << kBlueBits) - 1) << kBlueShift,
+
+ kRedBlueMask = kRedMask | kBlueMask
+ };
+};
+#endif
+
template<class T>
uint32 RGBToColor(uint8 r, uint8 g, uint8 b) {
return T::kAlphaMask |