mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
small pathfind speedup: validate coords only with debug definition
svn-id: r26788
This commit is contained in:
parent
5c3f6721b8
commit
21412b821c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user