[Scummvm-cvs-logs] SF.net SVN: scummvm:[41578] scummvm/branches/gsoc2009-16bit/graphics/ pixelformat.h
upthorn at users.sourceforge.net
upthorn at users.sourceforge.net
Tue Jun 16 07:34:12 CEST 2009
Revision: 41578
http://scummvm.svn.sourceforge.net/scummvm/?rev=41578&view=rev
Author: upthorn
Date: 2009-06-16 05:34:12 +0000 (Tue, 16 Jun 2009)
Log Message:
-----------
Simplified colormode enum
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
Modified: scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h 2009-06-16 05:33:11 UTC (rev 41577)
+++ scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h 2009-06-16 05:34:12 UTC (rev 41578)
@@ -45,14 +45,17 @@
*/
enum ColorMode {
kFormatCLUT8 = 0, //256 color palette.
+#ifdef ENABLE_16BIT
kFormatRGB555 = 1,
kFormatXRGB1555 = 2, // Special case, high bit has special purpose, which may be alpha.
// Engines should probably handle this bit internally and pass RGB only, though
kFormatRGB565 = 3,
kFormatRGBA4444 = 4, // since this mode is commonly supported in game hardware, some unimplemented engines may use it?
+#endif
+#ifdef ENABLE_32BIT
kFormatRGB888 = 5,
- kFormatRGBA6666 = 6, // I've never heard of this, but it's vaguely plausible
- kFormatRGBA8888 = 7
+ kFormatRGBA8888 = 6
+#endif
};
#endif
@@ -96,6 +99,7 @@
//TODO: Specify alpha position
explicit inline PixelFormat(ColorMode mode) {
switch (mode) {
+#ifdef ENABLE_16BIT
case kFormatRGB555:
aLoss = 8;
bytesPerPixel = 2;
@@ -124,19 +128,18 @@
bytesPerPixel = 2;
aLoss = gLoss = rLoss = bLoss = 4;
break;
+#endif
+#ifdef ENABLE_32BIT
case kFormatRGB888:
bytesPerPixel = 3;
aLoss = 8;
gLoss = rLoss = bLoss = 0;
break;
- case kFormatRGBA6666:
- bytesPerPixel = 3;
- aLoss = gLoss = rLoss = bLoss = 2;
- break;
case kFormatRGBA8888:
bytesPerPixel = 4;
aLoss = gLoss = rLoss = bLoss = 0;
break;
+#endif
case kFormatCLUT8:
default:
bytesPerPixel = 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list