aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/walking.h
diff options
context:
space:
mode:
authorRobert Špalek2009-11-11 00:19:23 +0000
committerRobert Špalek2009-11-11 00:19:23 +0000
commit78a10999ab241c6dd4496e6d66e9a608a0e78c30 (patch)
treee1b35ac454010022a09afc7b053c77ccb71c730a /engines/draci/walking.h
parentdea7e181727e851e32e9e513f1005d1cb4986e92 (diff)
downloadscummvm-rg350-78a10999ab241c6dd4496e6d66e9a608a0e78c30.tar.gz
scummvm-rg350-78a10999ab241c6dd4496e6d66e9a608a0e78c30.tar.bz2
scummvm-rg350-78a10999ab241c6dd4496e6d66e9a608a0e78c30.zip
Cleaned up searching the closest point.
The old comments were completely misleading although the algorithm was good. svn-id: r45824
Diffstat (limited to 'engines/draci/walking.h')
-rw-r--r--engines/draci/walking.h6
1 files changed, 3 insertions, 3 deletions
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;