summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacob1 <jfu614@gmail.com>2011-11-22 22:27:48 (GMT)
committer Jacob1 <jfu614@gmail.com>2012-03-14 22:49:24 (GMT)
commit2f16a599981fb98da5e69357f1fd85e3a034b9b4 (patch)
tree9aa70e48f66a49f44756952ec77467ca5b818ae5 /src
parent1cfcd25c369e8ec4ea66bd2acb3a5368801bf89e (diff)
downloadpowder-2f16a599981fb98da5e69357f1fd85e3a034b9b4.zip
powder-2f16a599981fb98da5e69357f1fd85e3a034b9b4.tar.gz
Fixed triangle brush, but maybe I could keep it in as diamond brush
Diffstat (limited to 'src')
-rw-r--r--src/powder.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/powder.c b/src/powder.c
index 4c3d65d..fbb2637 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -3168,13 +3168,17 @@ int create_parts(int x, int y, int rx, int ry, int c, int flags)
}
else
{
- int tempy = y, i, j;
+ int tempy = y, i, j, jmax;
+ if (CURRENT_BRUSH == TRI_BRUSH)
+ tempy = y + ry;
for (i = x - rx; i <= x; i++) {
- while (InCurrentBrush(i-x,tempy-y,rx,ry)) {
+ while (InCurrentBrush(i-x,tempy-y,rx,ry))
tempy = tempy - 1;
- }
tempy = tempy + 1;
- for (j = tempy; j <= 2 * y - tempy; j++) {
+ jmax = 2*y - tempy;
+ if (CURRENT_BRUSH == TRI_BRUSH)
+ jmax = y + ry;
+ for (j = tempy; j <= jmax; j++) {
if (create_part_add_props(-2, i, j, c, rx, ry)==-1)
f = 1;
if (create_part_add_props(-2, 2*x-i, j, c, rx, ry)==-1)