diff -r d6f2b9912449 -r ce4d8f12373a src/proto2/Terrain.hh --- a/src/proto2/Terrain.hh Sun Nov 30 15:15:17 2008 +0000 +++ b/src/proto2/Terrain.hh Sun Nov 30 15:24:33 2008 +0000 @@ -8,6 +8,17 @@ enum TerrainType {EMPTY, DIRT, ROCK}; +const Vector DIRECTIONS[] = { + Vector(-1,-1), + Vector(-1,0), + Vector(-1,1), + Vector(0,-1), + Vector(0,1), + Vector(1,-1), + Vector(1,0), + Vector(1,1) +}; + /** * Terrain class. Represents game terrain and contains member * functions to manipulate terrain and get info about it. @@ -109,16 +120,9 @@ * Return normal for the given point. * * @param point Point for which the normal is calculated. - * @param n Accuracy in pixels + * @return Normal vector ((0,0) if there's no terrain) */ - Vector getNormal(Vector prevPoint, Vector hitPoint, int n = 1) const; - /** - * Return a normal for the given point. - * - * @param point Point for which the normal is calculated. - * @param a Accuracy in scaled units - */ - Vector getNormal(Vector prevPoint, Vector hitPoint, float a) const; + Vector getNormal(Vector point) const; /** * Generate random terrain.