aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-04 23:46:31 +0100
committerEugene Sandulenko2016-01-04 23:46:31 +0100
commitbc8b63cfb4162ceed617792ad35777504b12b37b (patch)
tree380d4941361f6185c3a641f7e08b8c678b9a1346 /engines/wage
parent2ec86f1381dad48b25038bd02303f2bc380fb8d6 (diff)
downloadscummvm-rg350-bc8b63cfb4162ceed617792ad35777504b12b37b.tar.gz
scummvm-rg350-bc8b63cfb4162ceed617792ad35777504b12b37b.tar.bz2
scummvm-rg350-bc8b63cfb4162ceed617792ad35777504b12b37b.zip
WAGE: Full redraw on scene change
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/gui.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index d8bb220aa8..7afcf2299e 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -151,9 +151,6 @@ Gui::Gui(WageEngine *engine) {
_consoleFullRedraw = true;
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
- Patterns p;
- p.push_back(checkersPattern);
-
_scrollPos = 0;
_consoleLineHeight = 8; // Dummy value which makes sense
_consoleNumLines = 24; // Dummy value
@@ -172,11 +169,6 @@ Gui::Gui(WageEngine *engine) {
_cursorIsArrow = true;
CursorMan.showMouse(true);
- // Draw desktop
- Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1);
- Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorBlack, p, 1);
- g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h);
-
loadFonts();
g_system->getTimerManager()->installTimerProc(&cursor_timer_handler, 200000, this, "wageCursor");
@@ -254,7 +246,18 @@ void Gui::appendText(String &str) {
void Gui::draw() {
if (_scene != _engine->_world->_player->_currentScene || _sceneDirty) {
_scene = _engine->_world->_player->_currentScene;
+
+ // Draw desktop
+ Patterns p;
+ p.push_back(checkersPattern);
+ Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1);
+ Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorBlack, p, 1);
+ g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h);
+
_sceneDirty = true;
+ _consoleDirty = true;
+ _menuDirty = true;
+ _consoleFullRedraw = true;
_scene->paint(&_screen, 0 + kComponentsPadding, kMenuHeight + kComponentsPadding);
@@ -279,10 +282,10 @@ void Gui::draw() {
paintBorder(&_screen, _sceneArea, kWindowScene);
// Render console
- if (_consoleDirty)
+ if (_consoleDirty || _consoleFullRedraw)
renderConsole(&_screen, _consoleTextArea);
- if (_bordersDirty || _consoleDirty)
+ if (_bordersDirty || _consoleDirty || _consoleFullRedraw)
paintBorder(&_screen, _consoleTextArea, kWindowConsole);
if (_menuDirty)