code cleanups

This commit is contained in:
zicodxx 2006-05-05 14:14:55 +00:00
parent 5f7dab24d2
commit 6a9c15ac25
2 changed files with 7 additions and 12 deletions

View file

@ -297,7 +297,7 @@ static void reset_tracks(struct hmp_file *hmp)
hmp->cur_time=0;
}
extern int non_loop;
extern int loop;
static void _stdcall midi_callback(HMIDISTRM hms, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2) {
MIDIHDR *mhdr;
@ -316,12 +316,11 @@ static void _stdcall midi_callback(HMIDISTRM hms, UINT uMsg, DWORD dwUser, DWORD
if (!hmp->stop) {
while (fill_buffer(hmp) == HMP_EOF) {
if (non_loop)
{
hmp->stop = 1; // ZICO - FIXME
} else {
if (loop)
hmp->stop = 0;
}
else
hmp->stop = 1;
reset_tracks(hmp);
}
if ((rc = midiStreamOut(hmp->hmidi, hmp->evbuf,

View file

@ -107,17 +107,13 @@ void songs_init()
#endif
}
int non_loop;
int loop;
void songs_play_song( int songnum, int repeat )
{
if ( !Songs_initialized ) songs_init();
if (!repeat) {
non_loop = 1;
} else {
non_loop = 0;
}
loop=repeat;
digi_play_midi_song( Songs[songnum].filename, Songs[songnum].melodic_bank_file, Songs[songnum].drum_bank_file, repeat );
}