aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorja Lorente2016-06-22 22:09:10 +0200
committerBorja Lorente2016-08-14 18:34:11 +0200
commit0fb344dfeda53e81a70e89be45bda6d5c0614e7e (patch)
tree02f1d3d2aeea2ceb735f1e7529367a6c9aa7d0ee
parent1540674f7720f520bdb585999e24ceb653c9bda3 (diff)
downloadscummvm-rg350-0fb344dfeda53e81a70e89be45bda6d5c0614e7e.tar.gz
scummvm-rg350-0fb344dfeda53e81a70e89be45bda6d5c0614e7e.tar.bz2
scummvm-rg350-0fb344dfeda53e81a70e89be45bda6d5c0614e7e.zip
MACVENTURE: Hack for dynamic object drawing
-rw-r--r--engines/macventure/gui.cpp20
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();
-
}
}