diff options
author | Travis Howell | 2004-09-06 07:54:26 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-06 07:54:26 +0000 |
commit | 5a4548ed14e88f4f350cca964b1c23bbeb2027a5 (patch) | |
tree | df20f093f5b1407cfecdda38d4cfbe8467915ca5 | |
parent | 35e364dc6e4277d89d0886904cdaee7e595ffb72 (diff) | |
download | scummvm-rg350-5a4548ed14e88f4f350cca964b1c23bbeb2027a5.tar.gz scummvm-rg350-5a4548ed14e88f4f350cca964b1c23bbeb2027a5.tar.bz2 scummvm-rg350-5a4548ed14e88f4f350cca964b1c23bbeb2027a5.zip |
Not every speech file has the extra header.
svn-id: r14929
-rw-r--r-- | scumm/sound.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index ae98ac74f7..a1139df91b 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -650,17 +650,18 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle // SKIP TALK (8) HSHD (24) _sfxFile->seek(offset + 32, SEEK_SET); - if (_vm->_heversion >= 80) { + + if (_sfxFile->readUint32LE() == MKID('SBNG')) { // SKIP SBNG - _sfxFile->seek(+4, SEEK_CUR); extra = _sfxFile->readUint32BE(); - _sfxFile->seek(+extra, SEEK_CUR); + _sfxFile->seek(+extra + 8, SEEK_CUR); extra += 8; + } else { + _sfxFile->seek(+4, SEEK_CUR); } - // SKIP SDAT (8) - _sfxFile->seek(+8, SEEK_CUR); - size = b - 40 - extra; + size = b - 40 - extra ; + printf("size %d extra %d\n", size, extra); sound = (byte *)malloc(size); _sfxFile->read(sound, size); _vm->_mixer->playRaw(handle, sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); |