aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/palette.cpp
diff options
context:
space:
mode:
authorathrxx2011-06-15 17:12:17 +0200
committerathrxx2011-06-15 17:12:17 +0200
commit5b7754e3f095eb8a469dd4b7de5a6379f8e13c27 (patch)
treeb8bf3ca09ca0ee0b5d835d0787ca356c7aff1235 /engines/scumm/palette.cpp
parent38c99889382c7142b3cb94a5a5bae5266f4ab7a3 (diff)
downloadscummvm-rg350-5b7754e3f095eb8a469dd4b7de5a6379f8e13c27.tar.gz
scummvm-rg350-5b7754e3f095eb8a469dd4b7de5a6379f8e13c27.tar.bz2
scummvm-rg350-5b7754e3f095eb8a469dd4b7de5a6379f8e13c27.zip
SCUMM: fix bug #3316738
This provides fallback to 8bit color mode for SCUMM3 FM-TOWNS games on platforms which set the USE_RGB_COLOR define even though that color mode is not being fully implemented for that platform.
Diffstat (limited to 'engines/scumm/palette.cpp')
-rw-r--r--engines/scumm/palette.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index ba13ff46d9..3e8c35cfd8 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -222,10 +222,12 @@ void ScummEngine::resetPalette() {
if (_game.id == GID_INDY4 || _game.id == GID_MONKEY2)
_townsClearLayerFlag = 0;
#ifdef USE_RGB_COLOR
- else if (_game.id == GID_LOOM)
- towns_setTextPaletteFromPtr(tableTownsLoomPalette);
- else if (_game.version == 3)
- towns_setTextPaletteFromPtr(tableTownsV3Palette);
+ else if (_bytesPerPixelOutput == 2) {
+ if (_game.id == GID_LOOM)
+ towns_setTextPaletteFromPtr(tableTownsLoomPalette);
+ else if (_game.version == 3)
+ towns_setTextPaletteFromPtr(tableTownsV3Palette);
+ }
#endif
_townsScreen->toggleLayers(_townsActiveLayerFlags);
@@ -1014,7 +1016,7 @@ void ScummEngine::setCurrentPalette(int palindex) {
setPCEPaletteFromPtr(pals);
#ifdef USE_RGB_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- } else if (_game.platform == Common::kPlatformFMTowns) {
+ } else if (_game.platform == Common::kPlatformFMTowns && _bytesPerPixelOutput == 2) {
towns_setPaletteFromPtr(pals);
#endif
#endif
@@ -1117,7 +1119,7 @@ void ScummEngine::updatePalette() {
#ifdef USE_RGB_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (_game.platform == Common::kPlatformFMTowns) {
+ if (_game.platform == Common::kPlatformFMTowns && _bytesPerPixelOutput == 2) {
p = palette_colors;
for (i = first; i < first + num; ++i) {
_16BitPalette[i] = get16BitColor(p[0], p[1], p[2]);