From 7750cf8ccd01643d24af1e5b8b275ed6a1b15f7e Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sun, 29 May 2011 00:51:51 +0100 Subject: [PATCH] Improve decoration in blob view, exclude from life and heat view --- src/graphics.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/graphics.c b/src/graphics.c index df94f788d..94c043fdf 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -3060,6 +3060,13 @@ void draw_parts(pixel *vid) // blendpixel(vid, nx, ny-1, R, G, B, 46); //} + if (decorations_enable && parts[i].dcolour) + { + int a = (parts[i].dcolour>>24)&0xFF; + cr = (a*((parts[i].dcolour>>16)&0xFF) + (255-a)*cr) >> 8; + cg = (a*((parts[i].dcolour>>8)&0xFF) + (255-a)*cg) >> 8; + cb = (a*((parts[i].dcolour)&0xFF) + (255-a)*cb) >> 8; + } blendpixel(vid, nx+1, ny, cr, cg, cb, 223); blendpixel(vid, nx-1, ny, cr, cg, cb, 223); blendpixel(vid, nx, ny+1, cr, cg, cb, 223); @@ -3070,7 +3077,7 @@ void draw_parts(pixel *vid) blendpixel(vid, nx+1, ny+1, cr, cg, cb, 112); blendpixel(vid, nx-1, ny+1, cr, cg, cb, 112); } - if (decorations_enable) + if (decorations_enable && cmode!=CM_HEAT && cmode!=CM_LIFE && parts[i].dcolour) blendpixel(vid, nx, ny, (parts[i].dcolour>>16)&0xFF, (parts[i].dcolour>>8)&0xFF, (parts[i].dcolour)&0xFF, (parts[i].dcolour>>24)&0xFF); } #endif