diff options
author | Torbjörn Andersson | 2003-06-04 06:34:14 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-06-04 06:34:14 +0000 |
commit | 0bb87879c8d817f3db15fb3ae2ba0a9384e3566a (patch) | |
tree | 35c9465703c9de6a7840068f713211bb62d6e9ce /scumm | |
parent | fc350e6be6df0d5aa12e98495fc7b5e483553a5a (diff) | |
download | scummvm-rg350-0bb87879c8d817f3db15fb3ae2ba0a9384e3566a.tar.gz scummvm-rg350-0bb87879c8d817f3db15fb3ae2ba0a9384e3566a.tar.bz2 scummvm-rg350-0bb87879c8d817f3db15fb3ae2ba0a9384e3566a.zip |
V2 mouse cursor, for that extra retro feel
svn-id: r8288
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index e7663f4e10..2349bcc0e2 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -3193,6 +3193,49 @@ void Scumm::decompressDefaultCursor(int idx) { 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; |