mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +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
|
typedef struct
|
||||||
{
|
{
|
||||||
|
qboolean loading;
|
||||||
|
|
||||||
int movemessages; // Since connecting to this server throw out
|
int movemessages; // Since connecting to this server throw out
|
||||||
// the first couple, so the player doesn't
|
// the first couple, so the player doesn't
|
||||||
// accidentally do something the first frame
|
// accidentally do something the first frame
|
||||||
|
|
|
@ -300,7 +300,7 @@ CL_SignonReply (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
// SCR_EndLoadingPlaque (); // allow normal screen updates
|
cl.loading = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,6 +316,9 @@ CL_NextDemo (void)
|
||||||
if (cls.demonum == -1)
|
if (cls.demonum == -1)
|
||||||
return; // don't play demos
|
return; // don't play demos
|
||||||
|
|
||||||
|
cl.loading = true;
|
||||||
|
CL_UpdateScreen(cl.time);
|
||||||
|
|
||||||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
||||||
cls.demonum = 0;
|
cls.demonum = 0;
|
||||||
if (!cls.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);
|
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[] = {
|
static SCR_Func scr_funcs_normal[] = {
|
||||||
Draw_Crosshair,
|
Draw_Crosshair,
|
||||||
SCR_DrawRam,
|
SCR_DrawRam,
|
||||||
|
@ -73,6 +85,7 @@ static SCR_Func scr_funcs_normal[] = {
|
||||||
Sbar_DrawCenterPrint,
|
Sbar_DrawCenterPrint,
|
||||||
Sbar_Draw,
|
Sbar_Draw,
|
||||||
Con_DrawConsole,
|
Con_DrawConsole,
|
||||||
|
SCR_DrawLoading,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ Host_Error (const char *error, ...)
|
||||||
|
|
||||||
inerror = true;
|
inerror = true;
|
||||||
|
|
||||||
// SCR_EndLoadingPlaque (); // reenable screen updates
|
cl.loading = false;
|
||||||
|
|
||||||
va_start (argptr, error);
|
va_start (argptr, error);
|
||||||
dvsprintf (str, error, argptr);
|
dvsprintf (str, error, argptr);
|
||||||
|
|
|
@ -299,7 +299,8 @@ Host_Map_f (void)
|
||||||
CL_Disconnect ();
|
CL_Disconnect ();
|
||||||
Host_ShutdownServer (false);
|
Host_ShutdownServer (false);
|
||||||
|
|
||||||
// SCR_BeginLoadingPlaque ();
|
cl.loading = true;
|
||||||
|
CL_UpdateScreen (cl.time);
|
||||||
|
|
||||||
cls.mapstring[0] = 0;
|
cls.mapstring[0] = 0;
|
||||||
for (i = 0; i < Cmd_Argc (); i++) {
|
for (i = 0; i < Cmd_Argc (); i++) {
|
||||||
|
@ -379,7 +380,8 @@ Host_Restart_f (void)
|
||||||
static void
|
static void
|
||||||
Host_Reconnect_f (void)
|
Host_Reconnect_f (void)
|
||||||
{
|
{
|
||||||
// SCR_BeginLoadingPlaque ();
|
cl.loading = true;
|
||||||
|
CL_UpdateScreen (cl.time);
|
||||||
cls.signon = 0; // need new connection messages
|
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));
|
dsprintf (name, "%s/%s", qfs_gamedir->dir.def, Cmd_Argv (1));
|
||||||
QFS_DefaultExtension (name, ".sav");
|
QFS_DefaultExtension (name, ".sav");
|
||||||
|
|
||||||
// we can't call SCR_BeginLoadingPlaque, because too much stack space has
|
cl.loading = true;
|
||||||
// been used. The menu calls it before stuffing loadgame command
|
CL_UpdateScreen (cl.time);
|
||||||
// SCR_BeginLoadingPlaque ();
|
|
||||||
|
|
||||||
Sys_Printf ("Loading game from %s...\n", name->str);
|
Sys_Printf ("Loading game from %s...\n", name->str);
|
||||||
f = QFS_Open (name->str, "rz");
|
f = QFS_Open (name->str, "rz");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue