diff options
author | Jonathan Gray | 2003-03-04 06:10:07 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-03-04 06:10:07 +0000 |
commit | 91786c253dad1001dbc4cb1acb59d82744dfd1e0 (patch) | |
tree | 055a5b0fc76268c938ec4e778bcb2becf5813558 | |
parent | bc60419fa649370ec47e1b66e607d534027e6410 (diff) | |
download | scummvm-rg350-91786c253dad1001dbc4cb1acb59d82744dfd1e0.tar.gz scummvm-rg350-91786c253dad1001dbc4cb1acb59d82744dfd1e0.tar.bz2 scummvm-rg350-91786c253dad1001dbc4cb1acb59d82744dfd1e0.zip |
add bundle file names for comi demo, and only add .IMX when playing the full version
svn-id: r6688
-rw-r--r-- | scumm/sound.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index c89aaecc4f..1fa859a425 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -996,8 +996,10 @@ void Sound::playBundleMusic(char * song) { _scumm->_bundle->_musicFile.close(); if (_scumm->_bundle->openMusicFile(bunfile, _scumm->getGameDataPath()) == false) { - _outputMixerSize = 0; - return; + if (_scumm->_bundle->openMusicFile("music.bun", _scumm->getGameDataPath()) == false) { + _outputMixerSize = 0; + return; + } } _musicDisk = (byte)_scumm->_vars[_scumm->VAR_CURRENTDISK]; @@ -1179,6 +1181,8 @@ int Sound::playBundleSound(char *sound) { result = _scumm->_bundle->openVoiceFile(voxfile, _scumm->getGameDataPath()); + if (result == false) + result = _scumm->_bundle->openVoiceFile("voice.bun", _scumm->getGameDataPath()); _voiceDisk = (byte)_scumm->_vars[_scumm->VAR_CURRENTDISK]; } else if (_scumm->_gameId == GID_DIG) result = _scumm->_bundle->openVoiceFile("digvoice.bun", _scumm->getGameDataPath()); @@ -1195,7 +1199,8 @@ int Sound::playBundleSound(char *sound) { if (_scumm->_gameId == GID_CMI) { char name[20]; strcpy(name, sound); - strcat(name, ".IMX"); + if (_scumm->_maxRooms != 6) // CMI demo does not have .IMX for voice but does for music... + strcat(name, ".IMX"); ptr = (byte *)malloc(1000000); output_size = _scumm->_bundle->decompressVoiceSampleByName(name, ptr); if (output_size == 0) { |