CG_FadeColor() and trap_R_SetColor()
Posted: Thu Jul 11, 2013 7:56 pm
Howdy,
Is there a certain method to fading the opacity of text and images? I've meddled around with fading once or twice before without problems, but now when I apply it to the item pickup display (CG_DrawItemPickup() ) it ends up fading out a bunch of text in other HUD elements too to about 10% opacity (CG_DrawTimer(), CG_DrawSpeedometer() and CG_DrawFPS() ). Some others remain unaffected.
I'm not sure how to accurately illustrate what's going on in my code so I decided to attach cg_draw.c below, if anyone can figure out where I'm going wrong here? Note: CG_FadeColor is unaltered and the font handling has been moved to its own file.
Is there a certain method to fading the opacity of text and images? I've meddled around with fading once or twice before without problems, but now when I apply it to the item pickup display (CG_DrawItemPickup() ) it ends up fading out a bunch of text in other HUD elements too to about 10% opacity (CG_DrawTimer(), CG_DrawSpeedometer() and CG_DrawFPS() ). Some others remain unaffected.
I'm not sure how to accurately illustrate what's going on in my code so I decided to attach cg_draw.c below, if anyone can figure out where I'm going wrong here? Note: CG_FadeColor is unaltered and the font handling has been moved to its own file.