From 7126374b428ebb2feb7b431bdf5c906482d248dd Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 28 Oct 2014 18:15:41 +0100 Subject: HOPKINS: Rename the parameter of PlayAnimSound to make it meaningful --- engines/hopkins/sound.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'engines/hopkins/sound.cpp') diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 773c714899..d86fc449ee 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -261,9 +261,9 @@ void SoundManager::loadAnimSound() { } } -void SoundManager::playAnimSound(int soundNumber) { +void SoundManager::playAnimSound(int animFrame) { if (!_vm->_globals->_censorshipFl && _specialSoundNum == 2) { - switch (soundNumber) { + switch (animFrame) { case 20: playSample(5); break; @@ -282,35 +282,35 @@ void SoundManager::playAnimSound(int soundNumber) { playSample(4); break; } - } else if (_specialSoundNum == 1 && soundNumber == 17) + } else if (_specialSoundNum == 1 && animFrame == 17) playSoundFile("SOUND42.WAV"); - else if (_specialSoundNum == 5 && soundNumber == 19) + else if (_specialSoundNum == 5 && animFrame == 19) playWav(1); - else if (_specialSoundNum == 14 && soundNumber == 625) + else if (_specialSoundNum == 14 && animFrame == 625) playWav(1); - else if (_specialSoundNum == 16 && soundNumber == 25) + else if (_specialSoundNum == 16 && animFrame == 25) playWav(1); else if (_specialSoundNum == 17) { - if (soundNumber == 6) + if (animFrame == 6) playSample(1); - else if (soundNumber == 14) + else if (animFrame == 14) playSample(2); - else if (soundNumber == 67) + else if (animFrame == 67) playSample(3); - } else if (_specialSoundNum == 198 && soundNumber == 15) + } else if (_specialSoundNum == 198 && animFrame == 15) playWav(1); - else if (_specialSoundNum == 199 && soundNumber == 72) + else if (_specialSoundNum == 199 && animFrame == 72) playWav(1); - else if (_specialSoundNum == 208 && soundNumber == 40) + else if (_specialSoundNum == 208 && animFrame == 40) playWav(1); - else if (_specialSoundNum == 210 && soundNumber == 2) + else if (_specialSoundNum == 210 && animFrame == 2) playWav(1); - else if (_specialSoundNum == 211 && soundNumber == 22) + else if (_specialSoundNum == 211 && animFrame == 22) playWav(1); else if (_specialSoundNum == 229) { - if (soundNumber == 15) + if (animFrame == 15) playWav(1); - else if (soundNumber == 91) + else if (animFrame == 91) playWav(2); } } -- cgit v1.2.3 From c2951e2594c320c244898237d434e7d83a027662 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 29 Oct 2014 05:14:13 +0100 Subject: HOPKINS: Add specific code to handle the butchered Polish version with sync sound --- engines/hopkins/sound.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'engines/hopkins/sound.cpp') diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index d86fc449ee..6b3149e247 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -275,11 +275,23 @@ void SoundManager::playAnimSound(int animFrame) { case 75: playSample(2); break; + case 95: + // This fixes an original bug in the Polish version of the bug, which was literally butchered for some reason + if (_vm->getLanguage() == Common::PL_POL) + playSample(3); + break; case 109: - playSample(3); + if (_vm->getLanguage() != Common::PL_POL) + playSample(3); + break; + case 108: + // This fixes an original bug in the Polish version of the bug, which was literally butchered for some reason + if (_vm->getLanguage() == Common::PL_POL) + playSample(4); break; case 122: - playSample(4); + if (_vm->getLanguage() != Common::PL_POL) + playSample(4); break; } } else if (_specialSoundNum == 1 && animFrame == 17) -- cgit v1.2.3 From 75198ce17c6e13dd01ca44e17c7ad8a40d38dcf8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 29 Oct 2014 17:13:16 +0100 Subject: HOPKINS: Fix a couple of comments --- engines/hopkins/sound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/hopkins/sound.cpp') diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 6b3149e247..b429eb863a 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -276,7 +276,7 @@ void SoundManager::playAnimSound(int animFrame) { playSample(2); break; case 95: - // This fixes an original bug in the Polish version of the bug, which was literally butchered for some reason + // This fixes an original bug in the Polish version of the game, which was literally butchered for some reason if (_vm->getLanguage() == Common::PL_POL) playSample(3); break; @@ -285,7 +285,7 @@ void SoundManager::playAnimSound(int animFrame) { playSample(3); break; case 108: - // This fixes an original bug in the Polish version of the bug, which was literally butchered for some reason + // This fixes an original bug in the Polish version of the game, which was literally butchered for some reason if (_vm->getLanguage() == Common::PL_POL) playSample(4); break; -- cgit v1.2.3 From 14ab55e9badc97fd6554214408da33663a88c792 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Nov 2014 12:35:59 +0100 Subject: HOPKINS: Add a check for another sound related to frames removed in the Polish version. Fix for bug #6591 --- engines/hopkins/sound.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/hopkins/sound.cpp') diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index b429eb863a..6660233740 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -273,7 +273,10 @@ void SoundManager::playAnimSound(int animFrame) { playSample(1); break; case 75: - playSample(2); + // This removes the sound of the gun played while the guard is being shot, as this part of the scene has been + // removed in the Polish version of the game + if (_vm->getLanguage() != Common::PL_POL) + playSample(2); break; case 95: // This fixes an original bug in the Polish version of the game, which was literally butchered for some reason -- cgit v1.2.3