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) if(cpart->life >= 1)
{ {
*colr = cpart->flags; *firea = 120;
*colg = cpart->tmp; *firer = *colr = cpart->flags;
*colb = cpart->ctype; *fireg = *colg = cpart->tmp;
*fireb = *colb = cpart->ctype;
if (decorations_enable && cpart->dcolour) if (decorations_enable && cpart->dcolour)
{ {
int a = (cpart->dcolour>>24)&0xFF; int a = (cpart->dcolour>>24)&0xFF;
*colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; *firer = *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8;
*colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; *fireg = *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8;
*colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; *fireb = *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8;
} }
*pixel_mode |= PMODE_GLOW; *pixel_mode |= PMODE_GLOW | FIRE_ADD;
/**firea = 255; /**firea = 255;
*firer = *colr; *firer = *colr;
*fireg = *colg; *fireg = *colg;