v0.4.3: separated tile display logic from tile types
also re-added visual only tile types
This commit is contained in:
@@ -42,9 +42,10 @@ public class PathFinder {
|
||||
public static int[] NEIGHBOURS8;
|
||||
public static int[] NEIGHBOURS9;
|
||||
|
||||
//similar to NEIGHBOURS8, but the order is circular.
|
||||
//similar to their equivalent neighbour arrays, but the order is clockwise.
|
||||
//Useful for some logic functions, but is slower due to lack of array-access order.
|
||||
public static int[] CIRCLE;
|
||||
public static int[] CIRCLE4;
|
||||
public static int[] CIRCLE8;
|
||||
|
||||
public static void setMapSize( int width, int height ) {
|
||||
|
||||
@@ -64,7 +65,8 @@ public class PathFinder {
|
||||
NEIGHBOURS8 = new int[]{-width-1, -width, -width+1, -1, +1, +width-1, +width, +width+1};
|
||||
NEIGHBOURS9 = new int[]{-width-1, -width, -width+1, -1, 0, +1, +width-1, +width, +width+1};
|
||||
|
||||
CIRCLE = new int[]{-width-1, -width, -width+1, +1, +width+1, +width, +width-1, -1};
|
||||
CIRCLE4 = new int[]{-width, +1, +width, -1};
|
||||
CIRCLE8 = new int[]{-width-1, -width, -width+1, +1, +width+1, +width, +width-1, -1};
|
||||
}
|
||||
|
||||
public static Path find( int from, int to, boolean[] passable ) {
|
||||
|
||||
Reference in New Issue
Block a user