Way faster deleting
This commit is contained in:
parent
2f16a59998
commit
5f51cb3042
21
src/powder.c
21
src/powder.c
@ -3083,10 +3083,23 @@ int create_parts(int x, int y, int rx, int ry, int c, int flags)
|
|||||||
delete_part(x, y, 0);
|
delete_part(x, y, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (j=-ry; j<=ry; j++)
|
{
|
||||||
for (i=-rx; i<=rx; i++)
|
int tempy = y, i, j, jmax;
|
||||||
if (InCurrentBrush(i ,j ,rx ,ry))
|
if (CURRENT_BRUSH == TRI_BRUSH)
|
||||||
delete_part(x+i, y+j, 0);
|
tempy = y + ry;
|
||||||
|
for (i = x - rx; i <= x; i++) {
|
||||||
|
while (InCurrentBrush(i-x,tempy-y,rx,ry))
|
||||||
|
tempy = tempy - 1;
|
||||||
|
tempy = tempy + 1;
|
||||||
|
jmax = 2*y - tempy;
|
||||||
|
if (CURRENT_BRUSH == TRI_BRUSH)
|
||||||
|
jmax = y + ry;
|
||||||
|
for (j = tempy; j <= jmax; j++) {
|
||||||
|
delete_part(i, j, 0);
|
||||||
|
delete_part(2*x-i, j, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user