diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/charset.cpp | 1 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 39 |
2 files changed, 23 insertions, 17 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index dce6c9c144..9238b25feb 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -50,6 +50,7 @@ void ScummEngine::loadCJKFont() { if (_game.version <= 5 && _game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) { // FM-TOWNS v3 / v5 Kanji #ifdef DISABLE_TOWNS_DUAL_LAYER_MODE + GUIErrorMessage("FM-Towns Kanji font drawing requires dual graphics layer support which is disabled in this build"); error("FM-Towns Kanji font drawing requires dual graphics layer support which is disabled in this build"); #else // use FM-TOWNS font rom, since game files don't have kanji font resources diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index c74e4d1824..1ccf215605 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1155,24 +1155,29 @@ Common::Error ScummEngine::init() { #endif ) { #ifdef USE_RGB_COLOR - _outputPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); - Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats(); - // Try default 555 mode first - tryModes.push_front(_outputPixelFormat); - - for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) { - if (g->bytesPerPixel != 2 || g->aBits()) - continue; - _outputPixelFormat = *g; + _outputPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); + + if (_game.platform != Common::kPlatformFMTowns && _game.platform != Common::kPlatformPCEngine) { initGraphics(screenWidth, screenHeight, screenWidth > 320, &_outputPixelFormat); - // Other modes than 555 are only supported for FM-TOWNS games and LOOM PCE. - // Especially the HE games require 555. - if (*g == _system->getScreenFormat() || (_game.platform != Common::kPlatformFMTowns && _game.platform != Common::kPlatformPCEngine)) - break; + if (_outputPixelFormat != _system->getScreenFormat()) + return Common::kUnsupportedColorMode; + } else { + Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats(); + for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) { + if (g->bytesPerPixel != 2 || g->aBits()) + g = tryModes.erase(g); + + if (*g == _outputPixelFormat) { + tryModes.clear(); + tryModes.push_back(_outputPixelFormat); + break; + } + } + + initGraphics(screenWidth, screenHeight, screenWidth > 320, tryModes); + if (_system->getScreenFormat().bytesPerPixel != 2) + return Common::kUnsupportedColorMode; } - - if (_outputPixelFormat != _system->getScreenFormat()) - 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"); @@ -1184,7 +1189,7 @@ Common::Error ScummEngine::init() { } else { #ifdef DISABLE_TOWNS_DUAL_LAYER_MODE if (_game.platform == Common::kPlatformFMTowns && _game.version == 5) - error("This game requires dual graphics layer support which is disabled in this build"); + return Common::Error(Common::kUnsupportedColorMode, "This game requires dual graphics layer support which is disabled in this build"); #endif initGraphics(screenWidth, screenHeight, (screenWidth > 320)); } |