|
|
|
@ -20,6 +20,7 @@ import engine.objects.Zone;
@@ -20,6 +20,7 @@ import engine.objects.Zone;
|
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
import javax.imageio.ImageIO; |
|
|
|
|
import javax.imageio.ImageReader; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
import java.io.File; |
|
|
|
@ -30,6 +31,7 @@ import java.nio.file.Paths;
@@ -30,6 +31,7 @@ import java.nio.file.Paths;
|
|
|
|
|
import java.sql.ResultSet; |
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Iterator; |
|
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
import static java.lang.Math.abs; |
|
|
|
@ -315,6 +317,11 @@ public class HeightMap {
@@ -315,6 +317,11 @@ public class HeightMap {
|
|
|
|
|
|
|
|
|
|
// Load pixel data
|
|
|
|
|
|
|
|
|
|
Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName("TGA"); |
|
|
|
|
while (readers.hasNext()) { |
|
|
|
|
System.out.println("reader: " + readers.next()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try (Stream<Path> filePathStream = Files.walk(Paths.get(ConfigManager.DEFAULT_DATA_DIR + "heightmaps/TARGA/"))) { |
|
|
|
|
filePathStream.forEach(filePath -> { |
|
|
|
|
|
|
|
|
@ -323,6 +330,7 @@ public class HeightMap {
@@ -323,6 +330,7 @@ public class HeightMap {
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
BufferedImage heightmapImage = ImageIO.read(imageFile); |
|
|
|
|
int width = heightmapImage.getWidth(); |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|