diff options
Diffstat (limited to 'engines/wage')
-rw-r--r-- | engines/wage/gui-console.cpp | 3 | ||||
-rw-r--r-- | engines/wage/gui.cpp | 15 | ||||
-rw-r--r-- | engines/wage/gui.h | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp index 5f9cfe5519..840b8e3ced 100644 --- a/engines/wage/gui-console.cpp +++ b/engines/wage/gui-console.cpp @@ -142,7 +142,7 @@ void Gui::flowText(Common::String &str) { draw(); } -void Gui::renderConsole(Graphics::ManagedSurface *g, Common::Rect &r) { +void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) { bool fullRedraw = _consoleFullRedraw; bool textReflow = false; int surfW = r.width() + kConWOverlap * 2; @@ -279,7 +279,6 @@ void Gui::renderConsole(Graphics::ManagedSurface *g, Common::Rect &r) { rr.bottom = _screen.h - 1; g->copyRectToSurface(_console, xcon, ycon, boundsR); - g_system->copyRectToScreen(g->getBasePtr(rr.left, rr.top), g->pitch, rr.left, rr.top, rr.width(), rr.height()); } void Gui::drawInput() { diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index f66397e933..436d17c56f 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -291,14 +291,11 @@ void Gui::drawScene() { _screen.pitch, _scene->_designBounds->left - 2, _scene->_designBounds->top - 2, _scene->_designBounds->width(), _scene->_designBounds->height()); - _sceneDirty = true; _consoleDirty = true; _menuDirty = true; _consoleFullRedraw = true; - //_scene->paint(&_screen, _scene->_designBounds->left, _scene->_designBounds->top); - _sceneArea.left = _scene->_designBounds->left + kBorderWidth - 2; _sceneArea.top = _scene->_designBounds->top + kBorderWidth - 2; _sceneArea.setWidth(_scene->_designBounds->width() - 2 * kBorderWidth); @@ -308,8 +305,6 @@ void Gui::drawScene() { _consoleTextArea.top = _scene->_textBounds->top + kBorderWidth - 2; _consoleTextArea.setWidth(_scene->_textBounds->width() - 2 * kBorderWidth); _consoleTextArea.setHeight(_scene->_textBounds->height() - 2 * kBorderWidth); - - //paintBorder(&_screen, _sceneArea, kWindowScene); } // Render console @@ -317,8 +312,14 @@ void Gui::drawConsole() { if (!_consoleDirty && !_consoleFullRedraw && !_bordersDirty && !_sceneDirty) return; - renderConsole(&_screen, _consoleTextArea); - paintBorder(&_screen, _consoleTextArea, kWindowConsole); + MacWindow *w = _wm.getWindow(_consoleWindowId); + w->setDimensions(*_scene->_textBounds); + renderConsole(w->getSurface(), Common::Rect(kBorderWidth - 2, kBorderWidth - 2, + _scene->_textBounds->width() - kBorderWidth, _scene->_textBounds->height() - kBorderWidth)); + w->draw(&_screen); + 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/gui.h b/engines/wage/gui.h index 9d59e33bc2..dc3a593bda 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -119,7 +119,7 @@ private: void drawDesktop(); void paintBorder(Graphics::ManagedSurface *g, Common::Rect &r, WindowType windowType, int highlightedPart = kBorderNone, float scrollPos = 0.0, float scrollSize = 0.0); - void renderConsole(Graphics::ManagedSurface *g, Common::Rect &r); + void renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r); void drawBox(Graphics::ManagedSurface *g, int x, int y, int w, int h); void fillRect(Graphics::ManagedSurface *g, int x, int y, int w, int h, int color = kColorBlack); void loadFonts(); |