From d819ddcd4b33881565638ba18957f2a917c660f9 Mon Sep 17 00:00:00 2001 From: danij Date: Sun, 18 Apr 2010 08:07:45 +0100 Subject: [PATCH] Fixed All Games: Do not do the text glitter/shadow effect for the space character. --- doomsday/plugins/common/src/hu_stuff.c | 42 ++++++++++++-------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/doomsday/plugins/common/src/hu_stuff.c b/doomsday/plugins/common/src/hu_stuff.c index 49c9130084..6178496a40 100644 --- a/doomsday/plugins/common/src/hu_stuff.c +++ b/doomsday/plugins/common/src/hu_stuff.c @@ -2445,33 +2445,31 @@ void M_WriteText3(int x, int y, const char* string, gamefontid_t font, w = gFonts[font].chars[c].patch.width; h = gFonts[font].chars[c].patch.height; - if(!gFonts[font].chars[c].patch.lump) + if(gFonts[font].chars[c].patch.lump && c != ' ') { - // A character we don't have a patch for...?! - continue; - } - - if(pass) - { - // The character itself. - GL_DrawPatch_CS(cx, cy + yoff, gFonts[font].chars[c].patch.lump); + // A character we have a patch for that is not white space. + if(pass) + { + // The character itself. + GL_DrawPatch_CS(cx, cy + yoff, gFonts[font].chars[c].patch.lump); - // Do something flashy! - if(flash > 0) + // Do something flashy! + if(flash > 0) + { + M_LetterFlash(cx, cy + yoff, w, h, true, + flashColor[CR], flashColor[CG], + flashColor[CB], flashColor[CA] * flash); + } + } + else if(flagShadow && cfg.menuShadow > 0) { - M_LetterFlash(cx, cy + yoff + h/2, w, h, true, - flashColor[CR], flashColor[CG], - flashColor[CB], flashColor[CA] * flash); + // Shadow. + M_LetterFlash(cx, cy + yoff, w, h, false, 1, 1, 1, + (red < + 0 ? DGL_GetInteger(DGL_CURRENT_COLOR_A) / + 255.0f : alpha) * cfg.menuShadow); } } - else if(flagShadow && cfg.menuShadow > 0) - { - // Shadow. - M_LetterFlash(cx, cy + yoff + h/2, w, h, false, 1, 1, 1, - (red < - 0 ? DGL_GetInteger(DGL_CURRENT_COLOR_A) / - 255.0f : alpha) * cfg.menuShadow); - } cx += w; }