src/proto2/Terrain.hh
changeset 150 5e032b540af3
parent 149 ce4d8f12373a
child 151 9fc900fbfa79
--- a/src/proto2/Terrain.hh	Sun Nov 30 15:24:33 2008 +0000
+++ b/src/proto2/Terrain.hh	Sun Nov 30 17:13:16 2008 +0000
@@ -48,7 +48,7 @@
      * @param point Point in "real" units
      * @return Int vector
      */
-    Vector getPixelLocation(Vector point);
+    Vector getPixelLocation(Vector point) const;
 
     /**
      * Scale parameter to "pixels"
@@ -56,8 +56,11 @@
      * @param x Scaled value
      * @return Corresponding value in pixels
      */
-    uint16_t scale(float x);
+    uint16_t scale(float x) const;
 
+ public:
+
+    // TODO: This should be private.
     /**
      * Return the type of terrain at given position. Returns ROCK if
      * given point is not inside terrain area.
@@ -66,9 +69,8 @@
      * @param y Y coordinate
      * @return Terrain type
      */
-    TerrainType getType(uint16_t x, uint16_t y);
+    TerrainType getType(int32_t x, int32_t y) const;
 
-public:
     /**
      * Constructor.
      *
@@ -92,7 +94,7 @@
     /**
      * Destructor
      */
-    ~Terrain();
+    ~Terrain() {}
 
     /**
      * Check if given point has some terrain.
@@ -114,7 +116,7 @@
      * @param pos Circle center
      * @param r Circle radius
      */ 
-    void removeGround(Vector pos, float r);
+    void removeGround(const Vector &pos, const float &r);
 
     /**
      * Return normal for the given point.
@@ -136,7 +138,7 @@
      *
      * @param gc CL_GraphicContext
      */
-    void draw(CL_GraphicContext *gc) const;
+    void draw(CL_GraphicContext *gc);
     /**
      * Draw part of the terrain for given graphiscontext.
      *
@@ -144,7 +146,7 @@
      * @param center Center of the rectangle drawn.
      * @param dimension Dimensions of the rectangle.
      */
-    void draw(CL_GraphicContext &gc, Vector center, Vector dimensions);
+    //void draw(CL_GraphicContext &gc, Vector center, Vector dimensions);
 
     /**
      * Set terrain.