diff --git a/README.md b/README.md index abd1c02..c875814 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A game about avoiding climate catastrophe. ## Documentation -There is documentation [here](https://simon-brooke.github.io/climate-game/) +There is documentation [here](https://simon-brooke.github.io/climate-game/). ## Warning diff --git a/resources/heightmaps/earthbump1k.jpg b/resources/heightmaps/earthbump1k.jpg new file mode 100644 index 0000000..84b47f3 Binary files /dev/null and b/resources/heightmaps/earthbump1k.jpg differ diff --git a/resources/images/climategamesplash.png b/resources/images/climategamesplash.png new file mode 100644 index 0000000..ea56018 Binary files /dev/null and b/resources/images/climategamesplash.png differ diff --git a/resources/images/climategamesplash.xcf b/resources/images/climategamesplash.xcf new file mode 100644 index 0000000..a44923a Binary files /dev/null and b/resources/images/climategamesplash.xcf differ diff --git a/resources/images/playful-smiling-monkey.png b/resources/images/playful-smiling-monkey.png new file mode 100644 index 0000000..0353142 Binary files /dev/null and b/resources/images/playful-smiling-monkey.png differ diff --git a/src/clj/cc/journeyman/climate_game/core.clj b/src/clj/cc/journeyman/climate_game/core.clj index 7b7f4af..ee79678 100644 --- a/src/clj/cc/journeyman/climate_game/core.clj +++ b/src/clj/cc/journeyman/climate_game/core.clj @@ -10,9 +10,11 @@ (defn -main "This should be pretty simple." [& args] - (let [app (ClimateGameApp.)] + (let [app (ClimateGameApp.) + settings (app-settings true :title "The Climate Game")] (try - (.setSettings app (app-settings true :title "The Climate Game")) + (.setSettingsDialogImage settings "images/climategamesplash.png") + (.setSettings app settings) (start app) (catch Exception any (println (.getMessage any)) diff --git a/src/java/aaronperkins/planeteg/PlanetMeshGen.java b/src/java/aaronperkins/planeteg/PlanetMeshGen.java index 23805e6..f394940 100644 --- a/src/java/aaronperkins/planeteg/PlanetMeshGen.java +++ b/src/java/aaronperkins/planeteg/PlanetMeshGen.java @@ -1,10 +1,13 @@ package aaronperkins.planeteg; +import com.jme3.math.FastMath; import com.jme3.math.Vector3f; import com.jme3.scene.Mesh; import com.jme3.scene.VertexBuffer.Type; +import com.jme3.terrain.heightmap.AbstractHeightMap; +import com.jme3.terrain.heightmap.ImageBasedHeightMap; +import com.jme3.texture.Texture; import com.jme3.util.BufferUtils; -import com.jme3.math.FastMath; import java.util.List; import java.util.ArrayList; @@ -168,6 +171,21 @@ public class PlanetMeshGen { public void generateHeightmap( ) { generateHeightmap( 750, 19580427, 30, 90, 25000, .8f, .3f ); } + + /** + * Generate a heightmap from this heightmapImage. Added by simon@journeyman.cc, so that we can actually + * get planet Earth. + * + * NOTE: This doesn't even nearly work yet. + * + * @param heightmapImage the path of the asset to use: expected to be a monochrome heightmap + */ + public AbstractHeightMap generateHeightmap( Texture heightmapImage) { + AbstractHeightMap heightmap = new ImageBasedHeightMap(heightmapImage.getImage(), 1f); + heightmap.load(); + + return heightmap; + } /**