[Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.30,2.31

Eugene Sandulenko sev at users.sourceforge.net
Tue Mar 22 16:26:03 CET 2005


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

Modified Files:
	cursor.cpp 
Log Message:
Fixed Amiga cursor for Zak & MM from Quietust.


Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.30
retrieving revision 2.31
diff -u -d -r2.30 -r2.31
--- cursor.cpp	17 Mar 2005 03:20:25 -0000	2.30
+++ cursor.cpp	23 Mar 2005 00:25:08 -0000	2.31
@@ -353,6 +353,35 @@
 				*dst++ = palette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) | ((idx == 3) ? 4 : 0)];
 		}
 
+	} else if (_version <= 2 && _features & GF_AMIGA) {
+		_cursor.width = 15;
+		_cursor.height = 15;
+		_cursor.hotspotX = 7;
+		_cursor.hotspotY = 7;
+
+		byte *hotspot = _grabbedCursor + _cursor.hotspotY * _cursor.width + _cursor.hotspotX;
+
+		// Crosshair, symmetric
+		// TODO: Instead of setting this up via code, we should simply extend
+		//       default_cursor_images to contain this shape.
+		for (i = 0; i < 5; i++) {
+			*(hotspot - 3 - i) = color;
+			*(hotspot + 3 + i) = color;
+			*(hotspot - _cursor.width * (3 + i)) = color;
+			*(hotspot + _cursor.width * (3 + i)) = color;
+		}
+
+		// Arrow heads, diagonal lines
+		for (i = 1; i <= 2; i++) {
+			*(hotspot - _cursor.width * i - (3 + i)) = color;
+			*(hotspot + _cursor.width * i - (3 + i)) = color;
+			*(hotspot - _cursor.width * i + (3 + i)) = color;
+			*(hotspot + _cursor.width * i + (3 + i)) = color;
+			*(hotspot - _cursor.width * (3 + i) - i) = color;
+			*(hotspot + _cursor.width * (3 + i) - i) = color;
+			*(hotspot - _cursor.width * (3 + i) + i) = color;
+			*(hotspot + _cursor.width * (3 + i) + i) = color;
+		}
 	} else if (_version <= 2) {
 		_cursor.width = 23;
 		_cursor.height = 21;





More information about the Scummvm-git-logs mailing list