X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=console.c;h=455b6c330acd901cf76a466ea1d2b4e747400754;hb=406539417c894954ef88ecc2fc28c26ad01bbba6;hp=23c3fdb0822103b3c61c81e4763f2d399ef3b120;hpb=a00b8833b1f90b51b8882f0976e8c59fe5754cca;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index 23c3fdb0..455b6c33 100644 --- a/console.c +++ b/console.c @@ -1384,7 +1384,7 @@ void Con_DrawInput (void) y = (int)strlen(text); // append enoug nul-bytes to cover the utf8-versions of the cursor too - for (i = y; i < y + 4 && i < sizeof(editlinecopy); ++i) + for (i = y; i < y + 4 && i < (int)sizeof(editlinecopy); ++i) text[i] = 0; // add the cursor frame @@ -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 @@ -2166,7 +2171,6 @@ int Nicks_CompleteCountPossible(char *line, int pos, char *s, qboolean isCon) { char name[128]; int i, p; - int length; int match; int spos; int count = 0; @@ -2190,7 +2194,6 @@ int Nicks_CompleteCountPossible(char *line, int pos, char *s, qboolean isCon) if(!name[0]) continue; - length = strlen(name); match = -1; spos = pos - 1; // no need for a minimum of characters :) @@ -2748,7 +2751,7 @@ void Con_CompleteCommandLine (void) a = Cmd_CompleteAliasCountPossible(s); if (a) { - Con_Printf("\n%i possible aliases%s\n", a, (a > 1) ? "s: " : ":"); + Con_Printf("\n%i possible alias%s\n", a, (a > 1) ? "es: " : ":"); Cmd_CompleteAliasPrint(s); } n = Nicks_CompleteCountPossible(key_line, key_linepos, s, true);