diff options
author | Bastien Bouclet | 2017-07-30 17:30:50 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-07-30 17:42:01 +0200 |
commit | 07aaed5659e352db1ddece44e715a854159d58ec (patch) | |
tree | 03dfa6ebbfe81c60b79d7bbc55fa9295f8b2f4a9 /engines/mohawk/myst.cpp | |
parent | 4fee9a492ea9db7fd3c7830e2e07b7d79808bbdc (diff) | |
download | scummvm-rg350-07aaed5659e352db1ddece44e715a854159d58ec.tar.gz scummvm-rg350-07aaed5659e352db1ddece44e715a854159d58ec.tar.bz2 scummvm-rg350-07aaed5659e352db1ddece44e715a854159d58ec.zip |
MOHAWK: Myst: Set the mixer sound type to SFX for videos
Also simplify video filename construction.
Diffstat (limited to 'engines/mohawk/myst.cpp')
-rw-r--r-- | engines/mohawk/myst.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index 9ce38b92b5..bd4af66360 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -225,11 +225,27 @@ Common::String MohawkEngine_Myst::wrapMovieFilename(const Common::String &movieN return Common::String("qtw/") + prefix + movieName + ".mov"; } +VideoEntryPtr MohawkEngine_Myst::playMovie(const Common::String &name, MystStack stack) { + Common::String filename = wrapMovieFilename(name, stack); + VideoEntryPtr video = _video->playMovie(filename, Audio::Mixer::kSFXSoundType); -void MohawkEngine_Myst::playMovieBlocking(const Common::String &fileName, uint16 x, uint16 y) { - VideoEntryPtr video = _video->playMovie(fileName); if (!video) { - error("Failed to open the '%s' movie", fileName.c_str()); + error("Failed to open the '%s' movie", filename.c_str()); + } + + return video; +} + +VideoEntryPtr MohawkEngine_Myst::findVideo(const Common::String &name, MystStack stack) { + Common::String filename = wrapMovieFilename(name, stack); + return _video->findVideo(filename); +} + +void MohawkEngine_Myst::playMovieBlocking(const Common::String &name, MystStack stack, uint16 x, uint16 y) { + Common::String filename = wrapMovieFilename(name, stack); + VideoEntryPtr video = _video->playMovie(filename, Audio::Mixer::kSFXSoundType); + if (!video) { + error("Failed to open the '%s' movie", filename.c_str()); } video->moveTo(x, y); @@ -237,10 +253,11 @@ void MohawkEngine_Myst::playMovieBlocking(const Common::String &fileName, uint16 waitUntilMovieEnds(video); } -void MohawkEngine_Myst::playMovieBlockingCentered(const Common::String &fileName) { - VideoEntryPtr video = _video->playMovie(fileName); +void MohawkEngine_Myst::playFlybyMovie(const Common::String &name) { + Common::String filename = wrapMovieFilename(name, kMasterpieceOnly); + VideoEntryPtr video = _video->playMovie(filename, Audio::Mixer::kSFXSoundType); if (!video) { - error("Failed to open the '%s' movie", fileName.c_str()); + error("Failed to open the '%s' movie", filename.c_str()); } // Clear screen @@ -579,7 +596,7 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS } if (flyby) { - playMovieBlockingCentered(wrapMovieFilename(flyby, kMasterpieceOnly)); + playFlybyMovie(flyby); } } |