aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2007-08-01 20:56:39 +0000
committerPaweł Kołodziejski2007-08-01 20:56:39 +0000
commitce6c1a462d2ea1c1404cbb51eac3e919af7e01dc (patch)
treed22c277733c031664915593fe4100088656ad1c5
parent503ee127e53615528cfbcfded6cbe890c2edcddf (diff)
downloadscummvm-rg350-ce6c1a462d2ea1c1404cbb51eac3e919af7e01dc.tar.gz
scummvm-rg350-ce6c1a462d2ea1c1404cbb51eac3e919af7e01dc.tar.bz2
scummvm-rg350-ce6c1a462d2ea1c1404cbb51eac3e919af7e01dc.zip
added MusicFadeout code
svn-id: r28392
-rw-r--r--engines/drascula/drascula.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 8332e775f7..c19239b9a3 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -4831,7 +4831,22 @@ void DrasculaEngine::fin_sound_corte() {
}
void DrasculaEngine::MusicFadeout() {
- //TODO
+ int org_vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
+ for (;;) {
+ int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
+ vol -= 10;
+ if (vol < 0)
+ vol = 0;
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol);
+ if (vol == 0)
+ break;
+ update_events();
+ _system->updateScreen();
+ _system->delayMillis(50);
+ }
+ AudioCD.stop();
+ _system->delayMillis(100);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, org_vol);
}
void DrasculaEngine::ctvd_end() {