aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-11-22 10:56:49 +0000
committerTorbjörn Andersson2009-11-22 10:56:49 +0000
commit00708d056ace8c4646e296e47c48c919a258d7a9 (patch)
tree25d0d88d189622e163d6650c6acf552760dd694d /engines/scumm
parent326eb2230b9892c7ea9ab673ed70bcb74386f48a (diff)
downloadscummvm-rg350-00708d056ace8c4646e296e47c48c919a258d7a9.tar.gz
scummvm-rg350-00708d056ace8c4646e296e47c48c919a258d7a9.tar.bz2
scummvm-rg350-00708d056ace8c4646e296e47c48c919a258d7a9.zip
Added hard-coded cursor, and adjusted the colours slightly, for the PC-Engine
version of Loom, based on information from hennymcc. svn-id: r46074
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/cursor.cpp61
1 files changed, 37 insertions, 24 deletions
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index a998402474..98e7b81369 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -45,7 +45,7 @@ static const byte default_v1_cursor_colors[4] = {
};
static const uint16 default_pce_cursor_colors[4] = {
- 0x01FF, 0x016D, 0x0000, 0x0092
+ 0x01FF, 0x01FF, 0x016D, 0x0092
};
static const byte default_cursor_colors[4] = {
@@ -356,33 +356,46 @@ void ScummEngine_v5::redefineBuiltinCursorFromChar(int index, int chr) {
// const int oldID = _charset->getCurID();
- if (_game.version == 3) {
- _charset->setCurID(0);
- } else if (_game.version >= 4) {
- _charset->setCurID(1);
- }
+ uint16 *ptr = _cursorImages[index];
+ int h;
- Graphics::Surface s;
- byte buf[16*17];
- memset(buf, 123, 16*17);
- s.pixels = buf;
- s.w = _charset->getCharWidth(chr);
- s.h = _charset->getFontHeight();
- s.pitch = s.w;
- // s.h = 17 for FM-TOWNS Loom Japanese. Fixes bug #1166917
- assert(s.w <= 16 && s.h <= 17);
- s.bytesPerPixel = 1;
+ if (index == 1 && _game.platform == Common::kPlatformPCEngine) {
+ uint16 cursorPCE[] = {
+ 0x8000, 0xC000, 0xE000, 0xF000, 0xF800, 0xFC00, 0xFE00, 0xFF00,
+ 0xF180, 0xF800, 0x8C00, 0x0C00, 0x0600, 0x0600, 0x0300
+ };
- _charset->drawChar(chr, s, 0, 0);
+ for (h = 0; h < ARRAYSIZE(cursorPCE); h++) {
+ *ptr++ = cursorPCE[h];
+ }
+ } else {
+ if (_game.version == 3) {
+ _charset->setCurID(0);
+ } else if (_game.version >= 4) {
+ _charset->setCurID(1);
+ }
- uint16 *ptr = _cursorImages[index];
- memset(ptr, 0, 17 * sizeof(uint16));
- for (int h = 0; h < s.h; h++) {
- for (int w = 0; w < s.w; w++) {
- if (buf[s.pitch * h + w] != 123)
- *ptr |= 1 << (15 - w);
+ Graphics::Surface s;
+ byte buf[16*17];
+ memset(buf, 123, 16*17);
+ s.pixels = buf;
+ s.w = _charset->getCharWidth(chr);
+ s.h = _charset->getFontHeight();
+ s.pitch = s.w;
+ // s.h = 17 for FM-TOWNS Loom Japanese. Fixes bug #1166917
+ assert(s.w <= 16 && s.h <= 17);
+ s.bytesPerPixel = 1;
+
+ _charset->drawChar(chr, s, 0, 0);
+
+ memset(ptr, 0, 17 * sizeof(uint16));
+ for (h = 0; h < s.h; h++) {
+ for (int w = 0; w < s.w; w++) {
+ if (buf[s.pitch * h + w] != 123)
+ *ptr |= 1 << (15 - w);
+ }
+ ptr++;
}
- ptr++;
}
// _charset->setCurID(oldID);