aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-06-02 22:33:47 -0400
committerPaul Gilbert2013-06-02 22:33:47 -0400
commit2a2e1a08cf07b6e1d2fed86e64fb8b71575bbd6c (patch)
tree73f247d7a182d538317df9f60d927d350ad3b60b
parentf70fd947327495b8c4ff9e595c1371dbcd43cd3f (diff)
downloadscummvm-rg350-2a2e1a08cf07b6e1d2fed86e64fb8b71575bbd6c.tar.gz
scummvm-rg350-2a2e1a08cf07b6e1d2fed86e64fb8b71575bbd6c.tar.bz2
scummvm-rg350-2a2e1a08cf07b6e1d2fed86e64fb8b71575bbd6c.zip
VOYEUR: Fix to event manager delays and screen updates methods
-rw-r--r--engines/voyeur/events.cpp7
-rw-r--r--engines/voyeur/graphics.cpp4
-rw-r--r--engines/voyeur/voyeur.cpp1
3 files changed, 10 insertions, 2 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 3202cb3b1f..7a9bd5aa55 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -81,6 +81,11 @@ void EventsManager::checkForNextFrameCounter() {
++_gameCounter;
_priorFrameTime = milli;
+ // Display the frame
+ g_system->copyRectToScreen((byte *)_vm->_graphicsManager._screenSurface.pixels,
+ SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ g_system->updateScreen();
+
// Signal the ScummVM debugger
_vm->_debugger.onFrame();
}
@@ -91,6 +96,8 @@ void EventsManager::delay(int totalMilli) {
while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd) {
g_system->delayMillis(10);
+
+ pollEvents();
}
}
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index da077941ff..fb32e75b91 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -37,7 +37,7 @@ GraphicsManager::GraphicsManager() {
_sImageShift = 3;
_palFlag = false;
_MCGAMode = false;
- _saveBack = false;
+ _saveBack = true;
_clipPtr = NULL;
_viewPortListPtr = NULL;
_vPort = NULL;
@@ -396,7 +396,7 @@ void GraphicsManager::restoreBack(Common::Array<Common::Rect> &rectList, int rec
if (rectListCount == -1) {
sDrawPic(srcPic, destPic, Common::Point());
} else {
- for (int i = rectListCount; i >= 0; --i) {
+ for (int i = rectListCount - 1; i >= 0; --i) {
_clipPtr = &rectList[i];
sDrawPic(srcPic, destPic, Common::Point());
}
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index ea3e3ceb9a..79fb2fb0ca 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -151,6 +151,7 @@ void VoyeurEngine::doHeadTitle() {
_eventsManager.sWaitFlip();
// TODO:
+ _eventsManager.delay(1000);
}
}