Display decor in heat gradient view

This commit is contained in:
jacksonmj 2012-03-10 18:27:01 +00:00
parent 71acd578b6
commit e83a1a21ae

View File

@ -1885,15 +1885,6 @@ void render_parts(pixel *vid)
cola = 255; cola = 255;
if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR;
} }
else if (colour_mode & COLOUR_GRAD)
{
float frequency = 0.05;
int q = parts[i].temp-40;
colr = sin(frequency*q) * 16 + colr;
colg = sin(frequency*q) * 16 + colg;
colb = sin(frequency*q) * 16 + colb;
if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR;
}
else if (colour_mode & COLOUR_BASC) else if (colour_mode & COLOUR_BASC)
{ {
colr = PIXR(ptypes[t].pcolors); colr = PIXR(ptypes[t].pcolors);
@ -1903,7 +1894,7 @@ void render_parts(pixel *vid)
} }
//Apply decoration colour //Apply decoration colour
if(!colour_mode) if(!(colour_mode & ~COLOUR_GRAD))
{ {
if(!(pixel_mode & NO_DECO) && decorations_enable) if(!(pixel_mode & NO_DECO) && decorations_enable)
{ {
@ -1920,6 +1911,16 @@ void render_parts(pixel *vid)
} }
} }
if (colour_mode & COLOUR_GRAD)
{
float frequency = 0.05;
int q = parts[i].temp-40;
colr = sin(frequency*q) * 16 + colr;
colg = sin(frequency*q) * 16 + colg;
colb = sin(frequency*q) * 16 + colb;
if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR;
}
#ifndef OGLR #ifndef OGLR
//All colours are now set, check ranges //All colours are now set, check ranges
if(colr>255) colr = 255; if(colr>255) colr = 255;