Fix firework glow

This commit is contained in:
Simon Robertshaw 2012-03-17 18:37:22 +00:00
parent 4d45bbedb3
commit 001c4502e8

View File

@ -106,17 +106,18 @@ int graphics_DUST(GRAPHICS_FUNC_ARGS)
{
if(cpart->life >= 1)
{
*colr = cpart->flags;
*colg = cpart->tmp;
*colb = cpart->ctype;
*firea = 120;
*firer = *colr = cpart->flags;
*fireg = *colg = cpart->tmp;
*fireb = *colb = cpart->ctype;
if (decorations_enable && cpart->dcolour)
{
int a = (cpart->dcolour>>24)&0xFF;
*colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8;
*colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8;
*colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8;
*firer = *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8;
*fireg = *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8;
*fireb = *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8;
}
*pixel_mode |= PMODE_GLOW;
*pixel_mode |= PMODE_GLOW | FIRE_ADD;
/**firea = 255;
*firer = *colr;
*fireg = *colg;