diff --git a/src/elements/newgraphics.c b/src/elements/newgraphics.c index c6bc3ce16..c3ff414dc 100644 --- a/src/elements/newgraphics.c +++ b/src/elements/newgraphics.c @@ -116,10 +116,11 @@ int graphics_DUST(GRAPHICS_FUNC_ARGS) *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; } - *firea = 255; + *pixel_mode |= PMODE_GLOW; + /**firea = 255; *firer = *colr; *fireg = *colg; - *fireb = *colb; + *fireb = *colb;*/ } return 0; } @@ -444,27 +445,36 @@ int graphics_HFLM(GRAPHICS_FUNC_ARGS) } int graphics_FIRW(GRAPHICS_FUNC_ARGS) { - int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)firw_data[caddress]; - *colg = (unsigned char)firw_data[caddress+1]; - *colb = (unsigned char)firw_data[caddress+2]; - - if (decorations_enable && cpart->dcolour) + if(cpart->tmp>=3) { - 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; + int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)firw_data[caddress]; + *colg = (unsigned char)firw_data[caddress+1]; + *colb = (unsigned char)firw_data[caddress+2]; + + 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; + } + + *firea = cpart->life*4; + if(*firea > 240) + *firea = 240; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + } + else if(cpart->tmp > 0) + { + *pixel_mode |= PMODE_GLOW; } - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache return 0; } int graphics_BOMB(GRAPHICS_FUNC_ARGS) diff --git a/src/elements/sprk.c b/src/elements/sprk.c index fdbdb2dbd..93b0b40bd 100644 --- a/src/elements/sprk.c +++ b/src/elements/sprk.c @@ -218,8 +218,9 @@ int graphics_SPRK(GRAPHICS_FUNC_ARGS) //*firer = *colr*0.5; //*fireg = *colg; //*fireb = *colb*2; - *colr *= 0.5; - *colb *= 2; + *colr = 170; + *colg = 200; + *colb = 220; //*pixel_mode |= FIRE_ADD; *pixel_mode |= PMODE_GLOW; return 1; diff --git a/src/graphics.c b/src/graphics.c index abfe3cbb0..f4e1e50c6 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1769,9 +1769,12 @@ void render_parts(pixel *vid) } //Apply decoration colour - colr = (deca*decr + (255-deca)*colr) >> 8; - colg = (deca*decg + (255-deca)*colg) >> 8; - colb = (deca*decb + (255-deca)*colb) >> 8; + if(cmode != CM_NOTHING && decorations_enable) + { + colr = (deca*decr + (255-deca)*colr) >> 8; + colg = (deca*decg + (255-deca)*colg) >> 8; + colb = (deca*decb + (255-deca)*colb) >> 8; + } //All colours are now set, check ranges if(colr>255) colr = 255; @@ -1873,6 +1876,8 @@ void render_parts(pixel *vid) blobC[cblobC++] = 1.0f; cblob++; #else + vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(colr,colg,colb); + blendpixel(vid, nx+1, ny, colr, colg, colb, 223); blendpixel(vid, nx-1, ny, colr, colg, colb, 223); blendpixel(vid, nx, ny+1, colr, colg, colb, 223);