diff options
author | Bastien Bouclet | 2017-02-04 14:34:45 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | f0267d542f860a2f67f519a1dc5343e020927c81 (patch) | |
tree | bd4dac2d31f30dbe1512baf3738c315d16469240 /engines/mohawk/riven.cpp | |
parent | 7609ec0de81d7be4ed6d0e3e6e0303f42d54ad52 (diff) | |
download | scummvm-rg350-f0267d542f860a2f67f519a1dc5343e020927c81.tar.gz scummvm-rg350-f0267d542f860a2f67f519a1dc5343e020927c81.tar.bz2 scummvm-rg350-f0267d542f860a2f67f519a1dc5343e020927c81.zip |
MOHAWK: Keep turning pages while the mouse is pressed in Atrus' book
Diffstat (limited to 'engines/mohawk/riven.cpp')
-rw-r--r-- | engines/mohawk/riven.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 116b1e8688..1c40acd135 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -185,12 +185,12 @@ Common::Error MohawkEngine_Riven::run() { while (!shouldQuit()) - handleEvents(); + doFrame(); return Common::kNoError; } -void MohawkEngine_Riven::handleEvents() { +void MohawkEngine_Riven::doFrame() { // Update background running things checkTimer(); _sound->updateSLST(); @@ -277,6 +277,12 @@ void MohawkEngine_Riven::handleEvents() { _card->onMouseUpdate(); + if (!_scriptMan->runningQueuedScripts()) { + // Don't run queued scripts if we are calling from a queued script + // otherwise infinite looping will happen. + _scriptMan->runQueuedScripts(); + } + // Update the screen if we need to if (needsUpdate) _system->updateScreen(); @@ -553,6 +559,22 @@ bool MohawkEngine_Riven::isZipVisitedCard(const Common::String &hotspotName) con return foundMatch; } +bool MohawkEngine_Riven::canLoadGameStateCurrently() { + return !(getFeatures() & GF_DEMO); +} + +bool MohawkEngine_Riven::canSaveGameStateCurrently() { + if (getFeatures() & GF_DEMO) { + return false; + } + + if (_scriptMan->hasQueuedScripts()) { + return false; + } + + return true; +} + bool ZipMode::operator== (const ZipMode &z) const { return z.name == name && z.id == id; } |