aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/gob.cpp28
-rw-r--r--engines/gob/gob.h2
2 files changed, 30 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");
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index fe69e27c01..af0c9d4591 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;