diff options
author | Filippos Karapetis | 2008-12-04 21:09:24 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-04 21:09:24 +0000 |
commit | c2d095b42662da599019f3a5c4aaf0ecf9c85fd3 (patch) | |
tree | 3c7e07986ea5bee4a9f7edc6b0aa7921fee56e12 | |
parent | faf8059cac63ade78ef9c1d1c40f3b0dac871333 (diff) | |
download | scummvm-rg350-c2d095b42662da599019f3a5c4aaf0ecf9c85fd3.tar.gz scummvm-rg350-c2d095b42662da599019f3a5c4aaf0ecf9c85fd3.tar.bz2 scummvm-rg350-c2d095b42662da599019f3a5c4aaf0ecf9c85fd3.zip |
Do not redraw the whole scene if an overlay is drawn above it
svn-id: r35245
-rw-r--r-- | engines/saga/render.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp index 937969514c..623a425f75 100644 --- a/engines/saga/render.cpp +++ b/engines/saga/render.cpp @@ -93,7 +93,12 @@ void Render::drawScene() { mousePoint = _vm->mousePos(); if (!(_flags & (RF_DEMO_SUBST | RF_MAP) || curMode == kPanelPlacard)) { - if (_vm->_interface->getFadeMode() != kFadeOut) { + // Do not redraw the whole scene and the actors if the scene is fading out or + // if an overlay is drawn above it (e.g. the options menu) + if (_vm->_interface->getFadeMode() != kFadeOut && + (curMode != kPanelOption && curMode != kPanelQuit && + curMode != kPanelLoad && curMode != kPanelSave && + curMode != kPanelProtect)) { // Display scene background if (!(_flags & RF_DISABLE_ACTORS) || _vm->getGameType() == GType_ITE) _vm->_scene->draw(); @@ -169,17 +174,12 @@ void Render::drawScene() { // Display "paused game" message, if applicable if (_flags & RF_RENDERPAUSE) { - if (_vm->getGameType() == GType_ITE) { - textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(kKnownFontPause, pauseStringITE, 0, kFontOutline)) / 2; - textPoint.y = 90; + const char *pauseString = (_vm->getGameType() == GType_ITE) ? pauseStringITE : pauseStringIHNM; + textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(kKnownFontPause, pauseString, 0, kFontOutline)) / 2; + textPoint.y = 90; - _vm->_font->textDraw(kKnownFontPause, backBufferSurface, pauseStringITE, textPoint, _vm->KnownColor2ColorId(kKnownColorBrightWhite), _vm->KnownColor2ColorId(kKnownColorBlack), kFontOutline); - } else { - textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(kKnownFontPause, pauseStringIHNM, 0, kFontOutline)) / 2; - textPoint.y = 90; - - _vm->_font->textDraw(kKnownFontPause, backBufferSurface, pauseStringIHNM, textPoint, _vm->KnownColor2ColorId(kKnownColorBrightWhite), _vm->KnownColor2ColorId(kKnownColorBlack), kFontOutline); - } + _vm->_font->textDraw(kKnownFontPause, backBufferSurface, pauseString, textPoint, + _vm->KnownColor2ColorId(kKnownColorBrightWhite), _vm->KnownColor2ColorId(kKnownColorBlack), kFontOutline); } // Update user interface |