diff options
author | Sven Hesse | 2008-12-15 02:16:45 +0000 |
---|---|---|
committer | Sven Hesse | 2008-12-15 02:16:45 +0000 |
commit | 0eee8012616e3128dfbbe50d3f29330bc8ab00e3 (patch) | |
tree | c50a3ba78738a6410c6481f69a8ed3e5d622e58b /engines/gob/sound | |
parent | 123c26675f5b5843b00df13ba7daa8a8236758a0 (diff) | |
download | scummvm-rg350-0eee8012616e3128dfbbe50d3f29330bc8ab00e3.tar.gz scummvm-rg350-0eee8012616e3128dfbbe50d3f29330bc8ab00e3.tar.bz2 scummvm-rg350-0eee8012616e3128dfbbe50d3f29330bc8ab00e3.zip |
No background "music" shading in Urban Runner
svn-id: r35373
Diffstat (limited to 'engines/gob/sound')
-rw-r--r-- | engines/gob/sound/bgatmosphere.cpp | 15 | ||||
-rw-r--r-- | engines/gob/sound/bgatmosphere.h | 2 | ||||
-rw-r--r-- | engines/gob/sound/sound.cpp | 4 |
3 files changed, 20 insertions, 1 deletions
diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp index f5a7fe0fdb..12ceb031b7 100644 --- a/engines/gob/sound/bgatmosphere.cpp +++ b/engines/gob/sound/bgatmosphere.cpp @@ -36,6 +36,7 @@ BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : _playMode = kPlayModeLinear; _queuePos = -1; _shaded = false; + _shadable = true; g_system->getEventManager()->registerRandomSource(_rnd, "gobBA"); } @@ -115,12 +116,26 @@ void BackgroundAtmosphere::getNextQueuePos() { } } +void BackgroundAtmosphere::setShadable(bool shadable) { + if (!shadable) { + unshade(); + _shadable = false; + } else + _shadable = true; +} + void BackgroundAtmosphere::shade() { + if (!_shadable) + return; + _shaded = true; _fadeVol = 32768; } void BackgroundAtmosphere::unshade() { + if (!_shadable) + return; + _shaded = false; _fadeVol = 65536; } diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h index 72b5614282..3fa648b94d 100644 --- a/engines/gob/sound/bgatmosphere.h +++ b/engines/gob/sound/bgatmosphere.h @@ -52,6 +52,7 @@ public: void queueSample(SoundDesc &sndDesc); void queueClear(); + void setShadable(bool shadable); void shade(); void unshade(); @@ -61,6 +62,7 @@ private: Common::Array<SoundDesc *> _queue; int _queuePos; bool _shaded; + bool _shadable; Common::Mutex _mutex; diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 5acc255275..4746bfa99a 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -50,8 +50,10 @@ Sound::Sound(GobEngine *vm) : _vm(vm) { _cdrom = new CDROM; if (_vm->getGameType() == kGameTypeWoodruff) _bgatmos = new BackgroundAtmosphere(*_vm->_mixer); - if (_vm->getGameType() == kGameTypeUrban) + if (_vm->getGameType() == kGameTypeUrban) { _bgatmos = new BackgroundAtmosphere(*_vm->_mixer); + _bgatmos->setShadable(false); + } } Sound::~Sound() { |