From 04dc181de1b4273fd742fcb7d83dde825b051c39 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 18 Feb 2010 12:55:19 +0000 Subject: [PATCH] Steven's customizations: host_cmd.c (Host_Startdemos_f): if not running in fitzmode, don't add demos to the loop and set cls.demonum.to -1. menu.c (M_Draw): if not running in fitzmode, quit immediately without the dialog for the m_quit case. sbar.c (Sbar_SoloScoreboard): restored the original behavior depending on whether we are running in fitzmode. Marked the code with /* QuakeSpasm customization: */ in those places. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@50 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/host_cmd.c | 8 ++++++++ Quake/menu.c | 6 ++++++ Quake/sbar.c | 35 ++++++++++++++++++++++++++--------- 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Quake/host_cmd.c b/Quake/host_cmd.c index 2388ee42..04046917 100644 --- a/Quake/host_cmd.c +++ b/Quake/host_cmd.c @@ -2138,6 +2138,14 @@ void Host_Startdemos_f (void) return; } + if (!fitzmode) + { /* QuakeSpasm customization: */ + cls.demonum = -1; + /* go straight to menu */ + Cbuf_InsertText("menu_main"); + return; + } + c = Cmd_Argc() - 1; if (c > MAX_DEMOS) { diff --git a/Quake/menu.c b/Quake/menu.c index d3cca772..f65e5292 100644 --- a/Quake/menu.c +++ b/Quake/menu.c @@ -3026,6 +3026,12 @@ void M_Draw (void) break; case m_quit: + if (!fitzmode) + { /* QuakeSpasm customization: */ + /* Quit now! S.A. */ + key_dest = key_console; + Host_Quit_f (); + } M_Quit_Draw (); break; diff --git a/Quake/sbar.c b/Quake/sbar.c index d1c64319..cab79334 100644 --- a/Quake/sbar.c +++ b/Quake/sbar.c @@ -490,7 +490,8 @@ Sbar_SoloScoreboard -- johnfitz -- new layout void Sbar_SoloScoreboard (void) { char str[256]; - int len; + int minutes, seconds, tens, units; + int len; sprintf (str,"Kills: %i/%i", cl.stats[STAT_MONSTERS], cl.stats[STAT_TOTALMONSTERS]); Sbar_DrawString (8, 12, str); @@ -498,18 +499,34 @@ void Sbar_SoloScoreboard (void) sprintf (str,"Secrets: %i/%i", cl.stats[STAT_SECRETS], cl.stats[STAT_TOTALSECRETS]); Sbar_DrawString (312 - strlen(str)*8, 12, str); - sprintf (str,"skill %i", (int)(skill.value + 0.5)); + if (!fitzmode) + { /* QuakeSpasm customization: */ + sprintf (str,"skill %i", (int)(skill.value + 0.5)); + Sbar_DrawString (160 - strlen(str)*4, 12, str); + + sprintf (str,cl.levelname); + strcat (str," ("); + strncat (str,cl.mapname,250-strlen(str)); + strcat (str,")"); + len = strlen (str); + if (len > 40) + Sbar_DrawScrollString (0, 4, 320, str); + else + Sbar_DrawString (160 - len*4, 4, str); + return; + } + minutes = cl.time / 60; + seconds = cl.time - 60*minutes; + tens = seconds / 10; + units = seconds - 10*tens; + sprintf (str,"%i:%i%i", minutes, tens, units); Sbar_DrawString (160 - strlen(str)*4, 12, str); - sprintf (str,cl.levelname); - strcat (str," ("); - strncat (str,cl.mapname,250-strlen(str)); - strcat (str,")"); - len = strlen (str); + len = strlen (cl.levelname); if (len > 40) - Sbar_DrawScrollString (0, 4, 320, str); + Sbar_DrawScrollString (0, 4, 320, cl.levelname); else - Sbar_DrawString (160 - len*4, 4, str); + Sbar_DrawString (160 - len*4, 4, cl.levelname); } /*