Skip to content

Commit

Permalink
some final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
priitkalda committed Dec 6, 2015
1 parent 2fc0b10 commit be5ac37
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
Binary file added runnable_test_build_6.jar
Binary file not shown.
1 change: 1 addition & 0 deletions runnable_test_build_6.jar.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java -Xss1500m -jar runnable_test_build_6.jar
47 changes: 42 additions & 5 deletions src/application/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,45 @@ public void readTextures() throws FileNotFoundException{

for (int i = 1; i<27; i++){
legal_blocks.add(i);
Block.textures[i] = new ImagePattern(new Image(new FileInputStream(new File("textures/" + i + ".png"))));
try{
Block.textures[i] = new ImagePattern(new Image(new FileInputStream(new File("textures/" + i + ".png"))));
}
catch(FileNotFoundException e){


if(Block.isParking(i)){
Block.textures[i] = Color.DARKBLUE;

}else if(i==Block._ROBOT_GATEWAY){

Block.textures[i] = Color.BLUEVIOLET;
}else{
Block.textures[i] = Color.DARKGREEN;

}

}
}
Block.textures[48] = new ImagePattern(new Image(new FileInputStream(new File("textures/" + "r2.png"))));
Block.textures[49] = new ImagePattern(new Image(new FileInputStream(new File("textures/" + "r.png"))));

Block.textures[Block._NO_BLOCK] = Color.TRANSPARENT;
Block.textures[Block._ROBOT_ROAD] = Color.AZURE;
Block.textures[Block._CONCRETE] = Color.BROWN;
Block.textures[Block._LEVEL_WALL] = Color.BLACK;

try{
Block.textures[48] = new ImagePattern(new Image(new FileInputStream(new File("textures/" + "r2.png"))));
}
catch(FileNotFoundException e){
Block.textures[48] = Color.GRAY;
}

try{
Block.textures[49] = new ImagePattern(new Image(new FileInputStream(new File("textures/" + "r.png"))));
}
catch(FileNotFoundException e){
Block.textures[49] = Color.DARKGRAY;
}

//System.out.println("Done!");
}

Expand Down Expand Up @@ -1052,8 +1087,10 @@ public void start(final Stage primaryStage) throws FileNotFoundException, IOExc
new FileChooser.ExtensionFilter("DAT", "*.dat")
);
fileChooser.setTitle("Point to .dat file");
fileChooser.setInitialDirectory(new File("levels/"));


if(new File("levels/").exists()){
fileChooser.setInitialDirectory(new File("levels/"));
}
final FileChooser imageChooser = new FileChooser();
imageChooser.getExtensionFilters().addAll(
new FileChooser.ExtensionFilter("All Images", "*.*"),
Expand Down

0 comments on commit be5ac37

Please sign in to comment.