Compare commits
4 Commits
ff3e390352
...
8e5714439a
Author | SHA1 | Date |
---|---|---|
Misa | 8e5714439a | |
Misa | f64cf4f831 | |
Misa | fe5bacfdc2 | |
Misa | 96c479a11f |
|
@ -184,19 +184,29 @@ void musicclass::play(int t, const double position_sec /*= 0.0*/, const int fade
|
||||||
{
|
{
|
||||||
t += num_mmmmmm_tracks;
|
t += num_mmmmmm_tracks;
|
||||||
}
|
}
|
||||||
|
|
||||||
safeToProcessMusic = true;
|
safeToProcessMusic = true;
|
||||||
musicVolume = MIX_MAX_VOLUME;
|
musicVolume = MIX_MAX_VOLUME;
|
||||||
if (currentsong !=t)
|
|
||||||
{
|
if (currentsong == t)
|
||||||
if (t != -1)
|
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
currentsong = t;
|
currentsong = t;
|
||||||
|
|
||||||
|
if (t == -1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!INBOUNDS_VEC(t, musicTracks))
|
if (!INBOUNDS_VEC(t, musicTracks))
|
||||||
{
|
{
|
||||||
puts("play() out-of-bounds!");
|
puts("play() out-of-bounds!");
|
||||||
currentsong = -1;
|
currentsong = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks)))
|
if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks)))
|
||||||
{
|
{
|
||||||
// Level Complete theme, no fade in or repeat
|
// Level Complete theme, no fade in or repeat
|
||||||
|
@ -213,6 +223,7 @@ void musicclass::play(int t, const double position_sec /*= 0.0*/, const int fade
|
||||||
nicechange = t;
|
nicechange = t;
|
||||||
nicefade = true;
|
nicefade = true;
|
||||||
currentsong = -1;
|
currentsong = -1;
|
||||||
|
|
||||||
if (quick_fade)
|
if (quick_fade)
|
||||||
{
|
{
|
||||||
Mix_FadeOutMusic(500); // fade out quicker
|
Mix_FadeOutMusic(500); // fade out quicker
|
||||||
|
@ -230,12 +241,6 @@ void musicclass::play(int t, const double position_sec /*= 0.0*/, const int fade
|
||||||
|
|
||||||
songStart = SDL_GetPerformanceCounter();
|
songStart = SDL_GetPerformanceCounter();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
currentsong = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void musicclass::resume(const int fadein_ms /*= 0*/)
|
void musicclass::resume(const int fadein_ms /*= 0*/)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue