1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +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:
Misa 2020-10-10 23:36:18 -07:00 committed by Ethan Lee
parent ba04c361c6
commit d0b3cfa08c

View file

@ -132,7 +132,7 @@ void musicclass::init()
safeToProcessMusic= false;
m_doFadeInVol = false;
musicVolume = 128;
musicVolume = MIX_MAX_VOLUME;
FadeVolAmountPerFrame = 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;
}
safeToProcessMusic = true;
Mix_VolumeMusic(128);
Mix_VolumeMusic(MIX_MAX_VOLUME);
if (currentsong !=t)
{
if (t != -1)