| 344 | } |
| 345 | |
| 346 | bool IsTileOccupied(Point position) |
| 347 | { |
| 348 | if (!InDungeonBounds(position)) { |
| 349 | return true; // OOB positions are considered occupied. |
| 350 | } |
| 351 | |
| 352 | if (IsTileSolid(position)) { |
| 353 | return true; |
| 354 | } |
| 355 | if (dMonster[position.x][position.y] != 0) { |
| 356 | return true; |
| 357 | } |
| 358 | if (dPlayer[position.x][position.y] != 0) { |
| 359 | return true; |
| 360 | } |
| 361 | if (IsObjectAtPosition(position)) { |
| 362 | return true; |
| 363 | } |
| 364 | |
| 365 | return false; |
| 366 | } |
| 367 | |
| 368 | int FindPath(tl::function_ref<bool(Point)> posOk, Point startPosition, Point destinationPosition, int8_t path[MaxPathLength]) |
| 369 | { |
no test coverage detected