aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/sound/bgatmosphere.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/sound/bgatmosphere.cpp')
-rw-r--r--engines/gob/sound/bgatmosphere.cpp15
1 files changed, 15 insertions, 0 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;
}