aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-10-28 11:29:13 +0000
committerTravis Howell2006-10-28 11:29:13 +0000
commitaa6a92ac6d5e5bd8e67e1aa28ef5d4cf0406e68d (patch)
tree280f1e08e67ebd633ab2a85dc825fc56e03687df /engines
parent847956af4069454516563b2da1640704a5e52e08 (diff)
downloadscummvm-rg350-aa6a92ac6d5e5bd8e67e1aa28ef5d4cf0406e68d.tar.gz
scummvm-rg350-aa6a92ac6d5e5bd8e67e1aa28ef5d4cf0406e68d.tar.bz2
scummvm-rg350-aa6a92ac6d5e5bd8e67e1aa28ef5d4cf0406e68d.zip
Add shield cursor for Elvira 1
svn-id: r24551
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/cursor.cpp38
1 files changed, 28 insertions, 10 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 4edfd6d487..ab2c5f2cbf 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -31,13 +31,19 @@
namespace AGOS {
-static const uint16 _common_cursors[7][32] = {
+static const uint16 _common_cursors[8][32] = {
// Mouse Info
{ 0xC000, 0x8000, 0xE000, 0xC000, 0xF000, 0xE000, 0xF800, 0xF000,
0xFC00, 0xF800, 0xFE00, 0xFC00, 0xFC00, 0xF000, 0x9800, 0x9000,
0x0C00, 0x0800, 0x0C00, 0x0800, 0x0600, 0x0400, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
+// Shield Info
+{ 0x0000, 0x0000, 0x2184, 0x2004, 0x33CC, 0x300C, 0x3FFC, 0x3E7C,
+ 0x3FFC, 0x3E7C, 0x3FFC, 0x3E7C, 0x3FFC, 0x0000, 0x3FFC, 0x3E7C,
+ 0x3FFC, 0x3E7C, 0x1FF8, 0x1E78, 0x1FF8, 0x1E78, 0x0FF0, 0x0E70,
+ 0x07E0, 0x0660, 0x03C0, 0x0240, 0x0180, 0x0000, 0x0000, 0x0000 },
+
// Hand Info
{ 0x01C0, 0x01C0, 0x07F0, 0x0770, 0x07F0, 0x0550, 0x07FC, 0x055C,
0x07FC, 0x0554, 0x3FFC, 0x3D54, 0x3FFC, 0x2554, 0x3FFE, 0x2402,
@@ -48,13 +54,13 @@ static const uint16 _common_cursors[7][32] = {
{
0x0000, 0x0000, 0xC000, 0x4000, 0xF000, 0x7000, 0x7800, 0x3800,
0x3C00, 0x1C00, 0x1E00, 0x0E00, 0x0F00, 0x0700, 0x0780, 0x0380,
- 0x3C6, 0x01C0, 0x01FF, 0x00E6, 0x00FE, 0x007C, 0x007C, 0x0038,
- 0x0FC, 0x0078, 0x01FE, 0x00CC, 0x01CF, 0x0086, 0x0086, 0x0000 },
+ 0x03C6, 0x01C0, 0x01FF, 0x00E6, 0x00FE, 0x007C, 0x007C, 0x0038,
+ 0x00FC, 0x0078, 0x01FE, 0x00CC, 0x01CF, 0x0086, 0x0086, 0x0000 },
// Move Forward
{ 0x0180, 0x0100, 0x03C0, 0x0380, 0x07E0, 0x07C0, 0x0FF0, 0x0FE0,
0x1FF8, 0x1FF0, 0x03C0, 0x0380, 0x03C0, 0x0380, 0x03C0, 0x0380,
- 0x3C0, 0x0380, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x03C0, 0x0380, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
// Mouse Right
@@ -394,10 +400,19 @@ void AGOSEngine::handleMouseMoved() {
get_out2:;
_vgaVar9 = 0;
}
- } else if (getGameType() == GType_WW || getGameType() == GType_ELVIRA2) {
- uint swordCursor = (getGameType() == GType_WW) ? _variableArray[51] : _variableArray[72];
- if (swordCursor != 0 && _mouseCursor != swordCursor) {
- _mouseCursor = swordCursor;
+ } else if (getGameType() == GType_WW) {
+ if (_variableArray[51] != 0 && _mouseCursor != _variableArray[51]) {
+ _mouseCursor = _variableArray[51];
+ _needHitAreaRecalc++;
+ }
+ } else if (getGameType() == GType_ELVIRA2) {
+ if (_mouseCursor != _variableArray[72]) {
+ _mouseCursor = _variableArray[72];
+ _needHitAreaRecalc++;
+ }
+ } else if (getGameType() == GType_ELVIRA1) {
+ if (_mouseCursor != _variableArray[438]) {
+ _mouseCursor = _variableArray[438];
_needHitAreaRecalc++;
}
}
@@ -514,9 +529,12 @@ void AGOSEngine::drawMousePointer() {
memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight);
- uint cursor = (_mouseCursor == 0) ? _mouseCursor : _mouseCursor - 1;
+ uint cursor = _mouseCursor;
+ if (getGameType() == GType_ELVIRA1 && cursor == 2)
+ cursor = 3;
+
if (_dragFlag != 0)
- cursor = 1;
+ cursor = 2;
src = _common_cursors[cursor];