Fix Blob mode, Sprk, Firw, Fwrk and others
This commit is contained in:
parent
41448e92bf
commit
7413654b9f
@ -116,10 +116,11 @@ int graphics_DUST(GRAPHICS_FUNC_ARGS)
|
|||||||
*colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8;
|
*colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8;
|
||||||
*colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8;
|
*colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8;
|
||||||
}
|
}
|
||||||
*firea = 255;
|
*pixel_mode |= PMODE_GLOW;
|
||||||
|
/**firea = 255;
|
||||||
*firer = *colr;
|
*firer = *colr;
|
||||||
*fireg = *colg;
|
*fireg = *colg;
|
||||||
*fireb = *colb;
|
*fireb = *colb;*/
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -444,27 +445,36 @@ int graphics_HFLM(GRAPHICS_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
int graphics_FIRW(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);
|
if(cpart->tmp>=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;
|
int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
|
||||||
*colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8;
|
*colr = (unsigned char)firw_data[caddress];
|
||||||
*colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8;
|
*colg = (unsigned char)firw_data[caddress+1];
|
||||||
*colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8;
|
*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;
|
return 0;
|
||||||
}
|
}
|
||||||
int graphics_BOMB(GRAPHICS_FUNC_ARGS)
|
int graphics_BOMB(GRAPHICS_FUNC_ARGS)
|
||||||
|
@ -218,8 +218,9 @@ int graphics_SPRK(GRAPHICS_FUNC_ARGS)
|
|||||||
//*firer = *colr*0.5;
|
//*firer = *colr*0.5;
|
||||||
//*fireg = *colg;
|
//*fireg = *colg;
|
||||||
//*fireb = *colb*2;
|
//*fireb = *colb*2;
|
||||||
*colr *= 0.5;
|
*colr = 170;
|
||||||
*colb *= 2;
|
*colg = 200;
|
||||||
|
*colb = 220;
|
||||||
//*pixel_mode |= FIRE_ADD;
|
//*pixel_mode |= FIRE_ADD;
|
||||||
*pixel_mode |= PMODE_GLOW;
|
*pixel_mode |= PMODE_GLOW;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1769,9 +1769,12 @@ void render_parts(pixel *vid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Apply decoration colour
|
//Apply decoration colour
|
||||||
colr = (deca*decr + (255-deca)*colr) >> 8;
|
if(cmode != CM_NOTHING && decorations_enable)
|
||||||
colg = (deca*decg + (255-deca)*colg) >> 8;
|
{
|
||||||
colb = (deca*decb + (255-deca)*colb) >> 8;
|
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
|
//All colours are now set, check ranges
|
||||||
if(colr>255) colr = 255;
|
if(colr>255) colr = 255;
|
||||||
@ -1873,6 +1876,8 @@ void render_parts(pixel *vid)
|
|||||||
blobC[cblobC++] = 1.0f;
|
blobC[cblobC++] = 1.0f;
|
||||||
cblob++;
|
cblob++;
|
||||||
#else
|
#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-1, ny, colr, colg, colb, 223);
|
blendpixel(vid, nx-1, ny, colr, colg, colb, 223);
|
||||||
blendpixel(vid, nx, ny+1, colr, colg, colb, 223);
|
blendpixel(vid, nx, ny+1, colr, colg, colb, 223);
|
||||||
|
Loading…
Reference in New Issue
Block a user