aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMatthew Hoops2012-05-28 17:00:50 -0400
committerMatthew Hoops2012-05-28 17:00:50 -0400
commite67ba769b35afcdeded56ad7c278206ed014476d (patch)
tree045bc722e38d367a1b54e1edb1450d56fb6ae9f3 /engines/mohawk
parent9d7432a3720a646433be6fa18710720a84eda5fa (diff)
parentd54e53d4620ae1d5e08ac48022f7a286a274473f (diff)
downloadscummvm-rg350-e67ba769b35afcdeded56ad7c278206ed014476d.tar.gz
scummvm-rg350-e67ba769b35afcdeded56ad7c278206ed014476d.tar.bz2
scummvm-rg350-e67ba769b35afcdeded56ad7c278206ed014476d.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/mohawk')
-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