mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
More improvements from ashridah.
This commit is contained in:
parent
8ea7690530
commit
6880b42182
1 changed files with 8 additions and 11 deletions
|
@ -235,6 +235,9 @@ I_OGGMus_Play (int track, qboolean looping)
|
||||||
if (!tracklist || !mus_enabled)
|
if (!tracklist || !mus_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (playing)
|
||||||
|
I_OGGMus_Stop ();
|
||||||
|
|
||||||
trackstring = va ("%i", track);
|
trackstring = va ("%i", track);
|
||||||
trackmap = PL_ObjectForKey (tracklist, trackstring);
|
trackmap = PL_ObjectForKey (tracklist, trackstring);
|
||||||
if (!trackmap || trackmap->type != QFString) {
|
if (!trackmap || trackmap->type != QFString) {
|
||||||
|
@ -270,36 +273,30 @@ I_OGGMus_Play (int track, qboolean looping)
|
||||||
static void
|
static void
|
||||||
I_OGGMus_Info (void)
|
I_OGGMus_Info (void)
|
||||||
{
|
{
|
||||||
plitem_t *keylist = NULL;
|
int count = 0, iter = 0, keycount = 0;
|
||||||
plitem_t *currenttrack = NULL;
|
|
||||||
int count = 0, iter = 0;
|
|
||||||
const char *trackstring;
|
const char *trackstring;
|
||||||
|
plitem_t *currenttrack = NULL;
|
||||||
|
|
||||||
if (!tracklist) {
|
if (!tracklist) {
|
||||||
Sys_Printf ("\n" "No Tracklist\n" "------------\n");
|
Sys_Printf ("\n" "No Tracklist\n" "------------\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(keylist = PL_D_AllKeys (tracklist))) {
|
if (!(keycount = PL_D_NumKeys (tracklist)))
|
||||||
Sys_DPrintf ("OGGMus: Didn't get valid plist_t array, yet have "
|
|
||||||
"valid tracklist?\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
Sys_Printf ("\n" "Tracklist loaded from file:\n%s\n"
|
Sys_Printf ("\n" "Tracklist loaded from file:\n%s\n"
|
||||||
"---------------------------\n", mus_ogglist->string);
|
"---------------------------\n", mus_ogglist->string);
|
||||||
|
|
||||||
/* loop, and count up the Highest key number. */
|
/* loop, and count up the Highest key number. */
|
||||||
for (iter = 1, count = 0; count < ((plarray_t *) (keylist->data))->numvals
|
for (iter = 1, count = 0; count < keycount && iter <= 99 ; iter++) {
|
||||||
&& iter <= 99 ; iter++) {
|
|
||||||
trackstring = va ("%i", iter);
|
trackstring = va ("%i", iter);
|
||||||
if (!(currenttrack = PL_ObjectForKey (tracklist, trackstring))) {
|
if (!(currenttrack = PL_ObjectForKey (tracklist, trackstring))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf (" %s - %s\n", trackstring, (char *) currenttrack->data);
|
Sys_Printf (" %s - %s\n", trackstring, (char *) currenttrack->data);
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
}
|
}
|
||||||
PL_Free (keylist);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue