mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-09 10:11:23 +00:00
GOB: Add setTrueColor()
To change ScummVM's color mode on-the-fly svn-id: r55261
This commit is contained in:
parent
7de179c2c8
commit
e063ced21a
@ -246,6 +246,34 @@ const Graphics::PixelFormat &GobEngine::getPixelFormat() const {
|
|||||||
return _pixelFormat;
|
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() {
|
Common::Error GobEngine::run() {
|
||||||
if (!initGameParts()) {
|
if (!initGameParts()) {
|
||||||
GUIErrorMessage("GobEngine::init(): Unknown version of game engine");
|
GUIErrorMessage("GobEngine::init(): Unknown version of game engine");
|
||||||
|
@ -231,6 +231,8 @@ public:
|
|||||||
bool isTrueColor() const;
|
bool isTrueColor() const;
|
||||||
bool isDemo() const;
|
bool isDemo() const;
|
||||||
|
|
||||||
|
void setTrueColor(bool trueColor);
|
||||||
|
|
||||||
GUI::Debugger *getDebugger() { return _console; }
|
GUI::Debugger *getDebugger() { return _console; }
|
||||||
|
|
||||||
const Graphics::PixelFormat &getPixelFormat() const;
|
const Graphics::PixelFormat &getPixelFormat() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user