[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.465,1.466 sound.cpp,1.449,1.450
kirben
kirben at users.sourceforge.net
Tue Apr 26 21:49:41 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/scumm
Modified Files:
scumm.cpp sound.cpp
Log Message:
Add some basic support for pjgames.
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.465
retrieving revision 1.466
diff -u -d -r1.465 -r1.466
--- scumm.cpp 26 Apr 2005 15:13:04 -0000 1.465
+++ scumm.cpp 27 Apr 2005 04:47:02 -0000 1.466
@@ -379,6 +379,8 @@
// Humongous Entertainment Scumm Version ?
{"ff5demo", "Freddi Fish 5: The Case of the Creature of Coral Cave (Demo)", GID_FREDDICOVE, 6, 100, 61, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
+ {"pjgames", "Pajama Sam: Games to Play On Any Day", GID_HEGAME, 6, 100, 62, MDT_NONE,
+ GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformUnknown, 0, 0},
// Uses smacker in external files
{"artdemo", "Blue's Art Time Activities (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE,
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.449
retrieving revision 1.450
diff -u -d -r1.449 -r1.450
--- sound.cpp 25 Apr 2005 05:59:01 -0000 1.449
+++ sound.cpp 27 Apr 2005 04:47:02 -0000 1.450
@@ -703,27 +703,37 @@
_sfxFile->seek(offset, SEEK_SET);
if (_sfxFile->readUint32LE() == TO_LE_32(MKID('WSOU'))) {
- debug(1, "IMA ADPCM compression not supported");
- return;
+ // Skip the WSOU chunk
+ _sfxFile->seek(offset + 8, SEEK_SET);
+
+ // Try to load the WAVE data into an audio stream
+ AudioStream *stream = makeWAVStream(*_sfxFile);
+ if (!stream) {
+ warning("startTalkSound: IMA ADPCM compression not supported");
+ return;
+ }
+
+ int channel = _vm->VAR(_vm->VAR_SOUND_CHANNEL);
+ _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_heSoundChannels[channel], stream, 1);
} 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
- size = _sfxFile->readUint32BE() - 4;
- _sfxFile->seek(size, SEEK_CUR);
- }
- size = _sfxFile->readUint32BE() - 8;
- sound = (byte *)malloc(size);
- _sfxFile->read(sound, size);
+ if (_sfxFile->readUint32LE() == TO_LE_32(MKID('SBNG'))) {
+ // Skip the SBNG, so we end up at the SDAT chunk
+ size = _sfxFile->readUint32BE() - 4;
+ _sfxFile->seek(size, SEEK_CUR);
+ }
+ size = _sfxFile->readUint32BE() - 8;
+ sound = (byte *)malloc(size);
+ _sfxFile->read(sound, size);
- if (_vm->_heversion >= 70) {
- int channel = _vm->VAR(_vm->VAR_SOUND_CHANNEL);
- _vm->_mixer->playRaw(&_heSoundChannels[channel], sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, 1);
- } else {
- _vm->_mixer->playRaw(handle, sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+ if (_vm->_heversion >= 70) {
+ int channel = _vm->VAR(_vm->VAR_SOUND_CHANNEL);
+ _vm->_mixer->playRaw(&_heSoundChannels[channel], sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, 1);
+ } else {
+ _vm->_mixer->playRaw(handle, sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+ }
}
return;
}
More information about the Scummvm-git-logs
mailing list