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

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Tue Jun 30 10:25:08 CEST 2009


Revision: 41973
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41973&view=rev
Author:   jvprat
Date:     2009-06-30 08:25:08 +0000 (Tue, 30 Jun 2009)

Log Message:
-----------
Fixed a few formatting bits

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/engines/engine.cpp
    scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp
    scummvm/branches/gsoc2009-16bit/graphics/cursorman.h
    scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h

Modified: scummvm/branches/gsoc2009-16bit/engines/engine.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/engine.cpp	2009-06-30 07:30:57 UTC (rev 41972)
+++ scummvm/branches/gsoc2009-16bit/engines/engine.cpp	2009-06-30 08:25:08 UTC (rev 41973)
@@ -124,6 +124,7 @@
 	if (gameDomain && gameDomain->contains("fullscreen"))
 		g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
 }
+
 void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format) {
 
 	g_system->beginGFXTransaction();

Modified: scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp	2009-06-30 07:30:57 UTC (rev 41972)
+++ scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp	2009-06-30 08:25:08 UTC (rev 41973)
@@ -113,7 +113,8 @@
 	uint size;
 	if (!format)
 		size = w * h;
-	else size = w * h * format->bytesPerPixel;
+	else
+		size = w * h * format->bytesPerPixel;
 #else
 	uint size = w * h;
 #endif

Modified: scummvm/branches/gsoc2009-16bit/graphics/cursorman.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/cursorman.h	2009-06-30 07:30:57 UTC (rev 41972)
+++ scummvm/branches/gsoc2009-16bit/graphics/cursorman.h	2009-06-30 08:25:08 UTC (rev 41973)
@@ -154,13 +154,10 @@
 		uint _size;
 		Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, const Graphics::PixelFormat *format = NULL) {
 #ifdef ENABLE_RGB_COLOR
-			if (!format)
-			{
+			if (!format) {
 				_size = w * h;
 				_keycolor &= 0xFF;
-			}
-			else
-			{
+			} else {
 				_size = w * h * format->bytesPerPixel;
 				_keycolor &= ((1 << (format->bytesPerPixel << 3)) - 1);
 			}

Modified: scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-06-30 07:30:57 UTC (rev 41972)
+++ scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-06-30 08:25:08 UTC (rev 41973)
@@ -64,66 +64,66 @@
 		rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
 	}
 
-	//"Factory" methods for convenience
+	// "Factory" methods for convenience
 	static inline PixelFormat createFormatCLUT8() { 
-		return PixelFormat(1,8,8,8,8,0,0,0,0);
+		return PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
 	}
 #ifdef ENABLE_RGB_COLOR
-	//2 Bytes-per-pixel modes
+	// 2 Bytes-per-pixel modes
 	static inline PixelFormat createFormatRGB555() {
-		return PixelFormat(2,3,3,3,8,10,5,0,0);
+		return PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0);
 	}
 	static inline PixelFormat createFormatBGR555() {
-		return PixelFormat(2,3,3,3,8,0,5,10,0);
+		return PixelFormat(2, 3, 3, 3, 8, 0, 5, 10, 0);
 	}
 	static inline PixelFormat createFormatXRGB1555() {
-		//Special case, alpha bit is always high in this mode.
-		return PixelFormat(2,3,3,3,7,10,5,0,15);
+		// Special case, alpha bit is always high in this mode.
+		return PixelFormat(2, 3, 3, 3, 7, 10, 5, 0, 15);
 	}
 	static inline PixelFormat createFormatXBGR1555() {
-		//Special case, alpha bit is always high in this mode.
-		return PixelFormat(2,3,3,3,7,0,5,10,15);
+		// Special case, alpha bit is always high in this mode.
+		return PixelFormat(2, 3, 3, 3, 7, 0, 5, 10, 15);
 	}
 	static inline PixelFormat createFormatRGB565() {
-		return PixelFormat(2,3,2,3,8,11,5,0,0);
+		return PixelFormat(2, 3, 2, 3, 8, 11, 5, 0, 0);
 	}
 	static inline PixelFormat createFormatBGR565() {
-		return PixelFormat(2,3,2,3,8,0,5,11,0);
+		return PixelFormat(2, 3, 2, 3, 8, 0, 5, 11, 0);
 	}
 	static inline PixelFormat createFormatRGBA4444() {
-		return PixelFormat(2,4,4,4,4,12,8,4,0);
+		return PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0);
 	}
 	static inline PixelFormat createFormatARGB4444() {
-		return PixelFormat(2,4,4,4,4,8,4,0,12);
+		return PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12);
 	}
 	static inline PixelFormat createFormatABGR4444() {
-		return PixelFormat(2,4,4,4,4,0,4,8,12);
+		return PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12);
 	}
 	static inline PixelFormat createFormatBGRA4444() {
-		return PixelFormat(2,4,4,4,4,4,8,12,0);
+		return PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0);
 	}
 #ifdef ENABLE_32BIT
-	//3 to 4 byte per pixel modes
+	// 3 to 4 byte per pixel modes
 	static inline PixelFormat createFormatRGB888() {
-		return PixelFormat(3,0,0,0,8,16,8,0,0);
+		return PixelFormat(3, 0, 0, 0, 8, 16, 8, 0, 0);
 	}
 	static inline PixelFormat createFormatBGR888() {
-		return PixelFormat(3,0,0,0,8,0,8,16,0);
+		return PixelFormat(3, 0, 0, 0, 8, 0, 8, 16, 0);
 	}
 	static inline PixelFormat createFormatRGBA8888() {
-		return PixelFormat(4,0,0,0,0,24,16,8,0);
+		return PixelFormat(4, 0, 0, 0, 0, 24, 16, 8, 0);
 	}
 	static inline PixelFormat createFormatARGB8888() {
-		return PixelFormat(4,0,0,0,0,16,8,0,24);
+		return PixelFormat(4, 0, 0, 0, 0, 16 ,8, 0, 24);
 	}
 	static inline PixelFormat createFormatABGR8888() {
-		return PixelFormat(4,0,0,0,0,0,8,16,24);
+		return PixelFormat(4, 0, 0, 0, 0, 0, 8, 16, 24);
 	}
 	static inline PixelFormat createFormatBGRA8888() {
-		return PixelFormat(4,0,0,0,0,8,16,24,0);
+		return PixelFormat(4, 0, 0, 0, 0, 8, 16, 24, 0);
 	}
-#endif  //ENABLE_32BIT
-#endif  //ENABLE_RGB_COLOR
+#endif // ENABLE_32BIT
+#endif // ENABLE_RGB_COLOR
 
 	inline bool operator==(const PixelFormat &fmt) const {
 		// TODO: If aLoss==8, then the value of aShift is irrelevant, and should be ignored.


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