Devilution
Diablo devolved - magic behind the 1996 computer game

◆ FindPath()

int FindPath ( BOOL(*)(int, int, int)  PosOk,
int  PosOkArg,
int  sx,
int  sy,
int  dx,
int  dy,
char *  path 
)

find the shortest path from (sx,sy) to (dx,dy), using PosOk(PosOkArg,x,y) to check that each step is a valid position.

Store the step directions (see path_directions) in path, which must have room for 24 steps

Definition at line 51 of file path.cpp.