diff options
author | Andrew Kurushin | 2007-05-08 16:09:47 +0000 |
---|---|---|
committer | Andrew Kurushin | 2007-05-08 16:09:47 +0000 |
commit | 21412b821c968b3d23f4c7fd120f19a1af50b67f (patch) | |
tree | 6e78e1cf700caf45aa389b88e46c9dde9e9ffc42 | |
parent | 5c3f6721b87a96ab70490bb2d59b10d5a564d495 (diff) | |
download | scummvm-rg350-21412b821c968b3d23f4c7fd120f19a1af50b67f.tar.gz scummvm-rg350-21412b821c968b3d23f4c7fd120f19a1af50b67f.tar.bz2 scummvm-rg350-21412b821c968b3d23f4c7fd120f19a1af50b67f.zip |
small pathfind speedup: validate coords only with debug definition
svn-id: r26788
-rw-r--r-- | engines/saga/actor.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/saga/actor.h b/engines/saga/actor.h index 2c247d7bba..549265a72c 100644 --- a/engines/saga/actor.h +++ b/engines/saga/actor.h @@ -622,15 +622,19 @@ private: (testPoint.y < 0) || (testPoint.y >= _yCellCount)); } void setPathCell(const Point &testPoint, int8 value) { +#ifdef ACTOR_DEBUG if (!validPathCellPoint(testPoint)) { error("Actor::setPathCell wrong point"); } +#endif _pathCell[testPoint.x + testPoint.y * _xCellCount] = value; } int8 getPathCell(const Point &testPoint) { +#ifdef ACTOR_DEBUG if (!validPathCellPoint(testPoint)) { error("Actor::getPathCell wrong point"); } +#endif return _pathCell[testPoint.x + testPoint.y * _xCellCount]; } bool scanPathLine(const Point &point1, const Point &point2); |