aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorJonathan Gray2004-06-05 12:02:36 +0000
committerJonathan Gray2004-06-05 12:02:36 +0000
commitb8bc0d72e53579255a6149e205cc10a9233f2bcf (patch)
tree79795d077bf61d7e19bfe3ddc381f50e0df5ed1c /scumm/sound.cpp
parentfc2044f743400ceb3a2b913d29d7c2cf11b990e6 (diff)
downloadscummvm-rg350-b8bc0d72e53579255a6149e205cc10a9233f2bcf.tar.gz
scummvm-rg350-b8bc0d72e53579255a6149e205cc10a9233f2bcf.tar.bz2
scummvm-rg350-b8bc0d72e53579255a6149e205cc10a9233f2bcf.zip
Check if monkey sega cd sounds have already been demangled before trying to do demangle them. Patch #959129 from Jonathan Gevaryahu
svn-id: r13935
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 1211eaaa91..375d85ff00 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -249,7 +249,9 @@ void Sound::playSound(int soundID) {
// then a semi-sane VOC header is revealed, with
// a sampling rate of ~25000 Hz (does that make sense?).
// I'll add some code to test that theory for now.
- if (_vm->_gameId == GID_MONKEY_SEGA) {
+
+ // Check if the resource has already been demangled
+ if ((_vm->_gameId == GID_MONKEY_SEGA) && (ptr[0] != 1)) {
for (int i = 0; i < size; i++) {
ptr[i] ^= 0x16;
if (ptr[i] >= 0x7F) {