[Scummvm-cvs-logs] SF.net SVN: scummvm:[42099] scummvm/trunk/engines/sci/gfx/gfx_driver.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Jul 4 19:39:43 CEST 2009


Revision: 42099
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42099&view=rev
Author:   thebluegr
Date:     2009-07-04 17:39:43 +0000 (Sat, 04 Jul 2009)

Log Message:
-----------
Cursors without a palette are now initialized correctly (from patch #2816652). Fixes the cursor transparent color in QFG3

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_driver.cpp

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-07-04 16:36:56 UTC (rev 42098)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-07-04 17:39:43 UTC (rev 42099)
@@ -257,15 +257,14 @@
 	} else {
 		byte *cursorData = createCursor(pointer);
 
-		// FIXME: The palette size check is a workaround for cursors using non-palette colour GFX_CURSOR_TRANSPARENT
-		// Note that some cursors don't have a palette in SQ5
+		// FIXME: The palette size check is a workaround for cursors using non-palette color GFX_CURSOR_TRANSPARENT
+		// Note that some cursors don't have a palette (e.g. in SQ5 and QFG3)
 		byte color_key = GFX_CURSOR_TRANSPARENT;
 		if ((pointer->color_key != GFX_PIXMAP_COLOR_KEY_NONE) && (pointer->palette && (unsigned int)pointer->color_key < pointer->palette->size()))
 			color_key = pointer->palette->getColor(pointer->color_key).parent_index;
-		// Some cursors in SQ5 don't have a palette. The cursor palette seems to use 64 colors, so setting the color key to 63 works
-		// TODO: Is this correct?
+		// Some cursors don't have a palette, so we set the color key directly
 		if (!pointer->palette)
-			color_key = 63;
+			color_key = pointer->color_key;
 
 		CursorMan.replaceCursor(cursorData, pointer->width, pointer->height, hotspot->x, hotspot->y, color_key);
 		CursorMan.showMouse(true);


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