[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.136,2.137
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Tue Jun 3 23:53:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv3140
Modified Files:
gfx.cpp
Log Message:
V2 mouse cursor, for that extra retro feel
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.136
retrieving revision 2.137
diff -u -d -r2.136 -r2.137
--- gfx.cpp 3 Jun 2003 15:27:11 -0000 2.136
+++ gfx.cpp 4 Jun 2003 06:34:14 -0000 2.137
@@ -3193,6 +3193,49 @@
for (j = 0; j < w; j++)
_grabbedCursor[i * 8 + j] = color;
}
+ } else if (_features & GF_AFTER_V2) {
+ _cursor.width = 23;
+ _cursor.height = 21;
+ _cursor.hotspotX = 11;
+ _cursor.hotspotY = 10;
+
+ byte *hotspot = _grabbedCursor + _cursor.hotspotY * _cursor.width + _cursor.hotspotX;
+
+ // Crosshair, slightly assymetric
+
+ for (i = 0; i < 7; i++) {
+ *(hotspot - 5 - i) = color;
+ *(hotspot + 5 + i) = color;
+ }
+
+ for (i = 0; i < 8; i++) {
+ *(hotspot - _cursor.width * (3 + i)) = color;
+ *(hotspot + _cursor.width * (3 + i)) = color;
+ }
+
+ // Arrow heads, diagonal lines
+
+ for (i = 1; i <= 3; i++) {
+ *(hotspot - _cursor.width * i - 5 - i) = color;
+ *(hotspot + _cursor.width * i - 5 - i) = color;
+ *(hotspot - _cursor.width * i + 5 + i) = color;
+ *(hotspot + _cursor.width * i + 5 + 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 * (i + 3) + i) = color;
+ }
+
+ // Final touches
+
+ *(hotspot - _cursor.width - 7) = color;
+ *(hotspot - _cursor.width + 7) = color;
+ *(hotspot + _cursor.width - 7) = color;
+ *(hotspot + _cursor.width + 7) = color;
+ *(hotspot - (_cursor.width * 5) - 1) = color;
+ *(hotspot - (_cursor.width * 5) + 1) = color;
+ *(hotspot + (_cursor.width * 5) - 1) = color;
+ *(hotspot + (_cursor.width * 5) + 1) = color;
} else {
byte currentCursor = _currentCursor;
More information about the Scummvm-git-logs
mailing list