[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.84,1.85
Jonathan Gray
khalek at users.sourceforge.net
Sat Mar 1 04:45:14 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv16759
Modified Files:
sound.cpp
Log Message:
hacky support for humongous talkie format
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- sound.cpp 28 Feb 2003 11:32:43 -0000 1.84
+++ sound.cpp 1 Mar 2003 12:44:52 -0000 1.85
@@ -466,12 +466,26 @@
int num = 0, i;
byte file_byte, file_byte_2;
int size;
+ byte* sound;
if (_sfxFile->isOpen() == false) {
warning("startTalkSound: SFX file is not open");
return -1;
}
+ // FIXME hack until more is known
+ // the size of the data after the sample isn't known
+ // 64 is just a guess
+ if (_scumm->_features & GF_HUMONGOUS) {
+ // SKIP TLKB (8) TALK (8) HSHD (24) and SDAT (8)
+ _sfxFile->seek(offset + 48, SEEK_SET);
+ sound = (byte*)malloc(b - 64);
+ _sfxFile->read(sound, b - 64);
+ _scumm->_mixer->playRaw(NULL, sound, b - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+ return -1;
+ }
+
+
// Some games frequently assume that starting one sound effect will
// automatically stop any other that may be playing at that time. So
// that is what we do here, but we make an exception for speech.
@@ -909,6 +923,11 @@
sprintf(buf, "%s.sou", _scumm->getExeName());
if (!file->open(buf, _scumm->getGameDataPath())) {
file->open("monster.sou", _scumm->getGameDataPath());
+ }
+
+ if (!file->isOpen()) {
+ sprintf(buf, "%s.tlk", _scumm->getExeName());
+ file->open(buf, _scumm->getGameDataPath(), 1, 0x69);
}
return file;
}
More information about the Scummvm-git-logs
mailing list