From 3d469682fc26831a11f702b3179a167f5bc23d26 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 12 Oct 2012 00:45:53 +0200 Subject: [PATCH] GRAPHICS: Add a PixelType to ColorMasks. This PixelType is the underlying type (uint16/uint32) of a pixel specified by ColorMasks. --- graphics/colormasks.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/graphics/colormasks.h b/graphics/colormasks.h index 41d73b40146..27e6b167eae 100644 --- a/graphics/colormasks.h +++ b/graphics/colormasks.h @@ -96,6 +96,8 @@ struct ColorMasks<565> { kLow2Bits = (3 << kRedShift) | (3 << kGreenShift) | (3 << kBlueShift), kLow3Bits = (7 << kRedShift) | (7 << kGreenShift) | (7 << kBlueShift) }; + + typedef uint16 PixelType; }; template<> @@ -138,6 +140,8 @@ struct ColorMasks<555> { kLow2Bits = (3 << kRedShift) | (3 << kGreenShift) | (3 << kBlueShift), kLow3Bits = (7 << kRedShift) | (7 << kGreenShift) | (7 << kBlueShift) }; + + typedef uint16 PixelType; }; template<> @@ -162,6 +166,8 @@ struct ColorMasks<1555> { kRedBlueMask = kRedMask | kBlueMask }; + + typedef uint16 PixelType; }; template<> @@ -186,6 +192,8 @@ struct ColorMasks<5551> { kRedBlueMask = kRedMask | kBlueMask }; + + typedef uint16 PixelType; }; template<> @@ -217,6 +225,8 @@ struct ColorMasks<4444> { kRedBlueMask = kRedMask | kBlueMask }; + + typedef uint16 PixelType; }; template<> @@ -252,6 +262,8 @@ struct ColorMasks<888> { qlowBits = kLow2Bits, qhighBits = (~kLowBits) & (kRedMask | kBlueMask | kGreenMask) }; + + typedef uint32 PixelType; }; template<> @@ -286,6 +298,8 @@ struct ColorMasks<8888> { qlowBits = kLow2Bits, qhighBits = ~kLow2Bits }; + + typedef uint32 PixelType; }; #ifdef __WII__ @@ -312,6 +326,8 @@ struct ColorMasks<3444> { kRedBlueMask = kRedMask | kBlueMask }; + + typedef uint16 PixelType; }; #endif