mirror of https://github.com/OpenTTD/OpenTTD
(svn r3641) - Rename MusicFilesettings 'btn_down' to more sensible 'playing'
parent
c7e34bd103
commit
4aaae55c08
|
@ -182,9 +182,9 @@ void ResetMusic(void)
|
||||||
|
|
||||||
void MusicLoop(void)
|
void MusicLoop(void)
|
||||||
{
|
{
|
||||||
if (!msf.btn_down && _song_is_active) {
|
if (!msf.playing && _song_is_active) {
|
||||||
StopMusic();
|
StopMusic();
|
||||||
} else if (msf.btn_down && !_song_is_active) {
|
} else if (msf.playing && !_song_is_active) {
|
||||||
PlayPlaylistSong();
|
PlayPlaylistSong();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,10 +405,10 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e)
|
||||||
SkipToNextSong();
|
SkipToNextSong();
|
||||||
break;
|
break;
|
||||||
case 4: // stop playing
|
case 4: // stop playing
|
||||||
msf.btn_down = false;
|
msf.playing = false;
|
||||||
break;
|
break;
|
||||||
case 5: // start playing
|
case 5: // start playing
|
||||||
msf.btn_down = true;
|
msf.playing = true;
|
||||||
break;
|
break;
|
||||||
case 6:{ // volume sliders
|
case 6:{ // volume sliders
|
||||||
byte *vol,new_vol;
|
byte *vol,new_vol;
|
||||||
|
|
|
@ -794,7 +794,7 @@ static const SettingDesc music_settings[] = {
|
||||||
{"effect_vol",SDT_UINT8, (void*)128, &msf.effect_vol, NULL},
|
{"effect_vol",SDT_UINT8, (void*)128, &msf.effect_vol, NULL},
|
||||||
{"custom_1", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_1) << 16, NULL, &msf.custom_1, NULL},
|
{"custom_1", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_1) << 16, NULL, &msf.custom_1, NULL},
|
||||||
{"custom_2", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_2) << 16, NULL, &msf.custom_2, NULL},
|
{"custom_2", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_2) << 16, NULL, &msf.custom_2, NULL},
|
||||||
{"playing", SDT_BOOL, (void*)true, &msf.btn_down, NULL},
|
{"playing", SDT_BOOL, (void*)true, &msf.playing, NULL},
|
||||||
{"shuffle", SDT_BOOL, (void*)false, &msf.shuffle, NULL},
|
{"shuffle", SDT_BOOL, (void*)false, &msf.shuffle, NULL},
|
||||||
{"extmidi", SDT_STRINGBUF | (lengthof(msf.extmidi)<<16), EXTERNAL_PLAYER, &msf.extmidi, NULL},
|
{"extmidi", SDT_STRINGBUF | (lengthof(msf.extmidi)<<16), EXTERNAL_PLAYER, &msf.extmidi, NULL},
|
||||||
{NULL, 0, NULL, NULL, NULL}
|
{NULL, 0, NULL, NULL, NULL}
|
||||||
|
|
2
sound.h
2
sound.h
|
@ -9,7 +9,7 @@ typedef struct MusicFileSettings {
|
||||||
byte effect_vol;
|
byte effect_vol;
|
||||||
byte custom_1[33];
|
byte custom_1[33];
|
||||||
byte custom_2[33];
|
byte custom_2[33];
|
||||||
bool btn_down;
|
bool playing;
|
||||||
bool shuffle;
|
bool shuffle;
|
||||||
char extmidi[80];
|
char extmidi[80];
|
||||||
} MusicFileSettings;
|
} MusicFileSettings;
|
||||||
|
|
Loading…
Reference in New Issue