aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-09 08:22:44 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-09 08:22:44 -0500
commit04481c298a5df5dd0327d64284db9ed80bf619e4 (patch)
tree5313fd693846a8d7e922dca9d6f4c742c2a9ae21 /src/world.cpp
parent380137ca06c2c74806c1838cb10ef3a17dda8406 (diff)
music fading
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp
index cb5f3ec..2fd3591 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -285,6 +285,12 @@ void World::update(Player *p,unsigned int delta){
else if(e->vel.x > 0)e->left = false;
}
}
+
+ if(ui::dialogImportant){
+ Mix_FadeOutMusic(2000);
+ }else if(!Mix_PlayingMusic()){
+ Mix_FadeInMusic(bgmObj,-1,2000);
+ }
}
void World::setBGM(const char *path){