[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.384,1.385
Travis Howell
kirben at users.sourceforge.net
Mon Sep 6 00:55:24 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6540/scumm
Modified Files:
sound.cpp
Log Message:
Not every speech file has the extra header.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.384
retrieving revision 1.385
diff -u -d -r1.384 -r1.385
--- sound.cpp 6 Sep 2004 07:31:51 -0000 1.384
+++ sound.cpp 6 Sep 2004 07:54:26 -0000 1.385
@@ -650,17 +650,18 @@
// 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);
More information about the Scummvm-git-logs
mailing list