From c8b8a2c9ee3420c0f36acde345737cee226ba845 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 27 Sep 2015 11:53:23 +0200 Subject: TUCKER: Fix overflow in volume calculation This affected Bud's line, "Is that the great mystery invention you had hidden away?" in the intro, making it very hard to hear, and possibly other sounds as well. I don't know if this was a bug in the original game, but it's much closer to the English version I own now. --- engines/tucker/tucker.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/tucker') diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h index a423915a5f..3bbf6a57f5 100644 --- a/engines/tucker/tucker.h +++ b/engines/tucker/tucker.h @@ -246,6 +246,15 @@ private: }; inline int scaleMixerVolume(int volume, int max = 100) { + if (volume > max) { + // This happens for instance for Bud's line, "Is that the + // great mystery invention you had hidden away?" in the intro, + // which is played at volume 110 out of 100. This made it very + // hard to hear. I'm not sure if this was a bug in the original + // game, or if it had the ability to amplify sounds. + warning("scaleMixerVolume: Adjusting volume %d to %d", volume, max); + volume = max; + } return volume * Audio::Mixer::kMaxChannelVolume / max; } -- cgit v1.2.3 From d6aa2494e0b38c318c7a1fe54c4eaaebce823677 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 27 Sep 2015 11:56:46 +0200 Subject: TUCKER: Add missing music to the intro I'm told not every version of the game plays this. Mine does though, and I see no harm in adding it for all versions. The code is robust enough to work even if the "introdub.raw" file is missing completely. --- engines/tucker/staticres.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/tucker') diff --git a/engines/tucker/staticres.cpp b/engines/tucker/staticres.cpp index b884851d7e..b9f6a6efee 100644 --- a/engines/tucker/staticres.cpp +++ b/engines/tucker/staticres.cpp @@ -329,8 +329,13 @@ static const SoundSequenceData _soundDataSeq19_20[] = { { 53, 2, 14, 100, 1 }, { 78, 2, 0, 100, 2 }, { 80, 0, 0, 100, 4 }, }; +// I've been told that there are versions of the game that don't play the +// "introdub" music (130) for the first scene of the intro. The English "Euro +// power pack" release does however, and I see no harm in doing it for every +// version here. The volume is just a guess, though. + const SoundSequenceDataList AnimationSequencePlayer::_soundSeqDataList[] = { - { 0, 0, 14, 10, 58, _soundDataSeq3_4 }, + { 130, 80, 14, 10, 58, _soundDataSeq3_4 }, { 0, 0, 14, 5, 60, _soundDataSeq9_10 }, { 0, 0, 14, 9, 48, _soundDataSeq21_20 }, { 1, 80, 14, 4, 25, _soundDataSeq13_14 }, @@ -471,6 +476,7 @@ const char *const AnimationSequencePlayer::_audioFileNamesTable[] = { "rdfx38.wav", "rdfx8.wav", "rdfx9.wav", + "introdub.raw", }; } // namespace Tucker -- cgit v1.2.3