aboutsummaryrefslogtreecommitdiff
path: root/graphics/pixelformat.h
diff options
context:
space:
mode:
authorJody Northup2009-06-09 07:55:43 +0000
committerJody Northup2009-06-09 07:55:43 +0000
commitc426dd99a4c4149418fa16996e38f0995ddcaea5 (patch)
tree8809c1cd7e6ee72546d4eac83854e84da079fc42 /graphics/pixelformat.h
parentd3ede78c9a51b46fdfebf907988d13cc410af7ee (diff)
downloadscummvm-rg350-c426dd99a4c4149418fa16996e38f0995ddcaea5.tar.gz
scummvm-rg350-c426dd99a4c4149418fa16996e38f0995ddcaea5.tar.bz2
scummvm-rg350-c426dd99a4c4149418fa16996e38f0995ddcaea5.zip
Laying the foundation for preliminary bitdepth negotiation. (No functionality changes yet)
svn-id: r41396
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r--graphics/pixelformat.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index f59650e5cc..2e8c065414 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -30,6 +30,66 @@
namespace Graphics {
+#ifdef ENABLE_16BIT
+/**
+ * A condensed bit format description.
+ *
+ * It includes the necessary information to create a PixelFormat and/or
+ * ColorMask which fully describe the given color format.
+ *
+ * It contains two components, the format (8Bit paletted, RGB555, etc)
+ * and the order (palette, ARGB, ABGR, etc)
+ *
+ * Use (format & kFormatTypeMask) to get the type, and (format & kFormatOrderMask)
+ * to get the applicable color order.
+ */
+enum ColorFormat {
+ kFormat8Bit = 0,
+ kFormatRGB555 = 1,
+ kFormatARGB1555 = 2, // Rare, but I know a guy who knows a guy who's heard of it being used
+ kFormatRGB556 = 3, // 6 bits for blue, in case this ever happens
+ kFormatRGB565 = 4,
+ kFormatRGB655 = 5, // 6 bits for red, in case this ever happens
+ kFormatARGB4444 = 6,
+ kFormatRGB888 = 7,
+ kFormatARGB6666 = 8, // I've never heard of this, but it's theoretically possible
+ kFormatARGB8888 = 9,
+ kFormatTypeMask = 0xFF, // & by this to get the overall bit format
+ kFormatPalette = 0 << 8,
+ kFormatRGB = 1 << 8,
+ kFormatRBG = 2 << 8,
+ kFormatGRB = 3 << 8,
+ kFormatGBR = 4 << 8,
+ kFormatBRG = 5 << 8,
+ kFormatBGR = 6 << 8,
+ kFormatARGB = 7 << 8,
+ kFormatARBG = 8 << 8,
+ kFormatAGRB = 9 << 8,
+ kFormatAGBR = 10 << 8,
+ kFormatABRG = 11 << 8,
+ kFormatABGR = 12 << 8,
+ kFormatRAGB = 13 << 8,
+ kFormatRABG = 14 << 8,
+ kFormatGARB = 15 << 8,
+ kFormatGABR = 16 << 8,
+ kFormatBARG = 17 << 8,
+ kFormatBAGR = 18 << 8,
+ kFormatRGAB = 19 << 8,
+ kFormatRBAG = 20 << 8,
+ kFormatGRAB = 21 << 8,
+ kFormatGBAR = 22 << 8,
+ kFormatBRAG = 23 << 8,
+ kFormatBGAR = 24 << 8,
+ kFormatRGBA = 25 << 8,
+ kFormatRBGA = 26 << 8,
+ kFormatGRBA = 27 << 8,
+ kFormatGBRA = 28 << 8,
+ kFormatBRGA = 29 << 8,
+ kFormatBGRA = 30 << 8,
+ kFormatOrderMask = 0xFF << 8 // & by this to get the order
+};
+#endif
+
/**
* A pixel format description.
*