mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
Misc. cleanups.
This commit is contained in:
parent
432ae86cca
commit
8811dd520e
1 changed files with 8 additions and 10 deletions
|
@ -64,6 +64,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include "QF/dstring.h"
|
#include "QF/dstring.h"
|
||||||
#include "QF/qfplist.h"
|
#include "QF/qfplist.h"
|
||||||
#include "QF/sound.h"
|
#include "QF/sound.h"
|
||||||
|
#include "QF/va.h"
|
||||||
#include "snd_render.h"
|
#include "snd_render.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
@ -160,7 +161,7 @@ I_OGGMus_Shutdown (void)
|
||||||
static int
|
static int
|
||||||
Load_Tracklist (void)
|
Load_Tracklist (void)
|
||||||
{
|
{
|
||||||
static QFile *oggfile = NULL;
|
QFile *oggfile = NULL;
|
||||||
char *buffile = NULL;
|
char *buffile = NULL;
|
||||||
int size = -1;
|
int size = -1;
|
||||||
|
|
||||||
|
@ -234,8 +235,8 @@ static void
|
||||||
I_OGGMus_Play (int track, qboolean looping)
|
I_OGGMus_Play (int track, qboolean looping)
|
||||||
{
|
{
|
||||||
plitem_t *trackmap = NULL;
|
plitem_t *trackmap = NULL;
|
||||||
dstring_t *trackstring = dstring_new ();
|
|
||||||
wavinfo_t *info = 0;
|
wavinfo_t *info = 0;
|
||||||
|
const char *trackstring;
|
||||||
|
|
||||||
Sys_DPrintf ("Entering I_OGGMus_Play\n");
|
Sys_DPrintf ("Entering I_OGGMus_Play\n");
|
||||||
/* alrighty. grab the list, map track to filename. grab filename from data
|
/* alrighty. grab the list, map track to filename. grab filename from data
|
||||||
|
@ -247,16 +248,13 @@ I_OGGMus_Play (int track, qboolean looping)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tracklist || !mus_enabled) {
|
if (!tracklist || !mus_enabled) {
|
||||||
free (trackstring);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dsprintf (trackstring, "%i", track);
|
trackstring = va ("%i", track);
|
||||||
trackmap = PL_ObjectForKey (tracklist, trackstring->str);
|
trackmap = PL_ObjectForKey (tracklist, trackstring);
|
||||||
free (trackstring);
|
|
||||||
|
|
||||||
if (!trackmap || trackmap->type != QFString) {
|
if (!trackmap || trackmap->type != QFString) {
|
||||||
Sys_Printf ("No Track entry for track #%s.\n", trackstring->str);
|
Sys_Printf ("No Track entry for track #%s.\n", trackstring);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue