aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-05-27 21:19:53 -0400
committerMatthew Hoops2012-05-28 14:05:17 -0400
commitd67f9b89f275ddb092d0b833b7ca9adf6a722c5a (patch)
tree23e7ce3ee2f4e8e1f10a44d7bf4e80bc3396f4fa
parent10f7e805c20c164a7b3a20832237341136165e28 (diff)
downloadscummvm-rg350-d67f9b89f275ddb092d0b833b7ca9adf6a722c5a.tar.gz
scummvm-rg350-d67f9b89f275ddb092d0b833b7ca9adf6a722c5a.tar.bz2
scummvm-rg350-d67f9b89f275ddb092d0b833b7ca9adf6a722c5a.zip
MOHAWK: Use video volume control in Riven
-rw-r--r--engines/mohawk/video.cpp8
-rw-r--r--engines/mohawk/video.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index 83fca9ac35..c10b986c60 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -315,7 +315,7 @@ VideoHandle VideoManager::playMovieRiven(uint16 id) {
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id) {
debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping");
- return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0);
+ return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0, _mlstRecords[i].volume);
}
return NULL_VID_HANDLE;
@@ -371,7 +371,7 @@ void VideoManager::disableAllMovies() {
_videoStreams[i].enabled = false;
}
-VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop) {
+VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume) {
// First, check to see if that video is already playing
for (uint32 i = 0; i < _videoStreams.size(); i++)
if (_videoStreams[i].id == id)
@@ -381,6 +381,7 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool
Video::QuickTimeDecoder *decoder = new Video::QuickTimeDecoder();
decoder->setChunkBeginOffset(_vm->getResourceOffset(ID_TMOV, id));
decoder->loadStream(_vm->getResource(ID_TMOV, id));
+ decoder->setVolume(volume);
VideoEntry entry;
entry.clear();
@@ -403,7 +404,7 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool
return _videoStreams.size() - 1;
}
-VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop) {
+VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop, byte volume) {
// First, check to see if that video is already playing
for (uint32 i = 0; i < _videoStreams.size(); i++)
if (_videoStreams[i].filename == filename)
@@ -426,6 +427,7 @@ VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint
}
entry->loadStream(file);
+ entry->setVolume(volume);
// Search for any deleted videos so we can take a formerly used slot
for (uint32 i = 0; i < _videoStreams.size(); i++)
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index 8736782d7a..98bcadfb53 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -120,8 +120,8 @@ private:
// Keep tabs on any videos playing
Common::Array<VideoEntry> _videoStreams;
- VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop);
- VideoHandle createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop);
+ VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume = 0xff);
+ VideoHandle createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop, byte volume = 0xff);
};
} // End of namespace Mohawk