summaryrefslogtreecommitdiff
path: root/src/astar.h
blob: 4a9fa0454d2d7037d80a3b88c06327221435454d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifdef WIN32
  #pragma warning (disable:4312)
#endif

#include <allegro.h>

#include "map.h"
#include "being.h"

#define NOT_STARTED 0
#define FOUND 1
#define NOT_FOUND 2

extern char walkability [MAP_WIDTH][MAP_HEIGHT];
extern int whichList[MAP_WIDTH+1][MAP_HEIGHT+1];
extern int G_cost[MAP_WIDTH+1][MAP_HEIGHT+1];

void ReadPath(int pathfinderID,int currentX,int currentY, int pixelsPerFrame);
int ReadPathX(int pathfinderID,int pathLocation);
int ReadPathY(int pathfinderID,int pathLocation);
void RenderScreen (bool stepByStep=false);
PATH_NODE *find_path(int pathfinderID,int startingX, int startingY, int targetX, int targetY);
void ReadPath(int pathfinderID);