[Scummvm-cvs-logs] SF.net SVN: scummvm:[41541] scummvm/branches/gsoc2009-16bit/graphics

sev at users.sourceforge.net sev at users.sourceforge.net
Mon Jun 15 13:35:52 CEST 2009


Revision: 41541
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41541&view=rev
Author:   sev
Date:     2009-06-15 11:35:51 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
Remove uglyness with PixelFormat initialization.

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
    scummvm/branches/gsoc2009-16bit/graphics/scaler.cpp

Modified: scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-06-15 10:10:22 UTC (rev 41540)
+++ scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-06-15 11:35:51 UTC (rev 41541)
@@ -76,7 +76,6 @@
 	byte rLoss, gLoss, bLoss, aLoss; /**< Precision loss of each color component. */
 	byte rShift, gShift, bShift, aShift; /**< Binary left shift of each color component in the pixel value. */
 
-#ifdef ENABLE_16BIT
 	inline PixelFormat() {
 		bytesPerPixel = 
 		rLoss = gLoss = bLoss = aLoss = 
@@ -91,6 +90,7 @@
 		rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
 	}
 
+#ifdef ENABLE_16BIT
 	//Convenience constructor from enum type
 	//TODO: BGR support
 	//TODO: Specify alpha position

Modified: scummvm/branches/gsoc2009-16bit/graphics/scaler.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/scaler.cpp	2009-06-15 10:10:22 UTC (rev 41540)
+++ scummvm/branches/gsoc2009-16bit/graphics/scaler.cpp	2009-06-15 11:35:51 UTC (rev 41541)
@@ -30,34 +30,19 @@
 
 int gBitFormat = 565;
 
-#ifdef ENABLE_16BIT
 static const Graphics::PixelFormat gPixelFormat555(
-#else
-static const Graphics::PixelFormat gPixelFormat555 = {
-#endif
 	2,
 	3, 3, 3, 8,
 	10, 5, 0, 0
-#ifdef ENABLE_16BIT
 	);
 
 static const Graphics::PixelFormat gPixelFormat565(
-#else
-	};
-
-static const Graphics::PixelFormat gPixelFormat565 = {
-#endif
 	2,
 	3, 2, 3, 8,
 	11, 5, 0, 0
-#ifdef ENABLE_16BIT
 	);
-#else
-	};
-#endif
 
 
-
 #ifndef DISABLE_HQ_SCALERS
 // RGB-to-YUV lookup table
 extern "C" {


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