From 04f51e3baa7f8ac2f54eace5bcd67118644c9803 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 29 Apr 2007 19:36:05 +0000 Subject: [PATCH] store into *colorindex again git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7207 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gl_draw.c b/gl_draw.c index 2f9d94a4..251009ef 100644 --- 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; } -- 2.39.2