diff options
author | Paweł Kołodziejski | 2003-06-23 21:23:10 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-06-23 21:23:10 +0000 |
commit | a1f760b9443e6622d269d0f51ae9dbfe951afbe3 (patch) | |
tree | 65fd5f902976e359788f832ef1b6f2483492ff7d /scumm | |
parent | c848e724a4035fb2b4fb38a4e235072f832fe6e4 (diff) | |
download | scummvm-rg350-a1f760b9443e6622d269d0f51ae9dbfe951afbe3.tar.gz scummvm-rg350-a1f760b9443e6622d269d0f51ae9dbfe951afbe3.tar.bz2 scummvm-rg350-a1f760b9443e6622d269d0f51ae9dbfe951afbe3.zip |
this should prevent changing music in some room in the DIG
svn-id: r8641
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_digi.cpp | 3 | ||||
-rw-r--r-- | scumm/sound.cpp | 6 | ||||
-rw-r--r-- | scumm/sound.h | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index 52edba2ff8..68e0a71789 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -1134,7 +1134,8 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i if (_digStateMusicMap[l].room == b) { int16 music = _digStateMusicMap[l].table_index; debug(5, "Play imuse music: %s, %s, %s", _digStateMusicTable[music].name, _digStateMusicTable[music].title, _digStateMusicTable[music].filename); - if (_digStateMusicTable[music].filename[0] != 0) { + if ((_digStateMusicTable[music].filename[0] != 0) && + (strcmp(_digStateMusicTable[_digStateMusicTable[music].unk3].filename, _scumm->_sound->_nameBundleMusic) != 0) ) { _scumm->_sound->playBundleMusic((const char *)_digStateMusicTable[music].filename); } return 0; diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 3d6ea2a222..303b97f43c 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -87,7 +87,7 @@ Sound::Sound(Scumm *parent) { memset(this,0,sizeof(Sound)); // palmos _scumm = parent; - _nameBundleMusic = NULL; + _nameBundleMusic = ""; _musicBundleBufFinal = NULL; _musicBundleBufOutput = NULL; _musicDisk = 0; @@ -1001,7 +1001,7 @@ void Sound::playBundleMusic(const char *song) { return; } - if (_nameBundleMusic == NULL) { + if (_nameBundleMusic[0] == 0) { _outputMixerSize = 66150; // ((22050 * 2 * 2) / 4) * 3 if (_scumm->_gameId == GID_CMI) { char bunfile[20]; @@ -1063,7 +1063,7 @@ void Sound::bundleMusicHandler(Scumm *scumm) { if (_musicBundleToBeRemoved == true) { _scumm->_timer->releaseProcedure(&music_handler); - _nameBundleMusic = NULL; + _nameBundleMusic = ""; if (_bundleMusicTrack != -1) { _scumm->_mixer->stop(_bundleMusicTrack); } diff --git a/scumm/sound.h b/scumm/sound.h index ce50c3a198..842912f4e4 100644 --- a/scumm/sound.h +++ b/scumm/sound.h @@ -41,7 +41,10 @@ protected: bool _soundsPaused2; bool _soundVolumePreset; +public: const char *_nameBundleMusic; + +protected: const char *_newNameBundleMusic; byte _musicDisk; byte _voiceDisk; |