From 78a10999ab241c6dd4496e6d66e9a608a0e78c30 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Wed, 11 Nov 2009 00:19:23 +0000 Subject: Cleaned up searching the closest point. The old comments were completely misleading although the algorithm was good. svn-id: r45824 --- engines/draci/walking.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/draci/walking.h') diff --git a/engines/draci/walking.h b/engines/draci/walking.h index eb165b2c6f..e21ed710b8 100644 --- a/engines/draci/walking.h +++ b/engines/draci/walking.h @@ -43,10 +43,10 @@ public: void load(const byte *data, uint length); bool getPixel(int x, int y) const; - bool isWalkable(int x, int y) const; + bool isWalkable(const Common::Point &p) const; Sprite *newOverlayFromMap(byte colour) const; - Common::Point findNearestWalkable(int x, int y, Common::Rect searchRect) const; + Common::Point findNearestWalkable(int x, int y) const; bool findShortestPath(Common::Point p1, Common::Point p2, WalkingPath *path) const; void obliquePath(const WalkingPath& path, WalkingPath *obliquedPath); @@ -66,7 +66,7 @@ private: const byte *_data; // 4 possible directions to walk from a pixel. - static int kDirections[][2]; + static const int kDirections[][2]; void drawOverlayRectangle(const Common::Point &p, byte colour, byte *buf) const; bool lineIsCovered(const Common::Point &p1, const Common::Point &p2) const; -- cgit v1.2.3