diff --git a/src/tools/trackeditor/gui/CheckDialog.java b/src/tools/trackeditor/gui/CheckDialog.java index 1bc2fcc8d..601aa9054 100644 --- a/src/tools/trackeditor/gui/CheckDialog.java +++ b/src/tools/trackeditor/gui/CheckDialog.java @@ -16,6 +16,7 @@ import javax.swing.WindowConstants; import utils.Editor; import utils.TrackData; +import utils.circuit.EnvironmentMapping; import utils.circuit.Segment; import utils.circuit.Surface; import utils.circuit.TrackObject; @@ -75,6 +76,7 @@ public class CheckDialog extends JDialog checkSurfaces(); checkObjects(); checkTerrainGeneration(); + checkEnvironmentMapping(); textArea.append("Checking complete!"); } @@ -82,6 +84,30 @@ public class CheckDialog extends JDialog this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); } + private void checkEnvironmentMapping() + { + Vector envMaps = trackData.getGraphic().getEnvironmentMapping(); + + for (int i = 0; i < envMaps.size(); i++) + { + String mapImage = envMaps.get(i).getEnvMapImage(); + + if (mapImage != null && !mapImage.isEmpty()) + { + File file = new File(Editor.getProperties().getPath() + sep + mapImage); + + if (!file.exists()) + { + textArea.append("Environment Map " + envMaps.get(i).getName() + " file " + mapImage + " not found\n"); + } + } + else + { + textArea.append("Environment Map " + envMaps.get(i).getName() + " missing image file\n"); + } + } + } + private void checkTerrainGeneration() { String reliefFile = trackData.getGraphic().getTerrainGeneration().getReliefFile();