mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
Revive the loading plaque.
At the request of scar3crow.
This commit is contained in:
parent
8516891329
commit
054e52528e
5 changed files with 26 additions and 7 deletions
|
@ -159,6 +159,8 @@ extern client_static_t cls;
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
qboolean loading;
|
||||
|
||||
int movemessages; // Since connecting to this server throw out
|
||||
// the first couple, so the player doesn't
|
||||
// accidentally do something the first frame
|
||||
|
|
|
@ -300,7 +300,7 @@ CL_SignonReply (void)
|
|||
break;
|
||||
|
||||
case 4:
|
||||
// SCR_EndLoadingPlaque (); // allow normal screen updates
|
||||
cl.loading = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -316,6 +316,9 @@ CL_NextDemo (void)
|
|||
if (cls.demonum == -1)
|
||||
return; // don't play demos
|
||||
|
||||
cl.loading = true;
|
||||
CL_UpdateScreen(cl.time);
|
||||
|
||||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
||||
cls.demonum = 0;
|
||||
if (!cls.demos[cls.demonum][0]) {
|
||||
|
|
|
@ -64,6 +64,18 @@ SCR_DrawNet (void)
|
|||
Draw_Pic (scr_vrect.x + 64, scr_vrect.y, scr_net);
|
||||
}
|
||||
|
||||
static void
|
||||
SCR_DrawLoading (void)
|
||||
{
|
||||
qpic_t *pic;
|
||||
|
||||
if (!cl.loading)
|
||||
return;
|
||||
pic = Draw_CachePic ("gfx/loading.lmp", 1);
|
||||
Draw_Pic ((vid.conwidth - pic->width) / 2,
|
||||
(vid.conheight - 48 - pic->height) / 2, pic);
|
||||
}
|
||||
|
||||
static SCR_Func scr_funcs_normal[] = {
|
||||
Draw_Crosshair,
|
||||
SCR_DrawRam,
|
||||
|
@ -73,6 +85,7 @@ static SCR_Func scr_funcs_normal[] = {
|
|||
Sbar_DrawCenterPrint,
|
||||
Sbar_Draw,
|
||||
Con_DrawConsole,
|
||||
SCR_DrawLoading,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ Host_Error (const char *error, ...)
|
|||
|
||||
inerror = true;
|
||||
|
||||
// SCR_EndLoadingPlaque (); // reenable screen updates
|
||||
cl.loading = false;
|
||||
|
||||
va_start (argptr, error);
|
||||
dvsprintf (str, error, argptr);
|
||||
|
|
|
@ -299,7 +299,8 @@ Host_Map_f (void)
|
|||
CL_Disconnect ();
|
||||
Host_ShutdownServer (false);
|
||||
|
||||
// SCR_BeginLoadingPlaque ();
|
||||
cl.loading = true;
|
||||
CL_UpdateScreen (cl.time);
|
||||
|
||||
cls.mapstring[0] = 0;
|
||||
for (i = 0; i < Cmd_Argc (); i++) {
|
||||
|
@ -379,7 +380,8 @@ Host_Restart_f (void)
|
|||
static void
|
||||
Host_Reconnect_f (void)
|
||||
{
|
||||
// SCR_BeginLoadingPlaque ();
|
||||
cl.loading = true;
|
||||
CL_UpdateScreen (cl.time);
|
||||
cls.signon = 0; // need new connection messages
|
||||
}
|
||||
|
||||
|
@ -623,9 +625,8 @@ Host_Loadgame_f (void)
|
|||
dsprintf (name, "%s/%s", qfs_gamedir->dir.def, Cmd_Argv (1));
|
||||
QFS_DefaultExtension (name, ".sav");
|
||||
|
||||
// we can't call SCR_BeginLoadingPlaque, because too much stack space has
|
||||
// been used. The menu calls it before stuffing loadgame command
|
||||
// SCR_BeginLoadingPlaque ();
|
||||
cl.loading = true;
|
||||
CL_UpdateScreen (cl.time);
|
||||
|
||||
Sys_Printf ("Loading game from %s...\n", name->str);
|
||||
f = QFS_Open (name->str, "rz");
|
||||
|
|
Loading…
Reference in a new issue