aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/gui.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-18 10:36:09 +0200
committerEugene Sandulenko2016-04-18 13:11:48 +0200
commit024d1305a21e61e431ecdc9cdcda6fada2dd08bb (patch)
tree6e38fb6344fc6e1e85eea3426e0d0c165760100f /engines/wage/gui.cpp
parent56a20ef92645e578a94fc074164b7683167bf285 (diff)
downloadscummvm-rg350-024d1305a21e61e431ecdc9cdcda6fada2dd08bb.tar.gz
scummvm-rg350-024d1305a21e61e431ecdc9cdcda6fada2dd08bb.tar.bz2
scummvm-rg350-024d1305a21e61e431ecdc9cdcda6fada2dd08bb.zip
WAGE: Manage window redraws in the WM
Diffstat (limited to 'engines/wage/gui.cpp')
-rw-r--r--engines/wage/gui.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 436d17c56f..6cb762851d 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -154,6 +154,8 @@ Gui::Gui(WageEngine *engine) {
_consoleFullRedraw = true;
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
+ _wm.setScreen(&_screen);
+
_scrollPos = 0;
_consoleLineHeight = 8; // Dummy value which makes sense
_consoleNumLines = 24; // Dummy value
@@ -287,6 +289,7 @@ void Gui::drawScene() {
w->setTitle(_scene->_name);
_scene->paint(w->getSurface(), 0, 0);
w->draw(&_screen);
+ w->setDirty(true);
g_system->copyRectToScreen(_screen.getBasePtr(_scene->_designBounds->left - 2, _scene->_designBounds->top - 2),
_screen.pitch, _scene->_designBounds->left - 2, _scene->_designBounds->top - 2,
_scene->_designBounds->width(), _scene->_designBounds->height());
@@ -317,6 +320,7 @@ void Gui::drawConsole() {
renderConsole(w->getSurface(), Common::Rect(kBorderWidth - 2, kBorderWidth - 2,
_scene->_textBounds->width() - kBorderWidth, _scene->_textBounds->height() - kBorderWidth));
w->draw(&_screen);
+ w->setDirty(true);
g_system->copyRectToScreen(_screen.getBasePtr(_scene->_textBounds->left - 2, _scene->_textBounds->top - 2),
_screen.pitch, _scene->_textBounds->left - 2, _scene->_textBounds->top - 2,
_scene->_textBounds->width(), _scene->_textBounds->height());