[Scummvm-cvs-logs] SF.net SVN: scummvm: [24551] scummvm/trunk/engines/agos/cursor.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Oct 28 13:29:18 CEST 2006
Revision: 24551
http://svn.sourceforge.net/scummvm/?rev=24551&view=rev
Author: kirben
Date: 2006-10-28 04:29:13 -0700 (Sat, 28 Oct 2006)
Log Message:
-----------
Add shield cursor for Elvira 1
Modified Paths:
--------------
scummvm/trunk/engines/agos/cursor.cpp
Modified: scummvm/trunk/engines/agos/cursor.cpp
===================================================================
--- scummvm/trunk/engines/agos/cursor.cpp 2006-10-28 06:30:08 UTC (rev 24550)
+++ scummvm/trunk/engines/agos/cursor.cpp 2006-10-28 11:29:13 UTC (rev 24551)
@@ -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 @@
{
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,12 +400,21 @@
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++;
+ }
}
if (_mouseX != _mouseXOld || _mouseY != _mouseYOld)
@@ -514,9 +529,12 @@
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];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list