Index: /trunk/src/lib/graphics/importer/height_map.cc
===================================================================
--- /trunk/src/lib/graphics/importer/height_map.cc	(revision 7489)
+++ /trunk/src/lib/graphics/importer/height_map.cc	(revision 7490)
@@ -39,5 +39,6 @@
 Tile::Tile(int i1, int j1, int i2, int j2, HeightMap* heightMapReference )
 {
-  PRINTF(0)("Tile Constructor\n");
+  PRINTF(4)("Tile Constructor\n");
+
   this->highResModel = new VertexArrayModel();
   this->lowResModel  = new VertexArrayModel();
@@ -87,5 +88,5 @@
 
 // #define heightMap this->heightMapReference->heightMap
-#define colours   this->heightMapReference->colours
+#define colors   this->heightMapReference->colors
 #define scaleX this->heightMapReference->scaleX
 #define scaleY this->heightMapReference->scaleY
@@ -97,6 +98,12 @@
 
 
+  //FIXME: OLD implementation
   this->x = this->heightMapReference->offsetX + ( this->heightMapReference->heightMap->h - ((i1 + i2) / 2)) * scaleX;
   this->z = this->heightMapReference->offsetZ + ((j1 + j2 ) / 2 ) * scaleZ;
+  //NEW:
+  this->setAbsCoor(this->heightMapReference->offsetX + ( this->heightMapReference->heightMap->h - ((i1 + i2) / 2)) * scaleX,
+                   0,
+                   this->heightMapReference->offsetZ + ((j1 + j2 ) / 2 ) * scaleZ);
+
 
   float height = 0;
@@ -108,22 +115,19 @@
 
 
-
-
-  if(this->heightMapReference->heightMap != NULL && this->heightMapReference->heightMap->format->BitsPerPixel == 8 )
+  //if( this->heightMapReference->heightMap != NULL && this->heightMapReference->heightMap->format->BitsPerPixel == 8 )
 
   SDL_LockSurface(this->heightMapReference->heightMap);
-  SDL_LockSurface(this->heightMapReference->colourMap);
-
-  for(int i = i1 ; i <= i2  ; i +=sampleRate)
+  SDL_LockSurface(this->heightMapReference->colorMap);
+
+  for( int i = i1 ; i <= i2  ; i +=sampleRate)
   {
     int w = 0;
 
-
-
-    if(this->heightMapReference->hasColourMap)
-    {
-      r = colours[(3*w+2 + 3*i*(this->heightMapReference->heightMap->w )) ];
-      g = colours[(3*w+1 + 3*i*(this->heightMapReference->heightMap->w)) ];
-      b = colours[(3*w+0 + 3*i*(this->heightMapReference->heightMap->w))];
+    // adjust the colors acoring to the color map
+    if( this->heightMapReference->hasColourMap)
+    {
+      r = colors[3 * w + 2 + 3 * i * (this->heightMapReference->heightMap->w)];
+      g = colors[3 * w + 1 + 3 * i * (this->heightMapReference->heightMap->w)];
+      b = colors[3 * w + 0 + 3 * i * (this->heightMapReference->heightMap->w)];
     }
 
@@ -142,7 +146,7 @@
       if(this->heightMapReference->hasColourMap)
       {
-        r = colours[(3*j+2 + 3*i*(this->heightMapReference->heightMap->w )) ];
-        g =  colours[(3*j+1 + 3*i*(this->heightMapReference->heightMap->w)) ];
-        b =  colours[(3*j+0 + 3*i*(this->heightMapReference->heightMap->w))];
+        r = colors[(3*j+2 + 3*i*(this->heightMapReference->heightMap->w )) ];
+        g =  colors[(3*j+1 + 3*i*(this->heightMapReference->heightMap->w)) ];
+        b =  colors[(3*j+0 + 3*i*(this->heightMapReference->heightMap->w))];
       }
       height = (float)(unsigned char) this->heightMapReference->heights[(j +sampleRate+ i*(this->heightMapReference->heightMap->w )) ];
@@ -204,7 +208,7 @@
     if(this->heightMapReference->hasColourMap)
     {
-      r = (float)colours[(3*j+2 + 3*i*(this->heightMapReference->heightMap->w )) ];
-      g = (float)colours[(3*j+1 + 3*i*(this->heightMapReference->heightMap->w)) ];
-      b = (float)colours[(3*j+0 + 3*i*(this->heightMapReference->heightMap->w))];
+      r = (float)colors[(3*j+2 + 3*i*(this->heightMapReference->heightMap->w )) ];
+      g = (float)colors[(3*j+1 + 3*i*(this->heightMapReference->heightMap->w)) ];
+      b = (float)colors[(3*j+0 + 3*i*(this->heightMapReference->heightMap->w))];
     }
 
@@ -242,7 +246,7 @@
     if(this->heightMapReference->hasColourMap)
     {
-      r = (float)colours[3*j+2 + 3*i*(this->heightMapReference->heightMap->w )];
-      g = (float)colours[3*j+1 + 3*i*(this->heightMapReference->heightMap->w)];
-      b = (float)colours[3*j+0 + 3*i*(this->heightMapReference->heightMap->w)];
+      r = (float)colors[3*j+2 + 3*i*(this->heightMapReference->heightMap->w )];
+      g = (float)colors[3*j+1 + 3*i*(this->heightMapReference->heightMap->w)];
+      b = (float)colors[3*j+0 + 3*i*(this->heightMapReference->heightMap->w)];
     }
 
@@ -305,5 +309,5 @@
 
 
-  SDL_UnlockSurface(this->heightMapReference->colourMap);
+  SDL_UnlockSurface(this->heightMapReference->colorMap);
 
   model->finalize();
@@ -313,5 +317,5 @@
 
 // #undef heightMap
-        #undef colours
+        #undef colors
         #undef scaleX
         #undef scaleY
@@ -361,5 +365,5 @@
 }
 
-HeightMap::HeightMap(const std::string& height_map_name = NULL, const std::string& colour_map_name = NULL)
+HeightMap::HeightMap(const std::string& height_map_name = NULL, const std::string& color_map_name = NULL)
     : VertexArrayModel()
 {
@@ -387,21 +391,21 @@
   generateNormalVectorField();
 
-  colourMap=NULL;
-  if(colour_map_name != "")
-  {
-    colourMap = IMG_Load(colour_map_name.c_str());
-  }
-
-  if(colourMap != NULL)
-  {
-    PRINTF(0)("loading Image %s\n", colour_map_name.c_str());
-    PRINTF(0)("width : %i\n", colourMap->w);
-    PRINTF(0)("height : %i\n", colourMap->h);
-    PRINTF(0)("%i Byte(s) per Pixel \n", colourMap->format->BytesPerPixel);
-    PRINTF(0)("Rshift : %i\n", colourMap->format->Rshift);
-    PRINTF(0)("Bshift: %i\n", colourMap->format->Bshift);
-    PRINTF(0)("Gshift: %i\n", colourMap->format->Gshift);
-    PRINTF(0)("Rmask: %i\n", colourMap->format->Rmask);
-    PRINTF(0)("Gmask: %i\n", colourMap->format->Gmask);
+  colorMap=NULL;
+  if(color_map_name != "")
+  {
+    colorMap = IMG_Load(color_map_name.c_str());
+  }
+
+  if(colorMap != NULL)
+  {
+    PRINTF(0)("loading Image %s\n", color_map_name.c_str());
+    PRINTF(0)("width : %i\n", colorMap->w);
+    PRINTF(0)("height : %i\n", colorMap->h);
+    PRINTF(0)("%i Byte(s) per Pixel \n", colorMap->format->BytesPerPixel);
+    PRINTF(0)("Rshift : %i\n", colorMap->format->Rshift);
+    PRINTF(0)("Bshift: %i\n", colorMap->format->Bshift);
+    PRINTF(0)("Gshift: %i\n", colorMap->format->Gshift);
+    PRINTF(0)("Rmask: %i\n", colorMap->format->Rmask);
+    PRINTF(0)("Gmask: %i\n", colorMap->format->Gmask);
   }
   else
@@ -410,7 +414,7 @@
 
 
-  if(colourMap != NULL)
-  {
-    colours = (unsigned char *) colourMap->pixels;
+  if(colorMap != NULL)
+  {
+    colors = (unsigned char *) colorMap->pixels;
     hasColourMap = true;
   }
@@ -429,5 +433,5 @@
 {
   delete heightMap;
-  delete colourMap;
+  delete colorMap;
 
 
Index: /trunk/src/lib/graphics/importer/height_map.h
===================================================================
--- /trunk/src/lib/graphics/importer/height_map.h	(revision 7489)
+++ /trunk/src/lib/graphics/importer/height_map.h	(revision 7490)
@@ -17,4 +17,5 @@
 
 #include "vertex_array_model.h"
+#include "p_node.h"
 
 
@@ -37,5 +38,5 @@
 
 //!< one part of the height map
-class Tile
+class Tile : public PNode
 {
   public:
@@ -47,6 +48,6 @@
 
     void draw();
-    inline void drawHighRes() { highResModel->draw(); }
-    inline void drawLowRes() { lowResModel->draw(); }
+    inline void drawHighRes() const { highResModel->draw(); }
+    inline void drawLowRes() const { lowResModel->draw(); }
 
 
@@ -108,7 +109,7 @@
   private:
     SDL_Surface*                          heightMap;
-    SDL_Surface*                          colourMap;
+    SDL_Surface*                          colorMap;
     unsigned char*                        heights;
-    unsigned char*                        colours;
+    unsigned char*                        colors;
 
     Vector**                              normalVectorField;
