mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Change nicefade to bool instead of int
If it's treated like a bool, why shouldn't it be one?
This commit is contained in:
parent
f0b9bdc007
commit
c1ca57e096
3 changed files with 8 additions and 7 deletions
|
@ -5925,7 +5925,7 @@ std::string Game::writemaingamesave(tinyxml2::XMLDocument& doc)
|
|||
|
||||
//Special stats
|
||||
|
||||
if(music.nicefade==1)
|
||||
if (music.nicefade)
|
||||
{
|
||||
xml::update_tag(msgs, "currentsong", music.nicechange);
|
||||
}
|
||||
|
@ -6058,7 +6058,7 @@ bool Game::customsavequick(std::string savfile)
|
|||
|
||||
//Special stats
|
||||
|
||||
if(music.nicefade==1)
|
||||
if (music.nicefade)
|
||||
{
|
||||
xml::update_tag(msgs, "currentsong", music.nicechange );
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ void musicclass::init()
|
|||
|
||||
currentsong = 0;
|
||||
nicechange = 0;
|
||||
nicefade = 0;
|
||||
nicefade = false;
|
||||
resumesong = 0;
|
||||
fadeoutqueuesong = -1;
|
||||
dontquickfade = false;
|
||||
|
@ -282,10 +282,11 @@ void musicclass::processmusic()
|
|||
fadeoutqueuesong = -1;
|
||||
}
|
||||
|
||||
if (nicefade == 1 && Mix_PlayingMusic() == 0)
|
||||
if (nicefade && Mix_PlayingMusic() == 0)
|
||||
{
|
||||
play(nicechange);
|
||||
nicechange = -1; nicefade = 0;
|
||||
nicechange = -1;
|
||||
nicefade = false;
|
||||
}
|
||||
|
||||
if(m_doFadeInVol)
|
||||
|
@ -305,7 +306,7 @@ void musicclass::niceplay(int t)
|
|||
dontquickfade = true;
|
||||
fadeout();
|
||||
}
|
||||
nicefade = 1;
|
||||
nicefade = true;
|
||||
nicechange = t;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
bool safeToProcessMusic;
|
||||
|
||||
int nicechange;
|
||||
int nicefade;
|
||||
bool nicefade;
|
||||
|
||||
bool m_doFadeInVol;
|
||||
int FadeVolAmountPerFrame;
|
||||
|
|
Loading…
Reference in a new issue