aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/console.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-07-17 06:34:25 +0200
committerBastien Bouclet2017-07-22 20:38:56 +0200
commit64303abb07c058a92ebe1ab8d91dc0c85b1ec432 (patch)
tree9f35f12d6cf63bf3b7053d582728a8846cf82ff4 /engines/mohawk/console.cpp
parent9cb6c872b7ffb2a852a81c19369dcae4f8b6c8ed (diff)
downloadscummvm-rg350-64303abb07c058a92ebe1ab8d91dc0c85b1ec432.tar.gz
scummvm-rg350-64303abb07c058a92ebe1ab8d91dc0c85b1ec432.tar.bz2
scummvm-rg350-64303abb07c058a92ebe1ab8d91dc0c85b1ec432.zip
MOHAWK: Myst: Update the screen only once per frame
Change all inner loops to call the same frame function. Remove the draw delay code. Now that we have proper frame pacing it is not necessary anymore to wait before drawing to make sure the previous frame stayed on the screen long enough. Fixes #9915, #9922, #9923.
Diffstat (limited to 'engines/mohawk/console.cpp')
-rw-r--r--engines/mohawk/console.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index cfabbd304d..374e2a51d9 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -194,7 +194,6 @@ bool MystConsole::Cmd_DrawImage(int argc, const char **argv) {
rect = Common::Rect((uint16)atoi(argv[2]), (uint16)atoi(argv[3]), (uint16)atoi(argv[4]), (uint16)atoi(argv[5]));
_vm->_gfx->copyImageToScreen((uint16)atoi(argv[1]), rect);
- _vm->_system->updateScreen();
return false;
}
@@ -348,9 +347,7 @@ bool MystConsole::Cmd_QuickTest(int argc, const char **argv) {
debug("Loading card %d", ids[j]);
_vm->changeToCard(ids[j], kTransitionCopy);
- _vm->_video->updateMovies();
- _vm->_scriptParser->runPersistentScripts();
- _vm->_system->updateScreen();
+ _vm->doFrame();
int16 resIndex = _vm->_rnd->getRandomNumber(_vm->_resources.size()) - 1;
if (resIndex >= 0 && _vm->_resources[resIndex]->isEnabled()) {
@@ -358,9 +355,7 @@ bool MystConsole::Cmd_QuickTest(int argc, const char **argv) {
_vm->_resources[resIndex]->handleMouseUp();
}
- _vm->_video->updateMovies();
- _vm->_scriptParser->runPersistentScripts();
- _vm->_system->updateScreen();
+ _vm->doFrame();
if (_vm->getCurStack() != i) {
// Clicking may have linked us to another age