aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-18 18:39:45 +0200
committerEugene Sandulenko2016-04-19 09:35:49 +0200
commite5a64e7b7fae4e87d509724fcac3e5fa6d5c815e (patch)
tree05bcb4160cf4b0ad50044a7a8879b9bff54658d2 /engines/wage
parent550c16a08d0584a1dd906c60c3ba904e3b3b2121 (diff)
downloadscummvm-rg350-e5a64e7b7fae4e87d509724fcac3e5fa6d5c815e.tar.gz
scummvm-rg350-e5a64e7b7fae4e87d509724fcac3e5fa6d5c815e.tar.bz2
scummvm-rg350-e5a64e7b7fae4e87d509724fcac3e5fa6d5c815e.zip
WAGE: Draw windows with WindowManager
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/gui.cpp23
-rw-r--r--engines/wage/macwindowmanager.h2
2 files changed, 9 insertions, 16 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 6cb762851d..3afdb48853 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -249,17 +249,16 @@ void Gui::draw() {
if (_scene != _engine->_world->_player->_currentScene)
_sceneDirty = true;
- if (_sceneDirty || _bordersDirty)
+ if (_sceneDirty || _bordersDirty) {
drawDesktop();
-
- if (_sceneIsActive) {
- drawConsole();
- drawScene();
- } else {
- drawScene();
- drawConsole();
+ _wm.setFullRefresh(true);
}
+ drawScene();
+ drawConsole();
+
+ _wm.draw();
+
if (_menuDirty)
_menu->render();
@@ -288,11 +287,7 @@ void Gui::drawScene() {
w->setDimensions(*_scene->_designBounds);
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());
_sceneDirty = true;
_consoleDirty = true;
@@ -319,11 +314,7 @@ void Gui::drawConsole() {
w->setDimensions(*_scene->_textBounds);
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());
}
void Gui::drawBox(Graphics::ManagedSurface *g, int x, int y, int w, int h) {
diff --git a/engines/wage/macwindowmanager.h b/engines/wage/macwindowmanager.h
index ae4f356d12..d840799961 100644
--- a/engines/wage/macwindowmanager.h
+++ b/engines/wage/macwindowmanager.h
@@ -62,6 +62,8 @@ public:
int add(bool scrollable);
void setActive(int id);
+ void setFullRefresh(bool redraw) { _fullRefresh = true; }
+
void draw();
MacWindow *getWindow(int id) { return _windows[id]; }