From 830791a9a8e5f3b0a3ae623e20a0c743325fb3c2 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 30 Jan 2008 22:18:16 +0000 Subject: [PATCH] hide centerprint immediately when scr_centertime is 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8054 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cl_screen.c b/cl_screen.c index d65701b6..3074054a 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -118,6 +118,9 @@ void SCR_DrawCenterString (void) if(sb_showscores) // make TAB hide the finale message (sb_showscores overrides finale in sbar.c) return; + if(scr_centertime.value <= 0 && !cl.intermission) + return; + // the finale prints the characters one at a time, except if printspeed is an absurdly high value if (cl.intermission && scr_printspeed.value > 0 && scr_printspeed.value < 1000000) remaining = (int)(scr_printspeed.value * (cl.time - scr_centertime_start)); @@ -2107,6 +2110,16 @@ void CL_UpdateScreen(void) double rendertime1; float conwidth, conheight; + // play a bit with the palette + palette_rgb_pantscolormap[15][0] = 128 + 127 * sin(cl.time / exp(1) + 0*M_PI/3); + palette_rgb_pantscolormap[15][1] = 128 + 127 * sin(cl.time / exp(1) + 2*M_PI/3); + palette_rgb_pantscolormap[15][2] = 128 + 127 * sin(cl.time / exp(1) + 4*M_PI/3); + palette_rgb_shirtcolormap[15][0] = 128 + 127 * sin(cl.time / M_PI + 5*M_PI/3); + palette_rgb_shirtcolormap[15][1] = 128 + 127 * sin(cl.time / M_PI + 3*M_PI/3); + palette_rgb_shirtcolormap[15][2] = 128 + 127 * sin(cl.time / M_PI + 1*M_PI/3); + memcpy(palette_rgb_pantsscoreboard[15], palette_rgb_pantscolormap[15], sizeof(*palette_rgb_pantscolormap)); + memcpy(palette_rgb_shirtscoreboard[15], palette_rgb_shirtcolormap[15], sizeof(*palette_rgb_shirtcolormap)); + if (vid_hidden || !scr_refresh.integer) return; -- 2.39.2