From: havoc Date: Thu, 13 Jan 2005 06:23:32 +0000 (+0000) Subject: changed scr_conlines to be a local variable named conlines X-Git-Tag: xonotic-v0.1.0preview~5227 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9cf7ff5dd394fe9c6b86dfab00a3636cc21fd663;p=xonotic%2Fdarkplaces.git changed scr_conlines to be a local variable named conlines now draws fullscreen console (between levels) without altering scr_con_current git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4922 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index d34f838a..7051d0bf 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -34,7 +34,6 @@ int jpeg_supported = false; qboolean scr_initialized; // ready to draw float scr_con_current; -float scr_conlines; // lines of console to display extern int con_vislines; @@ -234,6 +233,9 @@ SCR_SetUpToDrawConsole */ void SCR_SetUpToDrawConsole (void) { + // lines of console to display + float conlines; + Con_CheckResize (); if (key_dest == key_game && cls.signon != SIGNONS && scr_conforcewhiledisconnected.integer) @@ -242,31 +244,29 @@ void SCR_SetUpToDrawConsole (void) key_consoleactive &= ~KEY_CONSOLEACTIVE_FORCED; // decide on the height of the console - if (key_consoleactive & KEY_CONSOLEACTIVE_FORCED) - scr_conlines = vid.conheight; // full screen - else if (key_consoleactive & KEY_CONSOLEACTIVE_USER) - scr_conlines = vid.conheight/2; // half screen + if (key_consoleactive & KEY_CONSOLEACTIVE_USER) + conlines = vid.conheight/2; // half screen else - scr_conlines = 0; // none visible + conlines = 0; // none visible if (scr_conspeed.value) { - if (scr_conlines < scr_con_current) + if (scr_con_current > conlines) { scr_con_current -= scr_conspeed.value*host_realframetime; - if (scr_conlines > scr_con_current) - scr_con_current = scr_conlines; + if (scr_con_current < conlines) + scr_con_current = conlines; } - else if (scr_conlines > scr_con_current) + else if (scr_con_current < conlines) { scr_con_current += scr_conspeed.value*host_realframetime; - if (scr_conlines < scr_con_current) - scr_con_current = scr_conlines; + if (scr_con_current > conlines) + scr_con_current = conlines; } } else - scr_con_current = scr_conlines; + scr_con_current = conlines; } /* @@ -276,7 +276,12 @@ SCR_DrawConsole */ void SCR_DrawConsole (void) { - if (scr_con_current) + if (key_consoleactive & KEY_CONSOLEACTIVE_FORCED) + { + // full screen + Con_DrawConsole (vid.conheight); + } + else if (scr_con_current) Con_DrawConsole (scr_con_current); else { diff --git a/screen.h b/screen.h index bb7ba5b9..b479bc45 100644 --- a/screen.h +++ b/screen.h @@ -28,8 +28,7 @@ void SCR_CenterPrint(char *str); void SCR_BeginLoadingPlaque (void); -extern float scr_con_current; -extern float scr_conlines; // lines of console to display +extern float scr_con_current; // current height of displayed console extern int sb_lines;