summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorCate <cate@cate-6sh2.(none)>2011-07-11 18:09:34 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-07-12 13:00:21 (GMT)
commit0ce4104c7aacd6151d52a0b11a36e315cf8a5a67 (patch)
treefd99304bfe55207fe3ebe8d989d578aadec68d25 /src/graphics.c
parent0858b18255a5a31de7ebc677b6d36c73a43652d8 (diff)
downloadpowder-0ce4104c7aacd6151d52a0b11a36e315cf8a5a67.zip
powder-0ce4104c7aacd6151d52a0b11a36e315cf8a5a67.tar.gz
Added CLST element, which is Clay dust, for making concrete with water. :D Neat due to element cohesion with itself, which causes it to sludge downwards in a way very uncharacteristic of any current powder. Cohesion is very easy to modify. Thanks to Savask for help with cohesion code. :D
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 1f3865e..ecc6b4a 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -2052,6 +2052,17 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx, ny, cr, cg, cb, 255);
}
}
+ else if (t==PT_CLST)
+ {
+ int z = parts[i].tmp - 5;//speckles!
+ cr = z * 16 + PIXR(ptypes[t].pcolors);
+ cg = z * 16 + PIXG(ptypes[t].pcolors);
+ cb = z * 16 + PIXB(ptypes[t].pcolors);
+ cr = cr>255?255:cr;
+ cg = cg>255?255:cg;
+ cb = cb>255?255:cb;
+ blendpixel(vid, nx, ny, cr, cg, cb, 255);
+ }
else if (t==PT_SPNG)
{
cr = PIXR(ptypes[t].pcolors) - parts[i].life*15;