mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Factor fade amount calculation to separate function
This makes it so to reuse this code, we don't have to copy-paste it. Additionally, I added a check for the milliseconds being 0, to avoid a division by zero. Logically and mathematically, if the fade amount is 0 milliseconds, then that means the fade should happen instantly - however, dividing by zero is undefined (both in math and in C/C++), so this check needs to be added.
This commit is contained in:
@@ -19,6 +19,7 @@ public:
|
||||
void resume(const int fadein_ms = 0);
|
||||
void haltdasmusik(void);
|
||||
void silencedasmusik(void);
|
||||
void setfadeamount(const int fade_ms);
|
||||
void fadeMusicVolumeIn(int ms);
|
||||
void fadeout(const bool quick_fade_ = true);
|
||||
void fadein(void);
|
||||
|
||||
Reference in New Issue
Block a user