From dd9ecfe1c0589db9a5e81c41d2118bc426cb5a43 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 23 Mar 2005 00:25:08 +0000 Subject: Fixed Amiga cursor for Zak & MM from Quietust. svn-id: r17201 --- scumm/cursor.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'scumm') diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp index f283a37e01..7a87c5d3a3 100644 --- a/scumm/cursor.cpp +++ b/scumm/cursor.cpp @@ -353,6 +353,35 @@ void ScummEngine_v5::setBuiltinCursor(int idx) { *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; -- cgit v1.2.3