summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-03-30 14:48:58 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-03-30 15:32:51 (GMT)
commit57aa7b88f1cab19c091c6c700035812731052089 (patch)
tree821e08d9fd23eabbd4b56bd04484399a9eacfecb /src/graphics.c
parenta7e5f3651afd1f1577fdd00c3971f53fac1543ed (diff)
downloadpowder-57aa7b88f1cab19c091c6c700035812731052089.zip
powder-57aa7b88f1cab19c091c6c700035812731052089.tar.gz
More brush fixes
Fixes a problem with the triangle brush caused by InCurrentBrush calculating the bottom left or bottom right points to be outside the triangle at certain brush sizes. Also fixes some points in the brush outline being heated twice when a line is drawn with the heat tool.
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 00e4466..8f4a8de 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -3706,9 +3706,11 @@ void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry)
{
int tempy = y, i, j, oldy;
if (CURRENT_BRUSH == TRI_BRUSH)
- tempy = y + ry - 1;
+ tempy = y + ry;
for (i = x - rx; i <= x; i++) {
oldy = tempy;
+ if (!InCurrentBrush(i-x,tempy-y,rx,ry))
+ continue;
while (InCurrentBrush(i-x,tempy-y,rx,ry))
tempy = tempy - 1;
tempy = tempy + 1;