mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Replace main game music with music area map
The main game used a set of copy-pasted code to set the music of each area. There WAS some redundancy built-in, but only three rooms in each direction from the entrance of a zone. Given this, it's completely possible for players to mismatch the music of the area and level. In fact, it's easy to do it even on accident, especially since 2.3 now lets you quicksave and quit during cutscenes. Just play a cutscene that has Pause music, then quicksave, quit, and reload. Also some other accidental ways that I've forgotten about. To fix this, I've done what mapclass has and made an areamap. Except for music. This map is the map of the track number of every single room, except for three special cases: -1 for do nothing and don't change music (usually because multiple different tracks can be played in this room), -2 for Tower music (needs to be track 2 or 9 depending on Flip Mode), and -3 for the start of Space Station 2 (track 1 in time trials, track 4 otherwise). I've thoroughly tested this areamap by playing through the game and entering every single room. Additionally I've also thoroughly tested all special cases (entering the Ship through the teleporter or main entrance, using the Ship's jukebox, the Tower in Flip Mode and regular mode, and the start of Space Station 2 in time trial and in regular mode). Closes #449.
This commit is contained in:
@@ -1012,65 +1012,7 @@ void mapclass::gotoroom(int rx, int ry)
|
||||
game.currentroomdeaths = roomdeaths[game.roomx - 100 + (20 * (game.roomy - 100))];
|
||||
|
||||
//Alright, change music depending on where we are:
|
||||
//Tower
|
||||
if (game.roomx == 107 && game.roomy == 106) music.niceplay(4);
|
||||
if (game.roomx == 107 && game.roomy == 107) music.niceplay(4);
|
||||
if (game.roomx == 107 && game.roomy == 108) music.niceplay(4);
|
||||
if (game.roomx == 107 && game.roomy == 109) music.niceplay(4);
|
||||
if (game.roomx == 108 && game.roomy == 109)
|
||||
{
|
||||
if (graphics.setflipmode)
|
||||
{
|
||||
music.niceplay(9);
|
||||
}
|
||||
else
|
||||
{
|
||||
music.niceplay(2);
|
||||
}
|
||||
}
|
||||
if (game.roomx == 109)
|
||||
{
|
||||
if (graphics.setflipmode)
|
||||
{
|
||||
music.niceplay(9);
|
||||
}
|
||||
else
|
||||
{
|
||||
music.niceplay(2);
|
||||
}
|
||||
}
|
||||
//Warp Zone
|
||||
if (game.roomx == 112 && game.roomy == 101) music.niceplay(4);
|
||||
if (game.roomx == 113 && game.roomy == 101) music.niceplay(4);
|
||||
if (game.roomx == 113 && game.roomy == 102) music.niceplay(4);
|
||||
if (game.roomx == 114 && game.roomy == 101) music.niceplay(12);
|
||||
if (game.roomx == 115 && game.roomy == 101) music.niceplay(12);
|
||||
if (game.roomx == 115 && game.roomy == 102) music.niceplay(12);
|
||||
//Lab
|
||||
if (game.roomx == 101 && game.roomy == 115) music.niceplay(4);
|
||||
if (game.roomx == 100 && game.roomy == 115) music.niceplay(4);
|
||||
if (game.roomx == 101 && game.roomy == 116) music.niceplay(4);
|
||||
if (game.roomx == 100 && game.roomy == 116) music.niceplay(4);
|
||||
if (game.roomx == 102 && game.roomy == 116) music.niceplay(3);
|
||||
if (game.roomx == 102 && game.roomy == 117) music.niceplay(3);
|
||||
if (game.roomx == 101 && game.roomy == 117) music.niceplay(3);
|
||||
//Space Station
|
||||
if (game.intimetrial)
|
||||
{
|
||||
if (game.roomx == 111 && game.roomy == 112) music.niceplay(1);
|
||||
if (game.roomx == 111 && game.roomy == 113) music.niceplay(1);
|
||||
if (game.roomx == 112 && game.roomy == 114) music.niceplay(1);
|
||||
if (game.roomx == 112 && game.roomy == 115) music.niceplay(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (game.roomx == 111 && game.roomy == 112) music.niceplay(1);
|
||||
if (game.roomx == 111 && game.roomy == 113) music.niceplay(1);
|
||||
if (game.roomx == 112 && game.roomy == 114) music.niceplay(4);
|
||||
if (game.roomx == 112 && game.roomy == 115) music.niceplay(4);
|
||||
}
|
||||
//Leaving the Ship
|
||||
if (game.roomx == 104 && game.roomy == 112) music.niceplay(4);
|
||||
music.changemusicarea(game.roomx - 100, game.roomy - 100);
|
||||
}
|
||||
int temp = rx + (ry * 100);
|
||||
loadlevel(game.roomx, game.roomy);
|
||||
|
||||
Reference in New Issue
Block a user