[Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.27,2.28 resource_v7he.cpp,1.19,1.20

Eugene Sandulenko sev at users.sourceforge.net
Thu Feb 17 15:03:37 CET 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27902/scumm

Modified Files:
	cursor.cpp resource_v7he.cpp 
Log Message:
Mouse part of big patch #1013937 (OSystem layer with bigger resolution)


Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.27
retrieving revision 2.28
diff -u -d -r2.27 -r2.28
--- cursor.cpp	31 Jan 2005 03:53:35 -0000	2.27
+++ cursor.cpp	17 Feb 2005 23:00:59 -0000	2.28
@@ -107,7 +107,8 @@
 
 void ScummEngine::updateCursor() {
 	_system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height,
-							_cursor.hotspotX, _cursor.hotspotY);
+							_cursor.hotspotX, _cursor.hotspotY, 255, 
+							(_heversion == 70 ? 2 : 1));
 }
 
 void ScummEngine_v6::grabCursor(int x, int y, int w, int h) {

Index: resource_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v7he.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- resource_v7he.cpp	11 Feb 2005 03:45:10 -0000	1.19
+++ resource_v7he.cpp	17 Feb 2005 23:01:00 -0000	1.20
@@ -1532,10 +1532,9 @@
 	*hotspot_x = dis.readUint16BE();
 	*w = *h = 16;
 
-	// FIXME
-	// Color cursors use their own palette.
-	// So we can't use it for now and use B/W version
-	return;
+	// Use b/w cursor on backends which don't support cursor palettes
+	if (!_vm->_system->hasFeature(OSystem::kFeatureCursorHasPalette))
+		return;
 
 	dis.readUint32BE(); // reserved
 	dis.readUint32BE(); // cursorID
@@ -1600,12 +1599,7 @@
 		palette[c * 4 + 3] = 0;
 	}
 
-	// TODO: Here we should set separate cursor palette.
-	// It requires cursor to be rendered on a different surface at
-	// least in SDL backend.
-	// HACK: now set global palett just to see if colors are correct.
-	// this affects subtitles colors
-	_vm->_system->setPalette(palette, 0, ctSize);
+	_vm->_system->setCursorPalette(palette, 0, ctSize);
 
 	numBytes =
          (iconBounds[2] - iconBounds[0]) *





More information about the Scummvm-git-logs mailing list