From d8240c391a8a1c73dc452d8715cc3c8f3f1cbd5b Mon Sep 17 00:00:00 2001 From: TimeServ Date: Sat, 4 Mar 2006 22:37:28 +0000 Subject: [PATCH] fix tile clearing with hud plugins (screensize), fix host_endgame message, fix issue with loading icon, add gl_bloom to vc2005 project git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2047 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 2 +- engine/client/cl_screen.c | 36 +++++++++++++++++++-- engine/dotnet2005/ftequake.vcproj | 52 +++++++++++++++++++++++++++++++ engine/gl/gl_draw.c | 2 +- 4 files changed, 87 insertions(+), 5 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 5356f85a7..a3e4f07e8 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -2748,7 +2748,7 @@ void VARGS Host_EndGame (char *message, ...) va_end (argptr); Con_TPrintf (TL_NL); Con_TPrintf (TL_LINEBREAK_EQUALS); - Con_TPrintf (TLC_CLIENTCON_ERROR_ENDGAME, S_ERROR, string); + Con_TPrintf (TLC_CLIENTCON_ERROR_ENDGAME, string); Con_TPrintf (TL_LINEBREAK_EQUALS); Con_TPrintf (TL_NL); diff --git a/engine/client/cl_screen.c b/engine/client/cl_screen.c index 3f5168124..8ca1eb0fc 100644 --- a/engine/client/cl_screen.c +++ b/engine/client/cl_screen.c @@ -1880,6 +1880,10 @@ void SCR_BringDownConsole (void) void SCR_TileClear (void) { +#ifdef PLUGINS + extern cvar_t plug_sbar; +#endif + if (cl.splitclients>1) return; //splitclients always takes the entire screen. @@ -1893,11 +1897,10 @@ void SCR_TileClear (void) } else { - char str[11] = "xxxxxxxxxx"; if (scr_viewsize.value < 100) { int x, y; - x = vid.width - strlen(str) * 8 - 8; + x = vid.width - 10 * 8 - 8; y = vid.height - sb_lines - 8; // clear background for counters if (show_fps.value) @@ -1905,9 +1908,36 @@ void SCR_TileClear (void) } } } +#ifdef PLUGINS + else if (plug_sbar.value) + { + if (scr_vrect.x > 0) + { + // left + Draw_TileClear (0, 0, scr_vrect.x, vid.height); + // right + Draw_TileClear (scr_vrect.x + scr_vrect.width, 0, + vid.width - scr_vrect.x + scr_vrect.width, + vid.height); + } + if (scr_vrect.y > 0 || scr_vrect.height != vid.height) + { + // top + Draw_TileClear (scr_vrect.x, 0, + scr_vrect.x + scr_vrect.width, + scr_vrect.y); + // bottom + Draw_TileClear (scr_vrect.x, + scr_vrect.y + scr_vrect.height, + scr_vrect.width, + vid.height); + } + } +#endif else { - if (scr_vrect.x > 0) { + if (scr_vrect.x > 0) + { // left Draw_TileClear (0, 0, scr_vrect.x, vid.height - sb_lines); // right diff --git a/engine/dotnet2005/ftequake.vcproj b/engine/dotnet2005/ftequake.vcproj index a634adad9..894f0e33a 100644 --- a/engine/dotnet2005/ftequake.vcproj +++ b/engine/dotnet2005/ftequake.vcproj @@ -11539,6 +11539,58 @@ /> + + + + + + + + + + + + + + + + + + + + diff --git a/engine/gl/gl_draw.c b/engine/gl/gl_draw.c index ca9d27a61..31c6b805e 100644 --- a/engine/gl/gl_draw.c +++ b/engine/gl/gl_draw.c @@ -2211,7 +2211,7 @@ void GLDraw_BeginDisc (void) if (!draw_disc || !r_drawdisk.value) return; qglDrawBuffer (GL_FRONT); - Draw_Pic (vid.width - 24, 0, draw_disc); + Draw_Pic (vid.width - draw_disc->width, 0, draw_disc); qglDrawBuffer (GL_BACK); }