[Scummvm-cvs-logs] SF.net SVN: scummvm:[41213] scummvm/branches/gsoc2009-16bit/backends/ platform/sdl

upthorn at users.sourceforge.net upthorn at users.sourceforge.net
Sat Jun 6 10:41:03 CEST 2009


Revision: 41213
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41213&view=rev
Author:   upthorn
Date:     2009-06-06 08:41:03 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
Streamlined the cursor blitting changes introduced in revision 41412

Revision Links:
--------------
    http://scummvm.svn.sourceforge.net/scummvm/?rev=41412&view=rev

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h

Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp	2009-06-06 08:02:45 UTC (rev 41212)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp	2009-06-06 08:41:03 UTC (rev 41213)
@@ -332,11 +332,7 @@
 
 	// Even if the old and new scale factors are the same, we may have a
 	// different scaler for the cursor now.
-#ifdef ENABLE_16BIT
-	blitCursor(_cursorBitDepth);
-#else
 	blitCursor();
-#endif
 }
 
 int OSystem_SDL::getGraphicsMode() const {
@@ -604,11 +600,7 @@
 	SDL_FreeSurface(old_overlayscreen);
 
 	// Update cursor to new scale
-#ifdef ENABLE_16BIT
-	blitCursor(_cursorBitDepth);
-#else
 	blitCursor();
-#endif
 
 	// Blit everything to the screen
 	internUpdateScreen();
@@ -1171,11 +1163,7 @@
 
 	// Some games blink cursors with palette
 	if (_cursorPaletteDisabled)
-#ifdef ENABLE_16BIT
-		blitCursor(_cursorBitDepth);
-#else
 		blitCursor();
-#endif
 }
 
 void OSystem_SDL::grabPalette(byte *colors, uint start, uint num) {
@@ -1204,11 +1192,7 @@
 
 	_cursorPaletteDisabled = false;
 
-#ifdef ENABLE_16BIT
-	blitCursor(_cursorBitDepth);
-#else
 	blitCursor();
-#endif
 }
 
 void OSystem_SDL::setShakePos(int shake_pos) {
@@ -1469,21 +1453,15 @@
 #ifdef ENABLE_16BIT
 	_mouseData = (byte *)malloc(w * h * byteDepth);
 	memcpy(_mouseData, buf, w * h * byteDepth);
-
-	blitCursor(bitDepth);
 #else
 	_mouseData = (byte *)malloc(w * h);
 	memcpy(_mouseData, buf, w * h);
+#endif
 
 	blitCursor();
-#endif
 }
 
-#ifdef ENABLE_16BIT
-void OSystem_SDL::blitCursor(uint8 bitDepth) {
-#else
 void OSystem_SDL::blitCursor() {
-#endif
 	byte *dstPtr;
 	const byte *srcPtr = _mouseData;
 	byte color;
@@ -1522,7 +1500,7 @@
 		for (j = 0; j < w; j++) {
 			color = *srcPtr;
 #ifdef ENABLE_16BIT
-			if (bitDepth == 16) {
+			if (_cursorBitDepth == 16) {
 				if (color != _mouseKeyColor) {	// transparent, don't draw
 					int8 r = ((*(uint16 *)srcPtr >> 10) & 0x1F) << 3;
 					int8 g = ((*(uint16 *)srcPtr >> 5) & 0x1F) << 3;

Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h	2009-06-06 08:02:45 UTC (rev 41212)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h	2009-06-06 08:41:03 UTC (rev 41213)
@@ -124,11 +124,7 @@
 	// Disables or enables cursor palette
 	void disableCursorPalette(bool disable) {
 		_cursorPaletteDisabled = disable;
-#ifdef ENABLE_16BIT 
-		blitCursor(_cursorBitDepth);
-#else
 		blitCursor();
-#endif
 	}
 
 	// Shaking is used in SCUMM. Set current shake position.
@@ -420,11 +416,7 @@
 
 	virtual void drawMouse(); // overloaded by CE backend
 	virtual void undrawMouse(); // overloaded by CE backend (FIXME)
-#ifdef ENABLE_16BIT
-	virtual void blitCursor(uint8 bitDepth = 8); // overloaded by CE backend (FIXME)
-#else
 	virtual void blitCursor(); // overloaded by CE backend (FIXME)
-#endif
 
 	/** Set the position of the virtual mouse cursor. */
 	void setMousePos(int x, int y);


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