From 4f085516437369eccf22c96d84362f4d39c1448b Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 9 Apr 2005 07:25:41 +0000 Subject: Add comment to TODO Check that string pointer exists, before reading data. Don't attempt to play speech in soccer2004, since it uses compression. svn-id: r17470 --- scumm/script_v72he.cpp | 6 ++++-- scumm/sound.cpp | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'scumm') diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index c6feadd0c9..9b3b014080 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -572,8 +572,10 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) { break; case 's': src = getStringAddress(args[val--]); - while (*src != 0) - *dst++ = *src++; + if (src) { + while (*src != 0) + *dst++ = *src++; + } break; case 'x': dst += sprintf((char *)dst, "%x", args[val--]); diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 2c945e2de8..60d183bf47 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -682,8 +682,14 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, SoundHandle *handl if (_vm->_features & GF_HUMONGOUS) { _sfxMode |= mode; - // Skip the TALK (8) and HSHD (24) chunks - _sfxFile->seek(offset + 32, SEEK_SET); + _sfxFile->seek(offset, SEEK_SET); + if (_sfxFile->readUint32LE() == TO_LE_32(MKID('WSOU'))) { + debug(1, "IMA ADPCM compression not supported"); + return; + } else { + // Skip the TALK (8) and HSHD (24) chunks + _sfxFile->seek(28, SEEK_CUR); + } if (_sfxFile->readUint32LE() == TO_LE_32(MKID('SBNG'))) { // Skip the SBNG, so we end up at the SDAT chunk -- cgit v1.2.3