src/Terrain.hh
changeset 424 f337a86d144e
parent 423 947ab54de4b7
--- a/src/Terrain.hh	Thu Jan 22 03:53:17 2009 +0200
+++ b/src/Terrain.hh	Thu Jan 22 04:09:53 2009 +0200
@@ -8,6 +8,11 @@
 
 #include <vector>
 
+#if GRAPHICS_ENABLED
+    #include "Graphics/Drawable.hh"
+
+#endif
+
 /**
  * Different types of terrain available
  */
@@ -43,12 +48,11 @@
 #if GRAPHICS_ENABLED    
     /** We pre-render the textured terrain data for display */
     CL_PixelBuffer pixbuf;
-
+    
+    /** Generated texture pattern */
+    std::vector<std::vector<int> > texture;
 #endif    
 
-    // XXX: terrain texture
-    std::vector<std::vector<int> > texture;
-
 public:    
     /**
      * Construct a new terrain based on the given configuration
@@ -105,6 +109,7 @@
      */
     void generatePixelBuffer (void);
 
+#if GRAPHICS_ENABLED    
     /**
      * Generates an area of random texture using a fractal-based algorithm, this can then be applied to the terrain
      * pixels using noisifyPixel
@@ -116,6 +121,7 @@
      * at \a pc.
      */
     Color getTexturePixel (PixelDimension x, PixelDimension y);
+#endif
 
     /**
      * Scale parameter to "pixels"