Store non-looping information in musicdef

Preface with a `\` (ie `Lump VOTEEA,\VOTEEB`) to indicate the preference is not to loop.
This is for special jingles that have definitive conclusions.
This commit is contained in:
toaster 2023-03-30 23:28:51 +01:00
parent 2c0645cba2
commit fe8db18066
2 changed files with 8 additions and 1 deletions

View file

@ -1613,7 +1613,8 @@ void S_SoundTestPlay(void)
S_SoundTestTogglePause();
}
S_ChangeMusicInternal(soundtest.current->name[soundtest.currenttrack], true);
S_ChangeMusicInternal(soundtest.current->name[soundtest.currenttrack],
!soundtest.current->basenoloop[soundtest.currenttrack]);
S_ShowMusicCredit();
soundtest.privilegedrequest = false;
@ -1760,6 +1761,11 @@ ReadMusicDefFields
do {
if (i >= MAXDEFTRACKS)
break;
if (value[0] == '\\')
{
def->basenoloop[i] = true;
value++;
}
STRBUFCPY(def->name[i], value);
strlwr(def->name[i]);
def->hash[i] = quickncasehash (def->name[i], 6);

View file

@ -188,6 +188,7 @@ struct musicdef_t
{
char name[MAXDEFTRACKS][7];
UINT32 hash[MAXDEFTRACKS];
boolean basenoloop[MAXDEFTRACKS];
UINT8 numtracks;
char *title;
char *author;