1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Remove outdated comments from Music.h and Music.cpp

Lots of stuff from the Flash version, especially in Music.h.
This commit is contained in:
Misa 2020-04-02 18:02:25 -07:00 committed by Ethan Lee
parent 4c2ecac0e0
commit eea2232c12
2 changed files with 0 additions and 64 deletions

View file

@ -233,15 +233,6 @@ void musicclass::play(int t)
Mix_VolumeMusic(128); Mix_VolumeMusic(128);
if (currentsong !=t) if (currentsong !=t)
{ {
if (currentsong != -1)
{
// Stop the old song first
// musicchannel.stop();
if (currentsong != 0)
{
// musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic);
}
}
if (t != -1) if (t != -1)
{ {
// musicfade = 0; // musicfade = 0;
@ -249,8 +240,6 @@ void musicclass::play(int t)
if (currentsong == 0 || currentsong == 7 || currentsong == 16 || currentsong == 23) if (currentsong == 0 || currentsong == 7 || currentsong == 16 || currentsong == 23)
{ {
// Level Complete theme, no fade in or repeat // Level Complete theme, no fade in or repeat
// musicchannel = musicchan[currentsong].play(0);
// musicchannel.soundTransform = new SoundTransform(1.0);
if(Mix_FadeInMusic(musicTracks[t].m_music, 0, 0)==-1) if(Mix_FadeInMusic(musicTracks[t].m_music, 0, 0)==-1)
{ {
printf("Mix_PlayMusic: %s\n", Mix_GetError()); printf("Mix_PlayMusic: %s\n", Mix_GetError());
@ -258,10 +247,6 @@ void musicclass::play(int t)
} }
else else
{ {
// musicfadein = 90;
// musicchannel = musicchan[currentsong].play(0);
// musicchannel.soundTransform = new SoundTransform(0);
// musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic);
if (Mix_FadingMusic() == MIX_FADING_OUT) { if (Mix_FadingMusic() == MIX_FADING_OUT) {
// We're already fading out // We're already fading out
fadeoutqueuesong = t; fadeoutqueuesong = t;
@ -295,26 +280,18 @@ void musicclass::loopmusic()
void musicclass::stopmusic() void musicclass::stopmusic()
{ {
// musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic);
// musicchannel.stop();
Mix_HaltMusic(); Mix_HaltMusic();
currentsong = -1; currentsong = -1;
} }
void musicclass::haltdasmusik() void musicclass::haltdasmusik()
{ {
// musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic);
// musicchannel.stop();
// resumesong = currentsong;
Mix_HaltMusic(); Mix_HaltMusic();
currentsong = -1; currentsong = -1;
} }
void musicclass::silencedasmusik() void musicclass::silencedasmusik()
{ {
//if(currentsong>-1){
// musicchannel.soundTransform = new SoundTransform(0);
//}
Mix_VolumeMusic(0) ; Mix_VolumeMusic(0) ;
musicVolume = 0; musicVolume = 0;
} }
@ -327,13 +304,6 @@ void musicclass::fadeMusicVolumeIn(int ms)
void musicclass::fadeout() void musicclass::fadeout()
{ {
//if(currentsong>-1){
// if (musicfade == 0) {
// musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic);
// musicfade = 61;
// }
//}
Mix_FadeOutMusic(2000); Mix_FadeOutMusic(2000);
currentsong = -1; currentsong = -1;
} }
@ -366,9 +336,6 @@ void musicclass::processmusic()
return; return;
} }
//if (musicfade > 0) processmusicfade();
//if (musicfadein > 0) processmusicfadein();
if (fadeoutqueuesong != -1 && Mix_PlayingMusic() == 0) { if (fadeoutqueuesong != -1 && Mix_PlayingMusic() == 0) {
play(fadeoutqueuesong); play(fadeoutqueuesong);
fadeoutqueuesong = -1; fadeoutqueuesong = -1;
@ -384,28 +351,6 @@ void musicclass::processmusic()
{ {
processmusicfadein(); processmusicfadein();
} }
//musicstopother--;
//if (musicstopother == 1) {
// musicstopother = 0;
// if (currentmusicchan == 0) musicchannel2.stop();
// if (currentmusicchan == 1) musicchannel.stop();
//}
//if (musicstopother < 0) musicstopother = 0;
//musicchancur--;
//if (musicchancur <= 0 && currentsong > -1 && musicchanlen > 0) {
// musicchancur = musicchanlen;
// if (currentmusicchan == 0) {
// musicchannel2 = musicchan[currentsong].play();
// musicstopother = 3;
// currentmusicchan = 1;
// }else {
// musicchannel = musicchan[currentsong].play();
// musicstopother = 3;
// currentmusicchan = 0;
// }
//}
} }
@ -462,9 +407,6 @@ void musicclass::changemusicarea(int x, int y)
void musicclass::playef(int t) void musicclass::playef(int t)
{ {
// efchannel[currentefchan] = efchan[t].play(offset);
// currentefchan++;
// if (currentefchan > 15) currentefchan -= 16;
int channel; int channel;
channel = Mix_PlayChannel(-1, soundTracks[t].sound, 0); channel = Mix_PlayChannel(-1, soundTracks[t].sound, 0);

View file

@ -26,15 +26,9 @@ public:
void changemusicarea(int x, int y); void changemusicarea(int x, int y);
// public var musicchan:Array = new Array();
// public var musicchannel:SoundChannel, musicchannel2:SoundChannel;
// public var currentmusicchan:int, musicchanlen:int, musicchancur:int, musicstopother:int, resumesong:int;
// public var currentsong:int, musicfade:int, musicfadein:int;
int currentsong, musicfade, musicfadein; int currentsong, musicfade, musicfadein;
int resumesong; int resumesong;
//public var nicefade:int, nicechange:int;
void playef(int t); void playef(int t);
std::vector<SoundTrack> soundTracks; std::vector<SoundTrack> soundTracks;