diff options
author | Travis Howell | 2003-11-18 01:57:00 +0000 |
---|---|---|
committer | Travis Howell | 2003-11-18 01:57:00 +0000 |
commit | 3ce3b33c62c5572ed482fc0df3914d8d516f613e (patch) | |
tree | 6880f0f8da0d5cf8b31692d473d299fbb6a8ddc2 /scumm/sound.cpp | |
parent | 632e88459b35760f97ed758d412c990d54941062 (diff) | |
download | scummvm-rg350-3ce3b33c62c5572ed482fc0df3914d8d516f613e.tar.gz scummvm-rg350-3ce3b33c62c5572ed482fc0df3914d8d516f613e.tar.bz2 scummvm-rg350-3ce3b33c62c5572ed482fc0df3914d8d516f613e.zip |
COMI demos only have 3 fonts files.
Don't do CD checks for COMI demos
svn-id: r11336
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index d917fcc94d..7f486ee209 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -1056,18 +1056,26 @@ void Sound::playBundleMusic(const char *song) { _outputMixerSize = (22050 * 2 * 2); char bunfile[20]; - sprintf(bunfile, "musdisk%d.bun", _scumm->VAR(_scumm->VAR_CURRENTDISK)); - if (_musicDisk != _scumm->VAR(_scumm->VAR_CURRENTDISK)) - _bundle->closeMusicFile(); - - if (_bundle->openMusicFile(bunfile, _scumm->getGameDataPath()) == false) { + if (_scumm->_features & GF_DEMO) { if (_bundle->openMusicFile("music.bun", _scumm->getGameDataPath()) == false) { _outputMixerSize = 0; return; } - } + } else { + + sprintf(bunfile, "musdisk%d.bun", _scumm->VAR(_scumm->VAR_CURRENTDISK)); + if (_musicDisk != _scumm->VAR(_scumm->VAR_CURRENTDISK)) + _bundle->closeMusicFile(); + + if (_bundle->openMusicFile(bunfile, _scumm->getGameDataPath()) == false) { + if (_bundle->openMusicFile("music.bun", _scumm->getGameDataPath()) == false) { + _outputMixerSize = 0; + return; + } + } - _musicDisk = (byte)_scumm->VAR(_scumm->VAR_CURRENTDISK); + _musicDisk = (byte)_scumm->VAR(_scumm->VAR_CURRENTDISK); + } } else { _outputMixerSize = ((22050 * 2 * 2) / 4) * 3; @@ -1235,15 +1243,19 @@ void Sound::playBundleSound(char *sound, PlayingSoundHandle *handle) { if (_scumm->_gameId == GID_CMI) { char voxfile[20]; - sprintf(voxfile, "voxdisk%d.bun", _scumm->VAR(_scumm->VAR_CURRENTDISK)); - if (_voiceDisk != _scumm->VAR(_scumm->VAR_CURRENTDISK)) - _bundle->closeVoiceFile(); + if (_scumm->_features & GF_DEMO) { + result = _bundle->openVoiceFile("voice.bun", _scumm->getGameDataPath()); + } else { + sprintf(voxfile, "voxdisk%d.bun", _scumm->VAR(_scumm->VAR_CURRENTDISK)); + if (_voiceDisk != _scumm->VAR(_scumm->VAR_CURRENTDISK)) + _bundle->closeVoiceFile(); - result = _bundle->openVoiceFile(voxfile, _scumm->getGameDataPath()); + result = _bundle->openVoiceFile(voxfile, _scumm->getGameDataPath()); - if (result == false) - result = _bundle->openVoiceFile("voice.bun", _scumm->getGameDataPath()); - _voiceDisk = (byte)_scumm->VAR(_scumm->VAR_CURRENTDISK); + if (result == false) + result = _bundle->openVoiceFile("voice.bun", _scumm->getGameDataPath()); + _voiceDisk = (byte)_scumm->VAR(_scumm->VAR_CURRENTDISK); + } } else if (_scumm->_gameId == GID_DIG) result = _bundle->openVoiceFile("digvoice.bun", _scumm->getGameDataPath()); else |