diff options
| author | Cate <cate@cate-6sh2.(none)> | 2011-07-12 15:28:33 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-07-12 17:46:33 (GMT) |
| commit | d3452b01c8aad35e6d55523323247eeb114dc7d1 (patch) | |
| tree | 82eae01ee6e63d47b944ad0eb53937100d5a73af /src/graphics.c | |
| parent | 7480442c67682c40672dd862a921972e816ce59e (diff) | |
| download | powder-d3452b01c8aad35e6d55523323247eeb114dc7d1.zip powder-d3452b01c8aad35e6d55523323247eeb114dc7d1.tar.gz | |
OMG FIXES. Lots of fixes for triangle brush to make sure it works, from Cracker. Edited CLST to prevent "popcorning" when its float hits weird numbers. Also fixed it so it freezes nicely when cooled. Fingers are back! :DDD
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/graphics.c b/src/graphics.c index 2013de6..40f57c1 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -4247,13 +4247,14 @@ void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry) } } else if (CURRENT_BRUSH==TRI_BRUSH) - { + { for (j=-ry; j<=ry; j++) - for (i=-rx; i<=rx; i++) - if ((j <= ry ) && ( j >= (((-2.0*ry)/rx)*i) -ry) && ( j >= (((-2.0*ry)/(-rx))*i)-ry ) && (j+1>ry || (j-1 < (((-2.0*ry)/rx)*i) -ry) || ( j-1 < (((-2.0*ry)/(-rx))*i)-ry )) ) - { - xor_pixel(x+i, y+j, vid); - } + for (i=-rx; i<=0; i++) + if ((j <= ry ) && ( j >= (((-2.0*ry)/(rx))*i)-ry ) && (j+1>ry || ( j-1 < (((-2.0*ry)/(rx))*i)-ry )) ) + { + xor_pixel(x+i, y+j, vid); + if (i) xor_pixel(x-i, y+j, vid); + } } } |
