aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/video.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2014-03-03 21:05:59 -0500
committerMatthew Hoops2014-03-03 21:06:25 -0500
commit955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5 (patch)
treedfbb67ebc7feb31f58b6c8a3ab47a73af4a665cf /engines/mohawk/video.cpp
parentec0f420299eec4aa07a5ca7ae85451273bd04ee1 (diff)
downloadscummvm-rg350-955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5.tar.gz
scummvm-rg350-955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5.tar.bz2
scummvm-rg350-955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5.zip
MOHAWK: Fix Riven movie volume clipping
Diffstat (limited to 'engines/mohawk/video.cpp')
-rw-r--r--engines/mohawk/video.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index a2c18718b7..cebb72e24f 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -316,7 +316,7 @@ void VideoManager::clearMLST() {
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");
+ debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s, Volume = %d", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping", _mlstRecords[i].volume);
return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0, _mlstRecords[i].volume);
}
@@ -326,7 +326,7 @@ VideoHandle VideoManager::playMovieRiven(uint16 id) {
void VideoManager::playMovieBlockingRiven(uint16 id) {
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id) {
- debug(1, "Play tMOV %d (blocking) at (%d, %d)", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top);
+ debug(1, "Play tMOV %d (blocking) at (%d, %d), Volume = %d", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].volume);
VideoHandle videoHandle = createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, false);
waitUntilMovieEnds(videoHandle);
return;
@@ -373,7 +373,7 @@ void VideoManager::disableAllMovies() {
_videoStreams[i].enabled = false;
}
-VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume) {
+VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, uint16 volume) {
// First, check to see if that video is already playing
for (uint32 i = 0; i < _videoStreams.size(); i++)
if (_videoStreams[i].id == id)
@@ -383,7 +383,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);
+ decoder->setVolume((volume >= 256) ? 255 : volume);
VideoEntry entry;
entry.clear();