[Scummvm-git-logs] scummvm master -> 3de75901c3826ad64c7d80f0d1c870bd6055e54f

bonki bonki at users.noreply.github.com
Wed Mar 14 19:27:13 CET 2018


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:
3de75901c3 TUCKER: Fix wrong sound effects being played


Commit: 3de75901c3826ad64c7d80f0d1c870bd6055e54f
    https://github.com/scummvm/scummvm/commit/3de75901c3826ad64c7d80f0d1c870bd6055e54f
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-03-14T19:26:30+01:00

Commit Message:
TUCKER: Fix wrong sound effects being played

Fixes Trac#6376, Trac#6377 and probably many more unreported instances
of wrong audio samples being played.

Changed paths:
    engines/tucker/resource.cpp


diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index cab26a0..0ea24ad 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -900,6 +900,21 @@ void TuckerEngine::loadFx() {
 				break;
 			}
 			if (s->_type == 8) {
+				// type 8 is basically a pointer to another type 6 sample
+
+				// WORKAROUND
+				// There is at least one instance (namely in location 40) where the reference
+				// is to another sample which has not yet been read in.
+				// It seems that the original doesn't properly handle this case which
+				// results in the sample not being played at all.
+				// We just ignore and hop over these.
+				if (s->_num >= i) {
+					--i;
+					continue;
+				}
+
+				assert(s->_num >= 0 && s ->_num < i);
+				s->_num  = _locationSoundsTable[s->_num]._num;
 				s->_type = 6;
 			}
 		}
@@ -924,6 +939,7 @@ void TuckerEngine::loadFx() {
 	} else {
 		error("loadFx() - Index not found for location %d", _locationNum);
 	}
+
 }
 
 void TuckerEngine::loadSound(Audio::Mixer::SoundType type, int num, int volume, bool loop, Audio::SoundHandle *handle) {





More information about the Scummvm-git-logs mailing list