]> gitweb.factorcode.org Git - factor.git/commitdiff
terrain: make it deploy
authorSlava Pestov <slava@shill.local>
Sat, 17 Oct 2009 04:43:44 +0000 (23:43 -0500)
committerSlava Pestov <slava@shill.local>
Sat, 17 Oct 2009 04:43:44 +0000 (23:43 -0500)
extra/grid-meshes/grid-meshes.factor
extra/terrain/deploy.factor
extra/terrain/generation/generation.factor

index b63b3d791c51e6d105daae2634ece5c98a61aac8..ebde0b26416d340c6fcf81b9d227afecb7933320 100644 (file)
@@ -35,12 +35,9 @@ PRIVATE>
         dup dim>> second iota [ draw-vertex-buffer-row ] with each
     ] with-gl-buffer ;
 
-USE: tools.time
 : <grid-mesh> ( dim -- grid-mesh )
-    [
     [ ] [ vertex-array >vertex-buffer ] [ first 1 + 2 * ] tri
-    grid-mesh boa
-    ] time ;
+    grid-mesh boa ;
 
 M: grid-mesh dispose
     [ [ delete-gl-buffer ] when* f ] change-buffer
index b51873a5adabe0cfa8615694defcb9dd9f97358e..c27e7b3c846f35e250630accd7e7933a55afb470 100644 (file)
@@ -1,14 +1,14 @@
 USING: tools.deploy.config ;
 H{
+    { deploy-name "Terrain" }
     { deploy-ui? t }
-    { deploy-reflection 1 }
+    { deploy-c-types? f }
     { deploy-unicode? f }
-    { deploy-math? t }
     { deploy-io 2 }
-    { deploy-c-types? f }
-    { deploy-name "Terrain" }
-    { deploy-word-props? f }
-    { deploy-word-defs? f }
+    { deploy-reflection 2 }
     { "stop-after-last-window?" t }
+    { deploy-word-props? f }
+    { deploy-math? t }
     { deploy-threads? t }
+    { deploy-word-defs? f }
 }
index e41d1078713676728212abb25cff47e4bb858e46..86f532badab9d38b128701fd03d0b6eab89246c6 100644 (file)
@@ -1,13 +1,13 @@
 USING: accessors alien.data.map arrays byte-arrays combinators
 combinators.smart fry grouping images kernel math
 math.matrices.simd math.order math.vectors noise random
-sequences math.vectors.simd ;
+sequences math.vectors.simd typed ;
 FROM: alien.c-types => float uchar ;
 SIMDS: float uchar ;
 IN: terrain.generation
 
 CONSTANT: terrain-segment-size { 512 512 }
-CONSTANT: terrain-segment-size-vector { 512.0 512.0 1.0 1.0 }
+CONSTANT: terrain-segment-size-vector float-4{ 512.0 512.0 1.0 1.0 }
 CONSTANT: terrain-big-noise-scale float-4{ 0.002 0.002 0.002 0.002 }
 CONSTANT: terrain-small-noise-scale float-4{ 0.05 0.05 0.05 0.05 }
 
@@ -51,7 +51,7 @@ TUPLE: segment image ;
         ubyte-components >>component-type
         terrain-segment-size >>dim ;
 
-: terrain-segment ( terrain at -- image )
+TYPED: terrain-segment ( terrain: terrain at: float-4 -- image )
     {
         [ big-noise-segment ]
         [ small-noise-segment ]