From 5b7754e3f095eb8a469dd4b7de5a6379f8e13c27 Mon Sep 17 00:00:00 2001 From: athrxx Date: Wed, 15 Jun 2011 17:12:17 +0200 Subject: 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. --- engines/scumm/palette.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/scumm/palette.cpp') 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]); -- cgit v1.2.3