summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-09-26 14:18:03 (GMT)
committer Simon <simon@hardwired.org.uk>2010-09-26 14:18:03 (GMT)
commit9707323109bb04e78b1e8ed4c317c8c75f5494eb (patch)
treef2fde8208e001d0cbbf601c631993359a2b04a21 /graphics.c
parent0424907d28aa847bd754b561cacbc235accf04d0 (diff)
downloadpowder-9707323109bb04e78b1e8ed4c317c8c75f5494eb.zip
powder-9707323109bb04e78b1e8ed4c317c8c75f5494eb.tar.gz
Added Powered Clone and Heat Switch
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/graphics.c b/graphics.c
index 8707037..3ea0635 100644
--- a/graphics.c
+++ b/graphics.c
@@ -1710,13 +1710,46 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny, GR, GR, GR, 223);
blendpixel(vid, nx, ny+1, GR, GR, GR, 223);
blendpixel(vid, nx, ny-1, GR, GR, GR, 223);
-
+
blendpixel(vid, nx+1, ny-1, GR, GR, GR, 112);
blendpixel(vid, nx-1, ny-1, GR, GR, GR, 112);
blendpixel(vid, nx+1, ny+1, GR, GR, GR, 112);
blendpixel(vid, nx-1, ny+1, GR, GR, GR, 112);
}
- } else if(t==PT_PLSM)
+ }
+ else if(t==PT_PCLN)
+ {
+ uint8 GR = 0x3B+(parts[i].life*19);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, 10);
+ if(cmode == 4) {
+ blendpixel(vid, nx+1, ny, GR, GR, 10, 223);
+ blendpixel(vid, nx-1, ny, GR, GR, 10, 223);
+ blendpixel(vid, nx, ny+1, GR, GR, 10, 223);
+ blendpixel(vid, nx, ny-1, GR, GR, 10, 223);
+
+ blendpixel(vid, nx+1, ny-1, GR, GR, 10, 112);
+ blendpixel(vid, nx-1, ny-1, GR, GR, 10, 112);
+ blendpixel(vid, nx+1, ny+1, GR, GR, 10, 112);
+ blendpixel(vid, nx-1, ny+1, GR, GR, 10, 112);
+ }
+ }
+ else if(t==PT_HSWC)
+ {
+ uint8 GR = 0x3B+(parts[i].life*19);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, 10, 10);
+ if(cmode == 4) {
+ blendpixel(vid, nx+1, ny, GR, 10, 10, 223);
+ blendpixel(vid, nx-1, ny, GR, 10, 10, 223);
+ blendpixel(vid, nx, ny+1, GR, 10, 10, 223);
+ blendpixel(vid, nx, ny-1, GR, 10, 10, 223);
+
+ blendpixel(vid, nx+1, ny-1, GR, 10, 10, 112);
+ blendpixel(vid, nx-1, ny-1, GR, 10, 10, 112);
+ blendpixel(vid, nx+1, ny+1, GR, 10, 10, 112);
+ blendpixel(vid, nx-1, ny+1, GR, 10, 10, 112);
+ }
+ }
+ else if(t==PT_PLSM)
{
float ttemp = (float)parts[i].life;
int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);