aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/cursor.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2010-10-03 20:29:22 +0000
committerFlorian Kagerer2010-10-03 20:29:22 +0000
commit5d7ce32fbd4911f449e614bcf445cb2a26ed30d7 (patch)
tree130cde53d06a96479f19c2ab46b40ac8c7886583 /engines/scumm/cursor.cpp
parent8d297f065ad67de8c0986ae33ff5e4520e90d4e4 (diff)
downloadscummvm-rg350-5d7ce32fbd4911f449e614bcf445cb2a26ed30d7.tar.gz
scummvm-rg350-5d7ce32fbd4911f449e614bcf445cb2a26ed30d7.tar.bz2
scummvm-rg350-5d7ce32fbd4911f449e614bcf445cb2a26ed30d7.zip
SCUMM/FM-TOWNS: fix mouse cursor colors
svn-id: r52999
Diffstat (limited to 'engines/scumm/cursor.cpp')
-rw-r--r--engines/scumm/cursor.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 63a7b1c40e..80e7899650 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -560,6 +560,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
colorPCEToRGB(default_pce_cursor_colors[idx], &r, &g, &b);
color = get16BitColor(r, g, b);
} else if (_game.platform == Common::kPlatformFMTowns) {
+ //uint8 tmp = (default_cursor_colors[idx] << 4) | default_cursor_colors[idx];
byte *palEntry = &_textPalette[default_cursor_colors[idx] * 3];
color = get16BitColor(palEntry[0], palEntry[1], palEntry[2]);
} else {
@@ -585,8 +586,17 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
if (src[i] & (1 << j)) {
byte *dst1 = _grabbedCursor + 16 * scl * i * _textSurfaceMultiplier + (15 - j) * scl;
byte *dst2 = (_textSurfaceMultiplier == 2) ? dst1 + 16 * scl : dst1;
- for (int b = 0; b < scl; b++)
- *dst1++ = *dst2++ = color;
+ if (_bytesPerPixelOutput == 2) {
+ for (int b = 0; b < scl; b += 2) {
+ WRITE_LE_UINT16(dst1, color);
+ WRITE_LE_UINT16(dst2, color);
+ dst1 += 2;
+ dst2 += 2;
+ }
+ } else {
+ for (int b = 0; b < scl; b++)
+ *dst1++ = *dst2++ = color;
+ }
}
}
}