diff options
author | Travis Howell | 2007-02-12 06:15:26 +0000 |
---|---|---|
committer | Travis Howell | 2007-02-12 06:15:26 +0000 |
commit | 3c1ede05203087bccdd76ffc2d92a4f4809e42ce (patch) | |
tree | 1fec42b5d73eeb36306bbda0b04c14cf21781b27 /engines | |
parent | 45692d4323d1b3a7a4aab3199baa09f26d1783df (diff) | |
download | scummvm-rg350-3c1ede05203087bccdd76ffc2d92a4f4809e42ce.tar.gz scummvm-rg350-3c1ede05203087bccdd76ffc2d92a4f4809e42ce.tar.bz2 scummvm-rg350-3c1ede05203087bccdd76ffc2d92a4f4809e42ce.zip |
Fix cursor palette in Amiga versions of Simon the Sorcerer 1 and remove duplciate cursor table.
svn-id: r25511
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.cpp | 4 | ||||
-rw-r--r-- | engines/agos/cursor.cpp | 49 |
2 files changed, 28 insertions, 25 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 0d9da48657..af8f4e9109 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -744,7 +744,9 @@ void AGOSEngine::setupGame() { allocItemHeap(); allocTablesHeap(); - initMouse(); + + if (getGameType() != GType_SIMON2) + initMouse(); _variableArray = (int16 *)calloc(_numVars, sizeof(int16)); _variableArrayPtr = _variableArray; diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp index dd73d5db2a..d127821d2a 100644 --- a/engines/agos/cursor.cpp +++ b/engines/agos/cursor.cpp @@ -83,28 +83,6 @@ static const uint16 _common_cursors[8][32] = { }; -#ifdef PALMOS_68K -static const byte *_simon1_cursor; -#else -static const byte _simon1_cursor[256] = { - 0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xe1,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xe1,0xe1,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xe1,0xe1,0xe1,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xe1,0xe1,0xe1,0xe0,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xe1,0xff,0xff,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -}; -#endif static const byte _simon2_cursors[10][256] = { // cross hair { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xec,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, @@ -501,7 +479,30 @@ void AGOSEngine::initMouse() { _maxCursorWidth = 40; _maxCursorHeight = 40; _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); - } else if (getGameType() != GType_SIMON1 && getGameType() != GType_SIMON2) { + } else if (getGameType() == GType_SIMON1) { + _maxCursorWidth = 16; + _maxCursorHeight = 16; + _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); + memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight); + + uint8 color = 241; + if (getPlatform() == Common::kPlatformAmiga) + color = (getFeatures() & GF_32COLOR) ? 17 : 241; + + const uint16 *src = _common_cursors[0]; + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { + if (src[0] & (1 << (15 - (j % 16)))) { + if (src[1] & (1 << (15 - (j % 16)))) { + _mouseData[16 * i + j] = color; + } else { + _mouseData[16 * i + j] = 0; + } + } + } + src += 2; + } + } else { _maxCursorWidth = 16; _maxCursorHeight = 16; _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); @@ -522,7 +523,7 @@ void AGOSEngine::drawMousePointer() { } else if (getGameType() == GType_SIMON2) { CursorMan.replaceCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7); } else if (getGameType() == GType_SIMON1) { - CursorMan.replaceCursor(_simon1_cursor, 16, 16, 0, 0); + CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF); } else { const uint16 *src; int i, j; |