aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-09-06 07:31:51 +0000
committerTravis Howell2004-09-06 07:31:51 +0000
commit35e364dc6e4277d89d0886904cdaee7e595ffb72 (patch)
treede1588cb2ad45144ca3dc9dae4e95761a2786d7a /scumm/sound.cpp
parent3f42d6f0aba4492ba4195d6547e5753f63ec7a0b (diff)
downloadscummvm-rg350-35e364dc6e4277d89d0886904cdaee7e595ffb72.tar.gz
scummvm-rg350-35e364dc6e4277d89d0886904cdaee7e595ffb72.tar.bz2
scummvm-rg350-35e364dc6e4277d89d0886904cdaee7e595ffb72.zip
Skip extra speech header in HE 80+ games
svn-id: r14928
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index f339aaf879..ae98ac74f7 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -645,12 +645,22 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle
}
if (_vm->_features & GF_HUMONGOUS) {
+ int extra = 0;;
_sfxMode |= mode;
- // SKIP TALK (8) HSHD (22) and SDAT (8)
- _sfxFile->seek(offset + 40, SEEK_SET);
+ // SKIP TALK (8) HSHD (24)
+ _sfxFile->seek(offset + 32, SEEK_SET);
+ if (_vm->_heversion >= 80) {
+ // SKIP SBNG
+ _sfxFile->seek(+4, SEEK_CUR);
+ extra = _sfxFile->readUint32BE();
+ _sfxFile->seek(+extra, SEEK_CUR);
+ extra += 8;
+ }
+ // SKIP SDAT (8)
+ _sfxFile->seek(+8, SEEK_CUR);
- size = b - 40;
+ size = b - 40 - extra;
sound = (byte *)malloc(size);
_sfxFile->read(sound, size);
_vm->_mixer->playRaw(handle, sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);