]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
store into *colorindex again
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 Apr 2007 19:36:05 +0000 (19:36 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 Apr 2007 19:36:05 +0000 (19:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7207 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index 2f9d94a4513e2cf785df566344919824a31a2070..251009ef0ef141c3841d287f32f543e63579fb32 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -671,7 +671,7 @@ static void DrawQ_GetTextColor(float color[4], int colorindex, float r, float g,
 
 float DrawQ_String(float startx, float starty, const char *text, int maxlen, float w, float h, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor, qboolean ignorecolorcodes)
 {
-       int i, num, shadow, colorindex;
+       int i, num, shadow, colorindex = STRING_COLOR_DEFAULT;
        float x = startx, y, s, t, u, v;
        float *av, *at, *ac;
        float color[4];
@@ -777,6 +777,10 @@ float DrawQ_String(float startx, float starty, const char *text, int maxlen, flo
                        GL_LockArrays(0, 0);
                }
        }
+
+       if (outcolor)
+               *outcolor = colorindex;
+
        // note: this relies on the proper text (not shadow) being drawn last
        return x;
 }