aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.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/scumm.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/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 0a5338374e..97dd68af7c 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1156,8 +1156,15 @@ Common::Error ScummEngine::init() {
#ifdef USE_RGB_COLOR
Graphics::PixelFormat format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
initGraphics(screenWidth, screenHeight, screenWidth > 320, &format);
- if (format != _system->getScreenFormat())
- return Common::kUnsupportedColorMode;
+ if (format != _system->getScreenFormat()) {
+ if (_game.platform == Common::kPlatformFMTowns && _game.version == 3) {
+ warning("Your ScummVM build does not support the type of 16bit color mode required by this target.\nStarting game in 8bit color mode...\nYou may experience color glitches");
+ _bytesPerPixelOutput = 1;
+ initGraphics(screenWidth, screenHeight, (screenWidth > 320));
+ } else {
+ return Common::kUnsupportedColorMode;
+ }
+ }
#else
if (_game.platform == Common::kPlatformFMTowns && _game.version == 3) {
warning("Starting game without the required 16bit color support.\nYou may experience color glitches");
@@ -1364,8 +1371,7 @@ void ScummEngine::resetScumm() {
#ifdef USE_RGB_COLOR
if (_game.features & GF_16BIT_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
-
- || _game.platform == Common::kPlatformFMTowns
+ || (_game.platform == Common::kPlatformFMTowns && _bytesPerPixelOutput == 2)
#endif
)
_16BitPalette = (uint16 *)calloc(512, sizeof(uint16));