aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-11 15:38:19 +0100
committerEugene Sandulenko2019-12-11 21:45:55 +0100
commit5251a67032729db26863d712d8ea5689a7b8962b (patch)
tree5550cda56e9d1cc2929492c4419b1d8ec1fa4241 /engines/director
parenteb0c4526fdff46f90d4b43ffd17fbdb221c48718 (diff)
downloadscummvm-rg350-5251a67032729db26863d712d8ea5689a7b8962b.tar.gz
scummvm-rg350-5251a67032729db26863d712d8ea5689a7b8962b.tar.bz2
scummvm-rg350-5251a67032729db26863d712d8ea5689a7b8962b.zip
DIRECTOR: Optimize screen copying for zoomBoxes
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/frame.cpp3
-rw-r--r--engines/director/score.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index a68fca4482..14951cf1a6 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -419,7 +419,8 @@ void Frame::prepareFrame(Score *score) {
playSoundChannel();
}
- score->_backSurface->copyFrom(*score->_surface);
+ if (_vm->getCurrentScore()->haveZoomBox())
+ score->_backSurface->copyFrom(*score->_surface);
g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, score->_surface->getBounds().width(), score->_surface->getBounds().height());
}
diff --git a/engines/director/score.h b/engines/director/score.h
index 388c14e73b..bc7a41a733 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -105,6 +105,7 @@ public:
void addZoomBox(ZoomBox *box);
void renderZoomBox(bool redraw = false);
+ bool haveZoomBox() { return !_zoomBoxes.empty(); }
private:
void update();