mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +01:00
Don't hardcode MIX_MAX_VOLUME value of 128
The value of the macro might not change in the future, but it's there for a reason. That reason being to improve code readability, because otherwise 128 would just be a magic number that plopped in out of nowhere. Sometimes the game uses MIX_MAX_VOLUME, other times it uses 128, so to be consistent I'm just going to enforce MIX_MAX_VOLUME entirely.
This commit is contained in:
parent
ba04c361c6
commit
d0b3cfa08c
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ void musicclass::init()
|
||||||
|
|
||||||
safeToProcessMusic= false;
|
safeToProcessMusic= false;
|
||||||
m_doFadeInVol = false;
|
m_doFadeInVol = false;
|
||||||
musicVolume = 128;
|
musicVolume = MIX_MAX_VOLUME;
|
||||||
FadeVolAmountPerFrame = 0;
|
FadeVolAmountPerFrame = 0;
|
||||||
|
|
||||||
currentsong = 0;
|
currentsong = 0;
|
||||||
|
@ -177,7 +177,7 @@ 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;
|
||||||
Mix_VolumeMusic(128);
|
Mix_VolumeMusic(MIX_MAX_VOLUME);
|
||||||
if (currentsong !=t)
|
if (currentsong !=t)
|
||||||
{
|
{
|
||||||
if (t != -1)
|
if (t != -1)
|
||||||
|
|
Loading…
Reference in a new issue