* @brief return a node for (dx,dy) if it was visited, or NULL if not found */
| 274 | * @brief return a node for (dx,dy) if it was visited, or NULL if not found |
| 275 | */ |
| 276 | PATHNODE *path_get_node2(int dx, int dy) |
| 277 | { |
| 278 | PATHNODE *result = pnode_ptr->NextNode; |
| 279 | while (result != NULL && (result->x != dx || result->y != dy)) |
| 280 | result = result->NextNode; |
| 281 | return result; |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * @brief insert pPath into the frontier (keeping the frontier sorted by total distance) |