mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 23:42:07 +00:00
musicdef_t: Add an important parameter
If set to true/yes/1, add at the head of the sequence in S_PopulateSoundTestSequence. Otherwise, append to the tail.
This commit is contained in:
parent
5dd4e36b72
commit
dc8a97475f
2 changed files with 22 additions and 1 deletions
|
|
@ -1481,7 +1481,8 @@ void S_PopulateSoundTestSequence(void)
|
||||||
S_InsertMapIntoSoundTestSequence(i, &tail);
|
S_InsertMapIntoSoundTestSequence(i, &tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, we insert all other musicdefstart at the head.
|
// Finally, we insert all important musicdefs at the head,
|
||||||
|
// and all others at the tail.
|
||||||
// It's being added to the sequence in reverse order...
|
// It's being added to the sequence in reverse order...
|
||||||
// but because musicdefstart is ALSO populated in reverse,
|
// but because musicdefstart is ALSO populated in reverse,
|
||||||
// the reverse of the reverse is the right way around!
|
// the reverse of the reverse is the right way around!
|
||||||
|
|
@ -1493,12 +1494,27 @@ void S_PopulateSoundTestSequence(void)
|
||||||
if (def->sequence.id == soundtest.sequence.id)
|
if (def->sequence.id == soundtest.sequence.id)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (def->important == false)
|
||||||
|
continue;
|
||||||
|
|
||||||
def->sequence.id = soundtest.sequence.id;
|
def->sequence.id = soundtest.sequence.id;
|
||||||
def->sequence.map = NEXTMAP_INVALID;
|
def->sequence.map = NEXTMAP_INVALID;
|
||||||
|
|
||||||
def->sequence.next = soundtest.sequence.next;
|
def->sequence.next = soundtest.sequence.next;
|
||||||
soundtest.sequence.next = def;
|
soundtest.sequence.next = def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (def = musicdefstart; def; def = def->next)
|
||||||
|
{
|
||||||
|
if (def->sequence.id == soundtest.sequence.id)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
def->sequence.id = soundtest.sequence.id;
|
||||||
|
def->sequence.map = NEXTMAP_INVALID;
|
||||||
|
|
||||||
|
def->sequence.next = *tail;
|
||||||
|
*tail = def;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1961,6 +1977,10 @@ ReadMusicDefFields
|
||||||
{
|
{
|
||||||
def->volume = atoi(textline);
|
def->volume = atoi(textline);
|
||||||
}
|
}
|
||||||
|
else if (!stricmp(stoken, "important"))
|
||||||
|
{
|
||||||
|
def->important = (textline[0] == 'Y' || textline[0] == 'T' || textline[0] == '1');
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MusicDefError(CONS_WARNING,
|
MusicDefError(CONS_WARNING,
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,7 @@ struct musicdef_t
|
||||||
char *composers;
|
char *composers;
|
||||||
int volume;
|
int volume;
|
||||||
int debug_volume;
|
int debug_volume;
|
||||||
|
boolean important;
|
||||||
musicdef_t *next;
|
musicdef_t *next;
|
||||||
soundtestsequence_t sequence;
|
soundtestsequence_t sequence;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue