aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/sound/sound_intern.h2
-rw-r--r--engines/kyra/sound/sound_pc98_eob.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/kyra/sound/sound_intern.h b/engines/kyra/sound/sound_intern.h
index 44f7adbfe2..fc8c5a7fde 100644
--- a/engines/kyra/sound/sound_intern.h
+++ b/engines/kyra/sound/sound_intern.h
@@ -471,6 +471,8 @@ private:
SoundResourceInfo_PC *_resInfo[3];
int _currentResourceSet;
+ uint32 _sfxDelay;
+
bool _ready;
};
diff --git a/engines/kyra/sound/sound_pc98_eob.cpp b/engines/kyra/sound/sound_pc98_eob.cpp
index 13b7214d74..8f0dc548f0 100644
--- a/engines/kyra/sound/sound_pc98_eob.cpp
+++ b/engines/kyra/sound/sound_pc98_eob.cpp
@@ -31,7 +31,7 @@
namespace Kyra {
SoundPC98_EoB::SoundPC98_EoB(KyraEngine_v1 *vm, Audio::Mixer *mixer) : Sound(vm, mixer),
- _vm(vm), _driver(0), _currentResourceSet(-1), _ready(false) {
+ _vm(vm), _driver(0), _currentResourceSet(-1), _sfxDelay(0), _ready(false) {
memset(_resInfo, 0, sizeof(_resInfo));
}
@@ -104,9 +104,11 @@ void SoundPC98_EoB::haltTrack() {
}
void SoundPC98_EoB::playSoundEffect(uint8 track, uint8) {
- if (_currentResourceSet != kMusicIngame || !_sfxEnabled || !_ready || track >= 120)
+ if (_currentResourceSet != kMusicIngame || !_sfxEnabled || !_ready || track >= 120 || (track != 28 && _sfxDelay > _vm->_system->getMillis()))
return;
_driver->startSoundEffect(track);
+ if (track == 28)
+ _sfxDelay = _vm->_system->getMillis() + 1440;
}
void SoundPC98_EoB::updateVolumeSettings() {