diff options
Diffstat (limited to 'engines/gob/gob.cpp')
-rw-r--r-- | engines/gob/gob.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 8c8d77a9a6..5effa9bd90 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -246,6 +246,34 @@ const Graphics::PixelFormat &GobEngine::getPixelFormat() const { return _pixelFormat; } +void GobEngine::setTrueColor(bool trueColor) { + if (isTrueColor() == trueColor) + return; + + _features = (_features & ~kFeaturesTrueColor) | (trueColor ? kFeaturesTrueColor : 0); + + _video->setSize(is640x480()); + + _pixelFormat = g_system->getScreenFormat(); + + Common::Array<SurfacePtr>::iterator surf; + for (surf = _draw->_spritesArray.begin(); surf != _draw->_spritesArray.end(); ++surf) + if (*surf) + (*surf)->setBPP(_pixelFormat.bytesPerPixel); + + if (_draw->_backSurface) + _draw->_backSurface->setBPP(_pixelFormat.bytesPerPixel); + if (_draw->_frontSurface) + _draw->_frontSurface->setBPP(_pixelFormat.bytesPerPixel); + if (_draw->_cursorSprites) + _draw->_cursorSprites->setBPP(_pixelFormat.bytesPerPixel); + if (_draw->_cursorSpritesBack) + _draw->_cursorSpritesBack->setBPP(_pixelFormat.bytesPerPixel); + if (_draw->_scummvmCursor) + _draw->_scummvmCursor->setBPP(_pixelFormat.bytesPerPixel); + SurfacePtr _scummvmCursor; +} + Common::Error GobEngine::run() { if (!initGameParts()) { GUIErrorMessage("GobEngine::init(): Unknown version of game engine"); |