mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Use enums for music tracks
This adds an anonymous enum for music tracks and replaces all calls to music.play and music.niceplay that use integer literals. Additionally, this is also done for integer literals for cl.levmusic (except 0) and music.currentsong where appropriate, but _not_ the music areamap because that would not make it look very aesthetically pleasing in the code. This is not a named enum (that can be used for strict typechecking) because music track IDs are essentially part of the API of the game - almost every custom level uses these numbers. This is just to make the source code more readable without needing a comment to denote what number is what track.
This commit is contained in:
@@ -953,9 +953,9 @@ void mapclass::gotoroom(int rx, int ry)
|
||||
}
|
||||
|
||||
//Final level for time trial
|
||||
if (game.intimetrial)
|
||||
if (game.intimetrial && game.roomx == 46 && game.roomy == 54)
|
||||
{
|
||||
if (game.roomx == 46 && game.roomy == 54) music.niceplay(15); //Final level remix
|
||||
music.niceplay(Music_PREDESTINEDFATEREMIX);
|
||||
}
|
||||
}
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
|
||||
Reference in New Issue
Block a user