summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-06-28 12:58:16 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-28 12:58:16 (GMT)
commit437f13f42458052b7289d7cdc4c36aa3153a076e (patch)
treeaa8d66647f20c55c25c7ec818bc97f1a524363f4 /src/graphics.c
parent3fe82bf525584bfe333013da218b530fd2f277f2 (diff)
downloadpowder-437f13f42458052b7289d7cdc4c36aa3153a076e.zip
powder-437f13f42458052b7289d7cdc4c36aa3153a076e.tar.gz
Powered Breakable clone, Gravity Pump, New menu section for powered elements (needs icon)
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 459706e..4d53ec2 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1757,7 +1757,7 @@ void draw_parts(pixel *vid)
isplayer2 = 1; //It's a secret. Tssss...
}
- if (cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_FILT && t!=PT_HSWC && t!=PT_PCLN && t!=PT_DEUT && t!=PT_WIFI)//nothing display but show needed color changes
+ if (cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_GPMP && t!=PT_PBCN && t!=PT_FILT && t!=PT_HSWC && t!=PT_PCLN && t!=PT_DEUT && t!=PT_WIFI)//nothing display but show needed color changes
{
if (t==PT_PHOT)
{
@@ -1815,7 +1815,8 @@ void draw_parts(pixel *vid)
t!=PT_NEUT && t!=PT_LAVA && t!=PT_BOMB &&
t!=PT_PHOT && t!=PT_THDR && t!=PT_SMKE &&
t!=PT_LCRY && t!=PT_SWCH && t!=PT_PCLN &&
- t!=PT_PUMP && t!=PT_HSWC && t!=PT_FILT)
+ t!=PT_PUMP && t!=PT_HSWC && t!=PT_FILT &&
+ t!=PT_GPMP && t!=PT_PBCN)
{
if (ptypes[parts[i].type].properties&TYPE_LIQUID) //special effects for liquids in fancy mode
{
@@ -2791,6 +2792,22 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny+1, GR, GR, 10, 112);
}
}
+ else if (t==PT_PBCN)
+ {
+ uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR/2, 10);
+ if (cmode == CM_BLOB) {
+ blendpixel(vid, nx+1, ny, GR, GR/2, 10, 223);
+ blendpixel(vid, nx-1, ny, GR, GR/2, 10, 223);
+ blendpixel(vid, nx, ny+1, GR, GR/2, 10, 223);
+ blendpixel(vid, nx, ny-1, GR, GR/2, 10, 223);
+
+ blendpixel(vid, nx+1, ny-1, GR, GR/2, 10, 112);
+ blendpixel(vid, nx-1, ny-1, GR, GR/2, 10, 112);
+ blendpixel(vid, nx+1, ny+1, GR, GR/2, 10, 112);
+ blendpixel(vid, nx-1, ny+1, GR, GR/2, 10, 112);
+ }
+ }
else if (t==PT_HSWC)
{
uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19);
@@ -2823,6 +2840,22 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny+1, 10, 10, GR, 112);
}
}
+ else if (t==PT_GPMP)
+ {
+ uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(10, GR, GR);
+ if (cmode == CM_BLOB) {
+ blendpixel(vid, nx+1, ny, 10, GR/2, GR, 223);
+ blendpixel(vid, nx-1, ny, 10, GR/2, GR, 223);
+ blendpixel(vid, nx, ny+1, 10, GR/2, GR, 223);
+ blendpixel(vid, nx, ny-1, 10, GR/2, GR, 223);
+
+ blendpixel(vid, nx+1, ny-1, 10, GR/2, GR, 112);
+ blendpixel(vid, nx-1, ny-1, 10, GR/2, GR, 112);
+ blendpixel(vid, nx+1, ny+1, 10, GR/2, GR, 112);
+ blendpixel(vid, nx-1, ny+1, 10, GR/2, GR, 112);
+ }
+ }
else if (t==PT_PLSM)
{
float ttemp = (float)parts[i].life;