diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 8c8d77a9a65..5effa9bd90d 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::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"); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index fe69e27c019..af0c9d45919 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -231,6 +231,8 @@ public: bool isTrueColor() const; bool isDemo() const; + void setTrueColor(bool trueColor); + GUI::Debugger *getDebugger() { return _console; } const Graphics::PixelFormat &getPixelFormat() const;