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

upthorn at users.sourceforge.net upthorn at users.sourceforge.net
Wed Jul 1 08:33:50 CEST 2009


Revision: 41986
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41986&view=rev
Author:   upthorn
Date:     2009-07-01 06:33:50 +0000 (Wed, 01 Jul 2009)

Log Message:
-----------
Implemented Graphics::PixelFormat Graphics::findCompatibleFormat(Common::List<Graphics::PixelFormat> backend, Common::List<Graphics::PixelFormat> frontend)

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-07-01 04:06:13 UTC (rev 41985)
+++ scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-07-01 06:33:50 UTC (rev 41986)
@@ -27,6 +27,7 @@
 #define GRAPHICS_PIXELFORMAT_H
 
 #include "common/scummsys.h"
+#include "common/list.h"
 
 namespace Graphics {
 
@@ -199,6 +200,17 @@
 		return (1 << aBits()) - 1;
 	}
 };
+inline PixelFormat findCompatibleFormat(Common::List<PixelFormat> backend, Common::List<PixelFormat> frontend) {
+#ifdef ENABLE_RGB_COLOR
+	for (Common::List<PixelFormat>::iterator i = backend.begin(); i != backend.end(); ++i) {
+		for (Common::List<PixelFormat>::iterator j = frontend.begin(); j != frontend.end(); ++j) {
+			if (*i == *j)
+				return *i;
+		}
+	}
+#endif
+	return PixelFormat::createFormatCLUT8();
+};
 
 } // end of namespace Graphics
 


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