Add acoustics #2

Merged
fkoppe merged 30 commits from dev/client_koppe into dev_client 2024-11-16 18:21:21 +01:00
4 changed files with 3 additions and 10 deletions
Showing only changes of commit a3c5af58d7 - Show all commits

View File

@@ -1,4 +1,4 @@
package Acoustic; package pp.mdga.client.Acoustic;
public class AcousticHandler { public class AcousticHandler {
} }

View File

@@ -12,7 +12,6 @@
public class BoardView { public class BoardView {
private static final float GRID_SIZE = 1.72f; private static final float GRID_SIZE = 1.72f;
private static final float GRID_ELEVATION = 0.0f; 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 static final String MAP_NAME = "circle_map.mdga";
private final MdgaApp mdgaApp; private final MdgaApp mdgaApp;
@@ -61,9 +60,6 @@ private Spatial createModel(Asset asset){
} }
private static Vector3f gridToWorld(int x, int y) { 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); return new Vector3f(GRID_SIZE * x, GRID_SIZE * y, GRID_ELEVATION);
} }
} }

View File

@@ -27,12 +27,12 @@ public List<AssetOnMap> loadMap(String mapName) {
if(entry.charAt(0) == '#') continue; if(entry.charAt(0) == '#') continue;
String[] parts = entry.trim().split(" "); String[] parts = entry.trim().split(" ");
assert(parts.length == 2); if(parts.length != 2) throw new RuntimeException();
String assetName = parts[0]; String assetName = parts[0];
String[] coordinates = parts[1].split(","); String[] coordinates = parts[1].split(",");
assert(coordinates.length == 2); if(coordinates.length != 2) throw new RuntimeException();
int x = Integer.parseInt(coordinates[0]); int x = Integer.parseInt(coordinates[0]);
int y = Integer.parseInt(coordinates[1]); int y = Integer.parseInt(coordinates[1]);

View File

@@ -34,6 +34,3 @@
} }
include 'mdga:client' include 'mdga:client'
findProject(':mdga:client')?.name = 'client' findProject(':mdga:client')?.name = 'client'
include 'mdga:client'
findProject(':mdga:client')?.name = 'client'