diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-18 14:16:52 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-18 14:16:52 (GMT) |
| commit | fa193eb7b4a76900a80bf9348a4877bf8943656e (patch) | |
| tree | 00afcc67f4a87d1aa94deccb3865136c2c7bdca5 /src/Renderer.cpp | |
| parent | 6f3954b9263050a8f4fe0e778b214a6d117f85a9 (diff) | |
| download | powder-fa193eb7b4a76900a80bf9348a4877bf8943656e.zip powder-fa193eb7b4a76900a80bf9348a4877bf8943656e.tar.gz | |
TPT: Display decor in heat gradient view e83a1a21ae
Diffstat (limited to 'src/Renderer.cpp')
| -rw-r--r-- | src/Renderer.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/Renderer.cpp b/src/Renderer.cpp index c8f301f..c1fafaa 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -780,15 +780,6 @@ void Renderer::render_parts() cola = 255; 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 = sim->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) { colr = PIXR(ptypes[t].pcolors); @@ -798,7 +789,7 @@ void Renderer::render_parts() } //Apply decoration colour - if(!colour_mode) + if(!(colour_mode & ~COLOUR_GRAD)) { if(!(pixel_mode & NO_DECO) && decorations_enable) { @@ -815,6 +806,16 @@ void Renderer::render_parts() } } + if (colour_mode & COLOUR_GRAD) + { + float frequency = 0.05; + int q = sim->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 //All colours are now set, check ranges if(colr>255) colr = 255; |
