ent = cl_meshentities + i;
ent->state_current.active = true;
ent->render.model = cl_meshentitymodels + i;
+ Mod_Mesh_Create(ent->render.model, cl_meshentitynames[i]);
ent->render.alpha = 0.999999f; // not quite 1 so that MATERIALFLAG_ALPHA is always set.
ent->render.flags = RENDER_SHADOW | RENDER_LIGHT;
ent->render.framegroupblend[0].lerp = 1;
// if we got here...
// curl is done, so let's start with the business
if(!cl.loadbegun)
- SCR_PushLoadingScreen(false, "Loading precaches", 1);
+ SCR_PushLoadingScreen("Loading precaches", 1);
cl.loadbegun = true;
// if already downloading something from the previous level, don't stop it
if(cl.loadmodel_current == 1)
{
// worldmodel counts as 16 models (15 + world model setup), for better progress bar
- SCR_PushLoadingScreen(false, "Loading precached models",
+ SCR_PushLoadingScreen("Loading precached models",
(
(cl.loadmodel_total - 1) * LOADPROGRESSWEIGHT_MODEL
+ LOADPROGRESSWEIGHT_WORLDMODEL
+ cl.loadsound_total * LOADPROGRESSWEIGHT_SOUND
)
);
- SCR_BeginLoadingPlaque(false);
}
for (;cl.loadmodel_current < cl.loadmodel_total;cl.loadmodel_current++)
{
- SCR_PushLoadingScreen(false, cl.model_name[cl.loadmodel_current],
+ SCR_PushLoadingScreen(cl.model_name[cl.loadmodel_current],
(
(cl.loadmodel_current == 1) ? LOADPROGRESSWEIGHT_WORLDMODEL : LOADPROGRESSWEIGHT_MODEL
) / (
SCR_PopLoadingScreen(false);
if(cl.loadmodel_current == 1)
{
- SCR_PushLoadingScreen(false, cl.model_name[cl.loadmodel_current], 1.0 / cl.loadmodel_total);
+ SCR_PushLoadingScreen(cl.model_name[cl.loadmodel_current], 1.0 / cl.loadmodel_total);
SCR_PopLoadingScreen(false);
}
continue;
if (cl.model_precache[cl.loadmodel_current] && cl.model_precache[cl.loadmodel_current]->Draw && cl.loadmodel_current == 1)
{
// we now have the worldmodel so we can set up the game world
- SCR_PushLoadingScreen(true, "world model setup",
+ SCR_PushLoadingScreen("world model setup",
(
LOADPROGRESSWEIGHT_WORLDMODEL_INIT
) / (
{
// loading sounds
if(cl.loadsound_current == 1)
- SCR_PushLoadingScreen(false, "Loading precached sounds",
+ SCR_PushLoadingScreen("Loading precached sounds",
(
cl.loadsound_total * LOADPROGRESSWEIGHT_SOUND
) / (
);
for (;cl.loadsound_current < cl.loadsound_total;cl.loadsound_current++)
{
- SCR_PushLoadingScreen(false, cl.sound_name[cl.loadsound_current], 1.0 / cl.loadsound_total);
+ SCR_PushLoadingScreen(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);
// draw the loading screen for a while if we're still connecting and not forcing the console or menu to show up
char temp[64];
if (cls.signon > 0)
- SCR_PushLoadingScreen(false, va(temp, sizeof(temp), "Connect: Signon stage %i of %i", cls.signon, SIGNONS), 1.0);
+ SCR_PushLoadingScreen(va(temp, sizeof(temp), "Connect: Signon stage %i of %i", cls.signon, SIGNONS), 1.0);
else if (cls.connect_remainingtries > 0)
- SCR_PushLoadingScreen(false, va(temp, sizeof(temp), "Connect: Trying... %i", cls.connect_remainingtries), 1.0);
+ SCR_PushLoadingScreen(va(temp, sizeof(temp), "Connect: Trying... %i", cls.connect_remainingtries), 1.0);
else
- SCR_PushLoadingScreen(false, va(temp, sizeof(temp), "Connect: Waiting %i seconds for reply", 10 + cls.connect_remainingtries), 1.0);
+ SCR_PushLoadingScreen(va(temp, sizeof(temp), "Connect: Waiting %i seconds for reply", 10 + cls.connect_remainingtries), 1.0);
SCR_DrawLoadingScreen(true);
SCR_PopLoadingScreen(false);
}
void SCR_UpdateLoadingScreenIfShown(void)
{
- if(loadingscreendone)
SCR_UpdateLoadingScreen(loadingscreencleared, false);
}
-void SCR_PushLoadingScreen (qboolean redraw, const char *msg, float len_in_parent)
+void SCR_PushLoadingScreen (const char *msg, float len_in_parent)
{
loadingscreenstack_t *s = (loadingscreenstack_t *) Z_Malloc(sizeof(loadingscreenstack_t));
s->prev = loadingscreenstack;
s->absolute_loading_amount_len = 1;
}
- if(redraw)
SCR_UpdateLoadingScreenIfShown();
}
SCR_DrawLoadingStack();
}
-static void SCR_DrawLoadingScreen_SharedFinish (qboolean clear)
-{
- R_Mesh_Finish();
- // refresh
- VID_Finish();
-}
-
static double loadingscreen_lastupdate;
static void SCR_UpdateVars(void);
loadingscreen_lastupdate = t;
}
- SCR_UpdateVars();
-
// set up the r_texture_gammaramps texture which we need for rendering the loadingscreenpic
- VID_UpdateGamma();
R_UpdateVariables();
if(!scr_loadingscreen_background.integer)
SCR_DrawLoadingScreen(clear);
}
#endif
- SCR_DrawLoadingScreen_SharedFinish(clear);
+
+ R_Mesh_Finish();
+ DrawQ_Finish();
+ // refresh
+ VID_Finish();
// this goes into the event loop, and should prevent unresponsive cursor on vista
old_key_dest = key_dest;
int nummodels = (int)Mem_ExpandableArray_IndexRange(&models);
dp_model_t *mod;
- SCR_PushLoadingScreen(false, "Loading models", 1.0);
+ SCR_PushLoadingScreen("Loading models", 1.0);
count = 0;
for (i = 0;i < nummodels;i++)
if ((mod = (dp_model_t*) Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0] && mod->name[0] != '*')
if ((mod = (dp_model_t*) Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0] && mod->name[0] != '*')
if (mod->used)
{
- SCR_PushLoadingScreen(true, mod->name, 1.0 / count);
+ SCR_PushLoadingScreen(mod->name, 1.0 / count);
Mod_LoadModel(mod, true, false);
SCR_PopLoadingScreen(false);
}
if (developer_loading.integer)
Con_Printf("loading model %s\n", mod->name);
- SCR_PushLoadingScreen(true, mod->name, 1);
+ SCR_PushLoadingScreen(mod->name, 1);
// LadyHavoc: unload the existing model in this slot (if there is one)
if (mod->loaded || mod->mempool)
int nummodels = (int)Mem_ExpandableArray_IndexRange(&models);
dp_model_t *mod;
- SCR_PushLoadingScreen(false, "Reloading models", 1.0);
+ SCR_PushLoadingScreen("Reloading models", 1.0);
count = 0;
for (i = 0;i < nummodels;i++)
if ((mod = (dp_model_t *) Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0] && mod->name[0] != '*' && mod->used)
for (i = 0;i < nummodels;i++)
if ((mod = (dp_model_t *) Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0] && mod->name[0] != '*' && mod->used)
{
- SCR_PushLoadingScreen(true, mod->name, 1.0 / count);
+ SCR_PushLoadingScreen(mod->name, 1.0 / count);
Mod_LoadModel(mod, true, true);
SCR_PopLoadingScreen(false);
}
void SCR_UpdateLoadingScreenIfShown(void);
// pushes an item on the loading screen
-void SCR_PushLoadingScreen (qboolean redraw, const char *msg, float len_in_parent);
+void SCR_PushLoadingScreen (const char *msg, float len_in_parent);
void SCR_PopLoadingScreen (qboolean redraw);
void SCR_ClearLoadingScreen (qboolean redraw);
if (developer_loading.integer)
Con_Printf("loading sound %s\n", sfx->name);
- SCR_PushLoadingScreen(true, sfx->name, 1);
+ SCR_PushLoadingScreen(sfx->name, 1);
// LadyHavoc: if the sound filename does not begin with sound/, try adding it
if (strncasecmp(sfx->name, "sound/", 6))