}
for (;cl.loadmodel_current < cl.loadmodel_total;cl.loadmodel_current++)
{
- SCR_PushLoadingScreen(true, cl.model_name[cl.loadmodel_current],
+ SCR_PushLoadingScreen(false, cl.model_name[cl.loadmodel_current],
(
(cl.loadmodel_current == 1) ? LOADPROGRESSWEIGHT_WORLDMODEL : LOADPROGRESSWEIGHT_MODEL
) / (
);
for (;cl.loadsound_current < cl.loadsound_total;cl.loadsound_current++)
{
- SCR_PushLoadingScreen(true, cl.sound_name[cl.loadsound_current], 1.0 / cl.loadsound_total);
+ SCR_PushLoadingScreen(false, cl.sound_name[cl.loadsound_current], 1.0 / cl.loadsound_total);
if (cl.sound_precache[cl.loadsound_current] && S_IsSoundPrecached(cl.sound_precache[cl.loadsound_current]))
{
SCR_PopLoadingScreen(false);
return NULL;
}
int S_LoadSound(sfx_t *sfx, int complain){
+ // TODO add SCR_PushLoadingScreen, SCR_PopLoadingScreen calls to this
fs_offset_t filesize;
char namebuffer[MAX_QPATH +16 ];
char filename [MAX_QPATH +16+4];
if (developer_loading.integer)
Con_Printf("loading sound %s\n", sfx->name);
+ SCR_PushLoadingScreen(true, sfx->name, 1);
+
// LordHavoc: if the sound filename does not begin with sound/, try adding it
if (strncasecmp(sfx->name, "sound/", 6))
{
if (len >= 4 && !strcasecmp (namebuffer + len - 4, ".wav"))
{
if (S_LoadWavFile (namebuffer, sfx))
- return true;
+ goto loaded;
memcpy (namebuffer + len - 3, "ogg", 4);
}
if (len >= 4 && !strcasecmp (namebuffer + len - 4, ".ogg"))
{
if (OGG_LoadVorbisFile (namebuffer, sfx))
- return true;
+ goto loaded;
}
else
{
if (ModPlug_LoadModPlugFile (namebuffer, sfx))
- return true;
+ goto loaded;
}
}
if (len >= 4 && !strcasecmp (namebuffer + len - 4, ".wav"))
{
if (S_LoadWavFile (namebuffer, sfx))
- return true;
+ goto loaded;
memcpy (namebuffer + len - 3, "ogg", 4);
}
if (len >= 4 && !strcasecmp (namebuffer + len - 4, ".ogg"))
{
if (OGG_LoadVorbisFile (namebuffer, sfx))
- return true;
+ goto loaded;
}
else
{
if (ModPlug_LoadModPlugFile (namebuffer, sfx))
- return true;
+ goto loaded;
}
// Can't load the sound!
sfx->flags |= SFXFLAG_FILEMISSING;
if (complain)
Con_DPrintf("failed to load sound \"%s\"\n", sfx->name);
+
+ SCR_PopLoadingScreen(false);
return false;
+
+loaded:
+ SCR_PopLoadingScreen(false);
+ return true;
}