Remove grid extend limits
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package Acoustic;
|
||||
package pp.mdga.client.Acoustic;
|
||||
|
||||
public class AcousticHandler {
|
||||
}
|
||||
@@ -12,7 +12,6 @@
|
||||
public class BoardView {
|
||||
private static final float GRID_SIZE = 1.72f;
|
||||
private static final float GRID_ELEVATION = 0.0f;
|
||||
private static final int GRID_EXTEND = 5;
|
||||
private static final String MAP_NAME = "circle_map.mdga";
|
||||
|
||||
private final MdgaApp mdgaApp;
|
||||
@@ -61,9 +60,6 @@ private Spatial createModel(Asset asset){
|
||||
}
|
||||
|
||||
private static Vector3f gridToWorld(int x, int y) {
|
||||
assert(-GRID_EXTEND <= x && x <= GRID_EXTEND);
|
||||
assert(-GRID_EXTEND <= y && y < GRID_EXTEND);
|
||||
|
||||
return new Vector3f(GRID_SIZE * x, GRID_SIZE * y, GRID_ELEVATION);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@ public List<AssetOnMap> loadMap(String mapName) {
|
||||
if(entry.charAt(0) == '#') continue;
|
||||
|
||||
String[] parts = entry.trim().split(" ");
|
||||
assert(parts.length == 2);
|
||||
if(parts.length != 2) throw new RuntimeException();
|
||||
|
||||
String assetName = parts[0];
|
||||
String[] coordinates = parts[1].split(",");
|
||||
|
||||
assert(coordinates.length == 2);
|
||||
if(coordinates.length != 2) throw new RuntimeException();
|
||||
|
||||
int x = Integer.parseInt(coordinates[0]);
|
||||
int y = Integer.parseInt(coordinates[1]);
|
||||
|
||||
Reference in New Issue
Block a user