diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index 41556315..d2450800 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -139,7 +139,7 @@ void musicclass::init() nicechange = -1; nicefade = false; resumesong = 0; - dontquickfade = false; + quick_fade = true; songStart = 0; songEnd = 0; @@ -204,13 +204,13 @@ void musicclass::play(int t, const double position_sec /*= 0.0*/, const int fade nicechange = t; nicefade = true; currentsong = -1; - if (!dontquickfade) + if (quick_fade) { Mix_FadeOutMusic(500); // fade out quicker } else { - dontquickfade = false; + quick_fade = true; } } else if(Mix_FadeInMusicPos(musicTracks[t].m_music, -1, fadein_ms, position_sec)==-1) @@ -260,10 +260,11 @@ void musicclass::fadeMusicVolumeIn(int ms) FadeVolAmountPerFrame = MIX_MAX_VOLUME / (ms / 33); } -void musicclass::fadeout() +void musicclass::fadeout(const bool quick_fade_ /*= true*/) { Mix_FadeOutMusic(2000); resumesong = currentsong; + quick_fade = quick_fade_; } void musicclass::processmusicfadein() @@ -303,8 +304,7 @@ void musicclass::niceplay(int t) { if(currentsong!=-1) { - dontquickfade = true; - fadeout(); + fadeout(false); } nicefade = true; nicechange = t; diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index edddf868..6717015c 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -18,7 +18,7 @@ public: void haltdasmusik(); void silencedasmusik(); void fadeMusicVolumeIn(int ms); - void fadeout(); + void fadeout(const bool quick_fade_ = true); void fadein(); void processmusicfadein(); void processmusic(); @@ -43,7 +43,7 @@ public: int FadeVolAmountPerFrame; int musicVolume; - bool dontquickfade; + bool quick_fade; // MMMMMM mod settings bool mmmmmm; diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index f85d3d93..8fe056c9 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -284,8 +284,7 @@ void scriptclass::run() } if (words[0] == "musicfadeout") { - music.fadeout(); - music.dontquickfade = true; + music.fadeout(false); } if (words[0] == "musicfadein") {