aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTravis Howell2007-05-27 05:17:39 +0000
committerTravis Howell2007-05-27 05:17:39 +0000
commitf33ea9c7f9cb2fa60435996c6442bdcb5ed3dc48 (patch)
treeb936d2a833a76e74ff1abddbe2b585267f61db72 /engines/agos
parent6a1290a1d327c0d1f4a93bb8a143edcb5a514280 (diff)
downloadscummvm-rg350-f33ea9c7f9cb2fa60435996c6442bdcb5ed3dc48.tar.gz
scummvm-rg350-f33ea9c7f9cb2fa60435996c6442bdcb5ed3dc48.tar.bz2
scummvm-rg350-f33ea9c7f9cb2fa60435996c6442bdcb5ed3dc48.zip
Add extra mouse cursors used by Elvira 2.
svn-id: r26956
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/cursor.cpp147
1 files changed, 114 insertions, 33 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index b6c7a52c24..864f6b280a 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -32,56 +32,95 @@
namespace AGOS {
-static const uint16 _common_cursors[8][32] = {
-// Mouse Info
-{ 0xC000, 0x8000, 0xE000, 0xC000, 0xF000, 0xE000, 0xF800, 0xF000,
+static const uint16 _common_mouseInfo[32] = {
+ 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 },
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+};
-// Shield Info
-{ 0x0000, 0x0000, 0x2184, 0x2004, 0x33CC, 0x300C, 0x3FFC, 0x3E7C,
+static const uint16 _common_shieldInfo[32] = {
+ 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 },
+ 0x07E0, 0x0660, 0x03C0, 0x0240, 0x0180, 0x0000, 0x0000, 0x0000
+};
-// Hand Info
-{ 0x01C0, 0x01C0, 0x07F0, 0x0770, 0x07F0, 0x0550, 0x07FC, 0x055C,
+static const uint16 _common_handInfo[32] = {
+ 0x01C0, 0x01C0, 0x07F0, 0x0770, 0x07F0, 0x0550, 0x07FC, 0x055C,
0x07FC, 0x0554, 0x3FFC, 0x3D54, 0x3FFC, 0x2554, 0x3FFE, 0x2402,
0x1FFC, 0x1204, 0x1FFC, 0x1004, 0x0FF8, 0x0808, 0x07F8, 0x0408,
- 0x03F8, 0x03F8, 0x03F8, 0x0208, 0x03F8, 0x03F8, 0x0000, 0x0000 },
+ 0x03F8, 0x03F8, 0x03F8, 0x0208, 0x03F8, 0x03F8, 0x0000, 0x0000
+};
-// Sword Info
-{
+static const uint16 _common_swordInfo1[32] = {
0x0000, 0x0000, 0xC000, 0x4000, 0xF000, 0x7000, 0x7800, 0x3800,
0x3C00, 0x1C00, 0x1E00, 0x0E00, 0x0F00, 0x0700, 0x0780, 0x0380,
0x03C6, 0x01C0, 0x01FF, 0x00E6, 0x00FE, 0x007C, 0x007C, 0x0038,
- 0x00FC, 0x0078, 0x01FE, 0x00CC, 0x01CF, 0x0086, 0x0086, 0x0000 },
+ 0x00FC, 0x0078, 0x01FE, 0x00CC, 0x01CF, 0x0086, 0x0086, 0x0000
+};
+
+static const uint16 _common_swordInfo2[32] = {
+ 0x0000, 0x0000, 0x4000, 0x0000, 0x7000, 0x0000, 0x3800, 0x0000,
+ 0x1C00, 0x0000, 0x0E00, 0x0000, 0x0700, 0x0000, 0x0380, 0x0000,
+ 0x01C0, 0x0000, 0x00E6, 0x0000, 0x007C, 0x0000, 0x0038, 0x0000,
+ 0x0078, 0x0000, 0x00CC, 0x0000, 0x0086, 0x0000, 0x0000, 0x0000,
+};
+
+static const uint16 _common_lightningInfo1[32] = {
+ 0x0000, 0x0000, 0xC000, 0x4000, 0xE000, 0x6000, 0xF020, 0x7000,
+ 0x7860, 0x3820, 0x7CE0, 0x3C60, 0x3FF0, 0x1EF0, 0x3FF0, 0x1FF0,
+ 0x1FF8, 0x0FF8, 0x1FF8, 0x0FF8, 0x0F7C, 0x073C, 0x0E3C, 0x061C,
+ 0x061E, 0x020E, 0x040E, 0x0006, 0x0006, 0x0002, 0x0002, 0x0000,
+};
+
+static const uint16 _common_lightningInfo2[32] = {
+ 0x0000, 0x0000, 0xC000, 0x0000, 0xE000, 0x0000, 0xF020, 0x0000,
+ 0x7860, 0x0000, 0x7CE0, 0x0000, 0x3FF0, 0x0000, 0x3FF0, 0x0000,
+ 0x1FF8, 0x0000, 0x1FF8, 0x0000, 0x0F7C, 0x0000, 0x0E3C, 0x0000,
+ 0x061E, 0x0000, 0x040E, 0x0000, 0x0006, 0x0000, 0x0002, 0x0000,
+};
+
+static const uint16 _common_crossbowInfo1[32] = {
+ 0x0000, 0x0000, 0x03E0, 0x07C0, 0x1FF8, 0x1FF0, 0x3FFC, 0x3FF8,
+ 0x7FFE, 0x7FFC, 0x7FFE, 0x7FFC, 0xF39E, 0xF39E, 0xE38E, 0xE38E,
+ 0xC386, 0xC386, 0xC386, 0xC386, 0xC386, 0xC386, 0xC386, 0xC386,
+ 0x8002, 0x8002, 0x8002, 0x8002, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+static const uint16 _common_crossbowInfo2[32] = {
+ 0x0000, 0x0000, 0x03E0, 0x0000, 0x1FF8, 0x0000, 0x3FFC, 0x0000,
+ 0x7FFE, 0x0000, 0x7FFE, 0x0000, 0xF39E, 0x0000, 0xE38E, 0x0000,
+ 0xC386, 0x0000, 0xC386, 0x0000, 0xC386, 0x0000, 0xC386, 0x0000,
+ 0x8002, 0x0000, 0x8002, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+};
-// Move Forward
-{ 0x0180, 0x0100, 0x03C0, 0x0380, 0x07E0, 0x07C0, 0x0FF0, 0x0FE0,
+static const uint16 _common_moveForward[32] = {
+ 0x0180, 0x0100, 0x03C0, 0x0380, 0x07E0, 0x07C0, 0x0FF0, 0x0FE0,
0x1FF8, 0x1FF0, 0x03C0, 0x0380, 0x03C0, 0x0380, 0x03C0, 0x0380,
0x03C0, 0x0380, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+};
-// Mouse Right
-{ 0x00C0, 0x0080, 0x00E0, 0x00C0, 0x00F0, 0x00E0, 0x1FF8, 0x1FF0,
+static const uint16 _common_moveRight[32] = {
+ 0x00C0, 0x0080, 0x00E0, 0x00C0, 0x00F0, 0x00E0, 0x1FF8, 0x1FF0,
0x3FFC, 0x3FF8, 0x3FF8, 0x3FF0, 0x3CF0, 0x38E0, 0x3CE0, 0x38C0,
0x3CC0, 0x3880, 0x3C00, 0x3800, 0x3C00, 0x3800, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+};
-// Mouse Back
-{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+static const uint16 _common_moveBack[32] = {
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x03C0, 0x0380, 0x03C0, 0x0380, 0x03C0, 0x0380, 0x03C0, 0x0380,
0x1FF8, 0x1FF0, 0x0FF0, 0x0FE0, 0x07E0, 0x07C0, 0x03C0, 0x0380,
- 0x0180, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
+ 0x0180, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+};
-// Move Left
-{ 0x0C00, 0x0800, 0x1C00, 0x1800, 0x3C00, 0x3800, 0x7FE0, 0x7FC0,
+static const uint16 _common_moveLeft[32] = {
+ 0x0C00, 0x0800, 0x1C00, 0x1800, 0x3C00, 0x3800, 0x7FE0, 0x7FC0,
0xFFF0, 0xFFE0, 0x7FF0, 0x7FE0, 0x3CF0, 0x38E0, 0x1CF0, 0x18E0,
0x0CF0, 0x08E0, 0x00F0, 0x00E0, 0x00F0, 0x00E0, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
-
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
static const byte _simon2_cursors[10][256] = {
@@ -500,7 +539,7 @@ void AGOSEngine::initMouse() {
if (getPlatform() == Common::kPlatformAmiga)
color = (getFeatures() & GF_32COLOR) ? 17 : 241;
- const uint16 *src = _common_cursors[0];
+ const uint16 *src = _common_mouseInfo;
for (int i = 0; i < 16; i++) {
for (int j = 0; j < 16; j++) {
if (src[0] & (1 << (15 - (j % 16)))) {
@@ -631,14 +670,56 @@ void AGOSEngine::drawMousePointer() {
const uint8 color = (getGameType() == GType_ELVIRA1) ? 15: 65;
memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight);
- uint cursor = _mouseCursor;
- if (getGameType() == GType_ELVIRA1 && cursor == 2)
- cursor = 3;
+ if (getGameType() == GType_WW) {
+ if (_mouseCursor == 0) {
+ src = _common_mouseInfo;
+ } else if (_mouseCursor == 2) {
+ src = _common_handInfo;
+ } else if (_mouseCursor == 3) {
+ src = _common_swordInfo1;
+ } else if (_mouseCursor == 4) {
+ src = _common_moveForward;
+ } else if (_mouseCursor == 5) {
+ src = _common_moveRight;
+ } else if (_mouseCursor == 6) {
+ src = _common_moveBack;
+ } else if (_mouseCursor == 7) {
+ src = _common_moveLeft;
+ } else {
+ src = _common_mouseInfo;
+ }
+ } else if (getGameType() == GType_ELVIRA2) {
+ if (_mouseCursor == 0) {
+ src = _common_mouseInfo;
+ } else if (_mouseCursor == 1) {
+ src = _common_shieldInfo;
+ } else if (_mouseCursor == 2) {
+ src = _common_handInfo;
+ } else if (_mouseCursor == 3) {
+ src = _common_swordInfo1;
+ } else if (_mouseCursor == 4) {
+ src = _common_swordInfo2;
+ } else if (_mouseCursor == 5) {
+ src = _common_lightningInfo1;
+ } else if (_mouseCursor == 6) {
+ src = _common_lightningInfo2;
+ } else if (_mouseCursor == 7) {
+ src = _common_crossbowInfo1;
+ } else {
+ src = _common_crossbowInfo2;
+ }
+ } else if (getGameType() == GType_ELVIRA1) {
+ if (_mouseCursor == 0) {
+ src = _common_mouseInfo;
+ } else if (_mouseCursor == 1) {
+ src = _common_shieldInfo;
+ } else {
+ src = _common_swordInfo1;
+ }
+ }
if (_dragFlag != 0)
- cursor = 2;
-
- src = _common_cursors[cursor];
+ src = _common_handInfo;
for (i = 0; i < 16; i++) {
for (j = 0; j < 16; j++) {