aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/widgets/gamewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mutationofjb/widgets/gamewidget.cpp')
-rw-r--r--engines/mutationofjb/widgets/gamewidget.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/engines/mutationofjb/widgets/gamewidget.cpp b/engines/mutationofjb/widgets/gamewidget.cpp
index 603736729e..77375a7c5c 100644
--- a/engines/mutationofjb/widgets/gamewidget.cpp
+++ b/engines/mutationofjb/widgets/gamewidget.cpp
@@ -57,6 +57,18 @@ void GameWidget::clearState() {
void GameWidget::draw(Graphics::ManagedSurface &) {
Room &room = _gui.getGame().getRoom();
+ // Full redraw using background buffer.
+ if (_dirtyBits == DIRTY_ALL) {
+ room.redraw();
+ return;
+ }
+
+ // Full redraw without background buffer.
+ if (_dirtyBits & DIRTY_AFTER_SCENE_CHANGE) {
+ room.redraw(false); // Don't use background buffer.
+ return;
+ }
+
// Only selection changed.
if (_dirtyBits & DIRTY_MAP_SELECTION) {
if (_currentMapObjectId != _nextMapObjectId) {
@@ -69,12 +81,6 @@ void GameWidget::draw(Graphics::ManagedSurface &) {
_currentMapObjectId = _nextMapObjectId;
}
}
-
- // Full redraw.
- if (_dirtyBits == DIRTY_ALL) {
- room.redraw();
- return;
- }
}
void GameWidget::handleNormalScene(const Common::Event &event) {