]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
more redundant suffix elimination
[xonotic/darkplaces.git] / console.c
index a20486c4641b0b61e01e3a0494b11bafa206eea9..7f814c26bdd488d321754b905b43ba326be1a036 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1410,12 +1410,12 @@ void Con_DrawInput (void)
 
 //     text[key_linepos + 1] = 0;
 
-       x = vid_conwidth.value * 0.95 - DrawQ_TextWidth_Font(text, key_linepos, con_textsize.value, con_textsize.value, false, FONT_CONSOLE);
+       x = vid_conwidth.value * 0.95 - DrawQ_TextWidth(text, key_linepos, con_textsize.value, con_textsize.value, false, FONT_CONSOLE);
        if(x >= 0)
                x = 0;
 
        // draw it
-       DrawQ_String_Font(x, con_vislines - con_textsize.value*2, text, 0, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, FONT_CONSOLE );
+       DrawQ_String(x, con_vislines - con_textsize.value*2, text, 0, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, FONT_CONSOLE );
 
        // remove cursor
 //     key_line[key_linepos] = 0;
@@ -1446,9 +1446,9 @@ float Con_WordWidthFunc(void *passthrough, const char *w, size_t *length, float
                return ti->fontsize * ti->font->maxwidth;
        }
        if(maxWidth >= 0)
-               return DrawQ_TextWidth_Font_UntilWidth_Size(w, length, ti->fontsize, ti->fontsize, false, ti->font, -maxWidth); // -maxWidth: we want at least one char
+               return DrawQ_TextWidth_UntilWidth(w, length, ti->fontsize, ti->fontsize, false, ti->font, -maxWidth); // -maxWidth: we want at least one char
        else if(maxWidth == -1)
-               return DrawQ_TextWidth_Font(w, *length, ti->fontsize, ti->fontsize, false, ti->font);
+               return DrawQ_TextWidth(w, *length, ti->fontsize, ti->fontsize, false, ti->font);
        else
        {
                printf("Con_WordWidthFunc: can't get here (maxWidth should never be %f)\n", maxWidth);
@@ -1479,9 +1479,9 @@ int Con_DisplayLineFunc(void *passthrough, const char *line, size_t length, floa
        {
                int x = (int) (ti->x + (ti->width - width) * ti->alignment);
                if(isContinuation && *ti->continuationString)
-                       x += (int) DrawQ_String_Font(x, ti->y, ti->continuationString, strlen(ti->continuationString), ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, ti->font);
+                       x += (int) DrawQ_String(x, ti->y, ti->continuationString, strlen(ti->continuationString), ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, ti->font);
                if(length > 0)
-                       DrawQ_String_Font(x, ti->y, line, length, ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, &(ti->colorindex), false, ti->font);
+                       DrawQ_String(x, ti->y, line, length, ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, &(ti->colorindex), false, ti->font);
        }
 
        ti->y += ti->fontsize;
@@ -1653,10 +1653,10 @@ void Con_DrawNotify (void)
 
                // FIXME word wrap
                inputsize = (numChatlines ? con_chatsize : con_notifysize).value;
-               x = vid_conwidth.value - DrawQ_TextWidth_Font(temptext, 0, inputsize, inputsize, false, FONT_CHAT);
+               x = vid_conwidth.value - DrawQ_TextWidth(temptext, 0, inputsize, inputsize, false, FONT_CHAT);
                if(x > 0)
                        x = 0;
-               DrawQ_String_Font(x, v, temptext, 0, inputsize, inputsize, 1.0, 1.0, 1.0, 1.0, 0, &colorindex, false, FONT_CHAT);
+               DrawQ_String(x, v, temptext, 0, inputsize, inputsize, 1.0, 1.0, 1.0, 1.0, 0, &colorindex, false, FONT_CHAT);
        }
 }
 
@@ -1780,7 +1780,7 @@ void Con_DrawConsole (int 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
-       DrawQ_String_Font(vid_conwidth.integer - DrawQ_TextWidth_Font(engineversion, con_textsize.value, con_textsize.value, 0, false, FONT_CONSOLE), lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0, NULL, true, FONT_CONSOLE);
+       DrawQ_String(vid_conwidth.integer - DrawQ_TextWidth(engineversion, con_textsize.value, con_textsize.value, 0, 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
 #if 0