[Scummvm-cvs-logs] SF.net SVN: scummvm:[35245] scummvm/trunk/engines/saga/render.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Dec 4 22:09:28 CET 2008
Revision: 35245
http://scummvm.svn.sourceforge.net/scummvm/?rev=35245&view=rev
Author: thebluegr
Date: 2008-12-04 21:09:24 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
Do not redraw the whole scene if an overlay is drawn above it
Modified Paths:
--------------
scummvm/trunk/engines/saga/render.cpp
Modified: scummvm/trunk/engines/saga/render.cpp
===================================================================
--- scummvm/trunk/engines/saga/render.cpp 2008-12-04 20:18:50 UTC (rev 35244)
+++ scummvm/trunk/engines/saga/render.cpp 2008-12-04 21:09:24 UTC (rev 35245)
@@ -93,7 +93,12 @@
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 @@
// 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list