diff options
author | athrxx | 2019-12-18 19:41:40 +0100 |
---|---|---|
committer | athrxx | 2019-12-18 20:50:48 +0100 |
commit | 64b897a5607d2baca980178fa7fbdb55770ea938 (patch) | |
tree | 3d92745248e819302431fc1a3ce5a85db24e0895 /engines/kyra/sound | |
parent | e4439fb1a517b3e837b2ca7b1ac39b57973aee1a (diff) | |
download | scummvm-rg350-64b897a5607d2baca980178fa7fbdb55770ea938.tar.gz scummvm-rg350-64b897a5607d2baca980178fa7fbdb55770ea938.tar.bz2 scummvm-rg350-64b897a5607d2baca980178fa7fbdb55770ea938.zip |
KYRA: (EOB/PC98) - minor sfx code tweak
The original adds a delay after track 28.
Diffstat (limited to 'engines/kyra/sound')
-rw-r--r-- | engines/kyra/sound/sound_intern.h | 2 | ||||
-rw-r--r-- | engines/kyra/sound/sound_pc98_eob.cpp | 6 |
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() { |