From: havoc Date: Wed, 13 Jan 2010 07:15:57 +0000 (+0000) Subject: don't draw conback when the file is missing, behave as if X-Git-Tag: xonotic-v0.1.0preview~230^2~635 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7588ae076a3b9dcde8484b63599e90d17d6afd34;p=xonotic%2Fdarkplaces.git don't draw conback when the file is missing, behave as if scr_conbrightness is 0 in this case git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9832 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/console.c b/console.c index 72e868fb..dc3ca9c5 100644 --- a/console.c +++ b/console.c @@ -1769,6 +1769,7 @@ void Con_DrawConsole (int lines) { int mask_must = 0; int mask_mustnot = developer.integer ? 0 : CON_MASK_DEVELOPER; + cachepic_t *conbackpic; if (lines <= 0) return; @@ -1779,7 +1780,11 @@ void Con_DrawConsole (int lines) con_vislines = lines; // draw the background - DrawQ_Pic(0, lines - vid_conheight.integer, scr_conbrightness.value >= 0.01f ? Draw_CachePic ("gfx/conback") : NULL, vid_conwidth.integer, vid_conheight.integer, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, cls.signon == SIGNONS ? scr_conalpha.value : 1.0, 0); // always full alpha when not in game + conbackpic = scr_conbrightness.value >= 0.01f ? Draw_CachePic("gfx/conback") : NULL; + if (conbackpic && conbackpic->tex != r_texture_notexture) + DrawQ_Pic(0, lines - vid_conheight.integer, conbackpic, vid_conwidth.integer, vid_conheight.integer, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, cls.signon == SIGNONS ? scr_conalpha.value : 1.0f, 0); // always full alpha when not in game + else + DrawQ_Fill(0, lines - vid_conheight.integer, vid_conwidth.integer, vid_conheight.integer, 0.0f, 0.0f, 0.0f, cls.signon == SIGNONS ? scr_conalpha.value : 1.0f, 0); // always full alpha when not in game DrawQ_String(vid_conwidth.integer - DrawQ_TextWidth(engineversion, 0, con_textsize.value, con_textsize.value, false, FONT_CONSOLE), lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0, NULL, true, FONT_CONSOLE); // draw the text