[Scummvm-cvs-logs] SF.net SVN: scummvm: [25511] scummvm/trunk/engines/agos
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Mon Feb 12 07:15:27 CET 2007
Revision: 25511
http://scummvm.svn.sourceforge.net/scummvm/?rev=25511&view=rev
Author: kirben
Date: 2007-02-11 22:15:26 -0800 (Sun, 11 Feb 2007)
Log Message:
-----------
Fix cursor palette in Amiga versions of Simon the Sorcerer 1 and remove duplciate cursor table.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/cursor.cpp
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2007-02-12 05:16:03 UTC (rev 25510)
+++ scummvm/trunk/engines/agos/agos.cpp 2007-02-12 06:15:26 UTC (rev 25511)
@@ -744,8 +744,10 @@
allocItemHeap();
allocTablesHeap();
- initMouse();
+ if (getGameType() != GType_SIMON2)
+ initMouse();
+
_variableArray = (int16 *)calloc(_numVars, sizeof(int16));
_variableArrayPtr = _variableArray;
if (getGameType() == GType_FF || getGameType() == GType_PP) {
Modified: scummvm/trunk/engines/agos/cursor.cpp
===================================================================
--- scummvm/trunk/engines/agos/cursor.cpp 2007-02-12 05:16:03 UTC (rev 25510)
+++ scummvm/trunk/engines/agos/cursor.cpp 2007-02-12 06:15:26 UTC (rev 25511)
@@ -83,28 +83,6 @@
};
-#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,10 +479,33 @@
_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 @@
} 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;
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