src/Terrain.cc
changeset 370 39e59dd36b6e
parent 327 09a3b5055862
child 377 01d3c340b372
--- a/src/Terrain.cc	Tue Dec 09 04:49:33 2008 +0000
+++ b/src/Terrain.cc	Mon Dec 15 14:24:38 2008 +0000
@@ -316,7 +316,8 @@
  */
 static int getDirectionIndex (Vector direction) {
     Vector dir = direction.roundToInt();
-    if(dir.x == 0 && dir.y == -1) {
+
+    if (dir.x == 0 && dir.y == -1) {
         return 0;
     } else if (dir.x == 1 && dir.y == -1) {
         return 1;
@@ -374,19 +375,6 @@
     return normal;
 }
 
-// XXX: weird vectors
-Vector direction (const Vector &v) {
-    Vector tmp(v);
-
-    if (tmp.length() > 0) 
-        tmp /= tmp.length();
-
-    tmp.x = (uint16_t)(tmp.x);
-    tmp.y = (uint16_t)(tmp.y);
-
-    return tmp;
-}
-
 // TODO: This could better :)
 // TODO: And this need some cleaning :)
 void Terrain::generateTerrain (int seed) {