diff options
-rw-r--r-- | engines/macventure/gui.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 5c1747cb18..1ac1d0b0f8 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -26,9 +26,6 @@ #include "macventure/macventure.h" #include "macventure/gui.h" -//Test -#include "common/system.h" - namespace MacVenture { enum MenuAction; @@ -103,8 +100,10 @@ Gui::~Gui() { void Gui::draw() { - drawWindows(); + // Will be performance-improved after the milestone + _wm.setFullRefresh(true); + drawWindows(); drawTitle(); _wm.draw(); @@ -225,7 +224,6 @@ void Gui::initGUI() { if (!loadControls()) error("Could not load controls"); - draw(); } @@ -506,6 +504,8 @@ void Gui::drawMainGameWindow() { Graphics::ManagedSurface *srf = _mainGameWindow->getSurface(); BorderBounds border = borderBounds(getWindowData(kMainGameWindow).type); + _mainGameWindow->setDirty(true); + if (!_assets.contains(3)) { _assets[3] = new ImageAsset(3, _graphics); } @@ -518,11 +518,6 @@ void Gui::drawMainGameWindow() { drawObjectsInWindow(kMainGameWindow, _mainGameWindow->getSurface()); - // To be deleted - _wm.draw(); - - g_system->updateScreen(); - } void Gui::drawSelfWindow() { @@ -549,11 +544,8 @@ void Gui::drawObjectsInWindow(WindowReference target, Graphics::ManagedSurface * border.topOffset * 2 + pos.y, mode); - // To be deleted + // To be deleted, this is a big hack, but it doesn't work without it. _wm.draw(); - - g_system->updateScreen(); - } } |