diff options
author | Strangerke | 2011-06-29 16:15:41 +0200 |
---|---|---|
committer | Strangerke | 2011-06-29 16:15:41 +0200 |
commit | b0c9c9122fc678074aba30068e5b36d347208e65 (patch) | |
tree | 79a99db08ec985f2e5f1e216823b1104d5b753fb /engines/mohawk/riven.cpp | |
parent | f2f3124246a77036f843dee2d83ad28084234ebc (diff) | |
parent | c32a3ea0d30336771bab460ecccb58c4614e6294 (diff) | |
download | scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.gz scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.bz2 scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.zip |
Merge branch 'master' of github.com:scummvm/scummvm into soltys_wip2
Diffstat (limited to 'engines/mohawk/riven.cpp')
-rw-r--r-- | engines/mohawk/riven.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 57a0ac717d..612b8b3685 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -143,7 +143,7 @@ Common::Error MohawkEngine_Riven::run() { _extrasFile = new MohawkArchive(); // We need extras.mhk for inventory images, marble images, and credits images - if (!_extrasFile->open("extras.mhk")) { + if (!_extrasFile->openFile("extras.mhk")) { Common::String message = "You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works."; GUIErrorMessage(message); warning("%s", message.c_str()); @@ -178,7 +178,7 @@ Common::Error MohawkEngine_Riven::run() { changeToCard(1); } - + while (!_gameOver && !shouldQuit()) handleEvents(); @@ -317,7 +317,7 @@ void MohawkEngine_Riven::changeToStack(uint16 n) { Common::String filename = Common::String(prefix) + endings[i]; MohawkArchive *mhk = new MohawkArchive(); - if (mhk->open(filename)) + if (mhk->openFile(filename)) _mhk.push_back(mhk); else delete mhk; @@ -436,7 +436,7 @@ void MohawkEngine_Riven::loadCard(uint16 id) { void MohawkEngine_Riven::loadHotspots(uint16 id) { // Clear old hotspots delete[] _hotspots; - + // NOTE: The hotspot scripts are cleared by the RivenScriptManager automatically. Common::SeekableReadStream *inStream = getResource(ID_HSPT, id); @@ -460,8 +460,8 @@ void MohawkEngine_Riven::loadHotspots(uint16 id) { // - tspit 371 (DVD: 377), hotspot 4 if (left >= right || top >= bottom) { warning("%s %d hotspot %d is invalid: (%d, %d, %d, %d)", getStackName(_curStack).c_str(), _curCard, i, left, top, right, bottom); - left = top = right = bottom = 0; - _hotspots[i].enabled = 0; + left = top = right = bottom = 0; + _hotspots[i].enabled = 0; } _hotspots[i].rect = Common::Rect(left, top, right, bottom); @@ -833,6 +833,19 @@ void MohawkEngine_Riven::installCardTimer() { } } +void MohawkEngine_Riven::doVideoTimer(VideoHandle handle, bool force) { + assert(handle != NULL_VID_HANDLE); + + uint16 id = _scriptMan->getStoredMovieOpcodeID(); + + if (handle != _video->findVideoHandleRiven(id)) // Check if we've got a video match + return; + + // Run the opcode if we can at this point + if (force || _video->getElapsedTime(handle) >= _scriptMan->getStoredMovieOpcodeTime()) + _scriptMan->runStoredMovieOpcode(); +} + bool ZipMode::operator== (const ZipMode &z) const { return z.name == name && z.id == id; } |