diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/cursor.cpp | 51 | ||||
-rw-r--r-- | engines/scumm/he/resource_he.cpp | 2 |
2 files changed, 36 insertions, 17 deletions
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index d55a22a085..899f920247 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -48,14 +48,22 @@ static const byte default_cursor_colors[4] = { 15, 15, 7, 8 }; - -static const uint16 default_he_cursor[64] = { - 0x0000, 0x0000, 0x3800, 0x0000, 0x7e00, 0x0000, 0x5f80, 0x0000, - 0x5fe0, 0x0000, 0x2ff8, 0x0000, 0x27fe, 0x0000, 0x17ff, 0x8000, - 0x13ff, 0xe000, 0x09ff, 0xf000, 0x09ff, 0xf800, 0x04ff, 0xf800, - 0x047f, 0xf000, 0x027f, 0xe000, 0x023f, 0xf000, 0x011f, 0xf800, - 0x0111, 0xfc00, 0x0080, 0xfc00, 0x0084, 0x0c00, 0x004a, 0x0800, - 0x0031, 0x1000, 0x0000, 0xe000, 0x0000, 0x0000, 0x0000, 0x0000, +// 2bpp +static const uint16 default_he_cursor[128] = { + 0x0a80, 0x0000, 0x0000, 0x0000, 0x2568, 0x0000, 0x0000, 0x0000, + 0x9556, 0x8000, 0x0000, 0x0000, 0x9955, 0x6800, 0x0000, 0x0000, + 0x9955, 0x5680, 0x0000, 0x0000, 0x2655, 0x5568, 0x0000, 0x0000, + 0x2695, 0x5556, 0x8000, 0x0000, 0x0995, 0x5555, 0x6800, 0x0000, + 0x09a5, 0x5555, 0x5600, 0x0000, 0x0269, 0x5555, 0x5580, 0x0000, + 0x0269, 0x5555, 0x5560, 0x0000, 0x009a, 0x5555, 0x5560, 0x0000, + 0x009a, 0x9555, 0x5580, 0x0000, 0x0026, 0x9555, 0x5600, 0x0000, + 0x0026, 0xa555, 0x5580, 0x0000, 0x0009, 0xa955, 0x5560, 0x0000, + 0x0009, 0xa9a9, 0x5558, 0x0000, 0x0002, 0x6aaa, 0x5558, 0x0000, + 0x0002, 0x6a9a, 0xaa58, 0x0000, 0x0000, 0x9a66, 0xaa60, 0x0000, + 0x0000, 0x2589, 0xa980, 0x0000, 0x0000, 0x0a02, 0x5600, 0x0000, + 0x0000, 0x0000, 0xa800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }; @@ -155,8 +163,9 @@ void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) { void ScummEngine_v70he::setDefaultCursor() { const uint16 *src; int i, j; - static const byte palette[] = { 0xff, 0xff, 0xff, 0, - 0, 0, 0, 0}; + static const byte palette[] = {0, 0, 0, 0, + 0xff, 0xff, 0xff, 0, + 0, 0, 0, 0}; memset(_grabbedCursor, 5, sizeof(_grabbedCursor)); @@ -167,18 +176,28 @@ void ScummEngine_v70he::setDefaultCursor() { _cursor.height = 32; for (i = 0; i < 32; i++) { + int p = *src; for (j = 0; j < 32; j++) { - if (*src & (1 << (15 - (j % 16)))) - _grabbedCursor[32 * i + j] = 0xfe; - if (j == 15) - src++; + switch ((p & (0x3 << 14)) >> 14) { + case 1: + _grabbedCursor[32 * i + j] = 0xfe; + break; + case 2: + _grabbedCursor[32 * i + j] = 0xfd; + break; + default: + break; + } + p <<= 2; + + if ((j + 1) % 8 == 0) + p = *(++src); } - src++; } // Since white color position is not guaranteed // we setup our own palette if supported by backend - CursorMan.replaceCursorPalette(palette, 0xfe, 2); + CursorMan.replaceCursorPalette(palette, 0xfd, 3); updateCursor(); } diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 72db0a8d9e..0715bf756b 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -954,7 +954,7 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int if (color) { cursor[0][width * d + x] = 254; // white } else { - cursor[0][width * d + x] = 0; // black + cursor[0][width * d + x] = 253; // black } } else { cursor[0][width * d + x] = 255; // transparent |