[Scummvm-cvs-logs] scummvm master -> 955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5

clone2727 clone2727 at gmail.com
Tue Mar 4 03:07:08 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
955b8194db MOHAWK: Fix Riven movie volume clipping


Commit: 955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5
    https://github.com/scummvm/scummvm/commit/955b8194db0f1c3c852aa91cfb35ec7a2d04e7a5
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2014-03-03T18:06:25-08:00

Commit Message:
MOHAWK: Fix Riven movie volume clipping

Changed paths:
    engines/mohawk/video.cpp
    engines/mohawk/video.h



diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index a2c1871..cebb72e 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();
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index bd9a180..43181e3 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -122,7 +122,7 @@ private:
 	// Keep tabs on any videos playing
 	Common::Array<VideoEntry> _videoStreams;
 
-	VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume = 0xff);
+	VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, uint16 volume = 0xff);
 	VideoHandle createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop, byte volume = 0xff);
 };
 






More information about the Scummvm-git-logs mailing list