summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-03-17 18:37:22 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-03-17 18:37:22 (GMT)
commit001c4502e8a436d6025c01238810f6a5d837abcd (patch)
tree4562f7f6234cc0ca1cb7097548030feed2618c14 /src/elements
parent4d45bbedb3f46bc5ffc40fc0e4618252bd4a63d4 (diff)
downloadpowder-001c4502e8a436d6025c01238810f6a5d837abcd.zip
powder-001c4502e8a436d6025c01238810f6a5d837abcd.tar.gz
Fix firework glow
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/newgraphics.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/elements/newgraphics.c b/src/elements/newgraphics.c
index 4c9225c..8cc7822 100644
--- a/src/elements/newgraphics.c
+++ b/src/elements/newgraphics.c
@@ -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;