trackeditor: add environment map check
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8489 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: e4a9c25f9e874b47eaae06da2fa7632825613bdd Former-commit-id: 534fe3091cf00fa5f25f9753e98a9d69b38b05a8
This commit is contained in:
parent
59269eddc6
commit
ea179b7bd3
1 changed files with 26 additions and 0 deletions
|
@ -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<EnvironmentMapping> 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();
|
||||
|
|
Loading…
Reference in a new issue