aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2003-11-18 01:57:00 +0000
committerTravis Howell2003-11-18 01:57:00 +0000
commit3ce3b33c62c5572ed482fc0df3914d8d516f613e (patch)
tree6880f0f8da0d5cf8b31692d473d299fbb6a8ddc2 /scumm
parent632e88459b35760f97ed758d412c990d54941062 (diff)
downloadscummvm-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')
-rw-r--r--scumm/smush/smush_player.cpp2
-rw-r--r--scumm/sound.cpp40
2 files changed, 27 insertions, 15 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index ed663fa2bc..dd4906499e 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -844,7 +844,7 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) {
}
} else if (_scumm->_gameId == GID_CMI) {
for (i = 0; i < 5; i++) {
- if ((_scumm->_features & GF_DEMO) && (i == 5))
+ if ((_scumm->_features & GF_DEMO) && (i == 4))
break;
sprintf(file_font, "font%d.nut", i);
_sf[i] = new SmushFont(false, true);
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