summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2011-08-16 22:07:12 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2011-08-16 22:07:12 (GMT)
commit161eb60cfa542a72a76598b3cb99a6b1994d3f48 (patch)
treee1535de4bd4b5493889f21f9b4e1eab40bc27cc9 /src/graphics.c
parente2df8e2c16e17222794fbe94dc9b491101cc34df (diff)
downloadpowder-161eb60cfa542a72a76598b3cb99a6b1994d3f48.zip
powder-161eb60cfa542a72a76598b3cb99a6b1994d3f48.tar.gz
Added PGRV and NGRV for positive and negative gravity tools (sortof like air and vac, but with gravity)
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 0a30327..0b6dfd7 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -856,6 +856,8 @@ int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc)
case SPC_COOL:
case SPC_VACUUM:
case SPC_WIND:
+ case SPC_PGRV:
+ case SPC_NGRV:
for (j=1; j<15; j++)
for (i=1; i<27; i++)
vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc;
@@ -878,6 +880,10 @@ int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc)
drawtext(vid_buf, x+14-textwidth("VAC")/2, y+4, "VAC", c, c, c, 255);
else if (b==SPC_WIND)
drawtext(vid_buf, x+14-textwidth("WIND")/2, y+4, "WIND", c, c, c, 255);
+ else if (b==SPC_PGRV)
+ drawtext(vid_buf, x+14-textwidth("PGRV")/2, y+4, "PGRV", c, c, c, 255);
+ else if (b==SPC_NGRV)
+ drawtext(vid_buf, x+14-textwidth("NGRV")/2, y+4, "NGRV", c, c, c, 255);
break;
default:
for (j=1; j<15; j++)
@@ -4513,7 +4519,7 @@ corrupt:
void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry)
{
int i,j,c;
- if (t<PT_NUM||(t&0xFF)==PT_LIFE||t==SPC_AIR||t==SPC_HEAT||t==SPC_COOL||t==SPC_VACUUM||t==SPC_WIND)
+ if (t<PT_NUM||(t&0xFF)==PT_LIFE||t==SPC_AIR||t==SPC_HEAT||t==SPC_COOL||t==SPC_VACUUM||t==SPC_WIND||t==SPC_PGRV||t==SPC_NGRV)
{
if (rx<=0)
xor_pixel(x, y, vid);