Many internal changes

This commit is contained in:
Anuken
2020-03-04 13:32:31 -05:00
parent aeae286273
commit cf31293d7b
30 changed files with 283 additions and 290 deletions

View File

@@ -164,13 +164,13 @@ public enum EditorTool{
int x1;
stack.clear();
stack.add(Pos.get(x, y));
stack.add(Point2.pack(x, y));
try{
while(stack.size > 0 && stack.size < width*height){
int popped = stack.pop();
x = Pos.x(popped);
y = Pos.y(popped);
x = Point2.x(popped);
y = Point2.y(popped);
x1 = x;
while(x1 >= 0 && tester.get(editor.tile(x1, y))) x1--;
@@ -180,14 +180,14 @@ public enum EditorTool{
filler.get(editor.tile(x1, y));
if(!spanAbove && y > 0 && tester.get(editor.tile(x1, y - 1))){
stack.add(Pos.get(x1, y - 1));
stack.add(Point2.pack(x1, y - 1));
spanAbove = true;
}else if(spanAbove && !tester.get(editor.tile(x1, y - 1))){
spanAbove = false;
}
if(!spanBelow && y < height - 1 && tester.get(editor.tile(x1, y + 1))){
stack.add(Pos.get(x1, y + 1));
stack.add(Point2.pack(x1, y + 1));
spanBelow = true;
}else if(spanBelow && y < height - 1 && !tester.get(editor.tile(x1, y + 1))){
spanBelow = false;