aboutsummaryrefslogtreecommitdiff
path: root/scout.h
blob: 594963cc02c35906e4bd524d61f6a4c972e7e29a (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __LIBSCOUT__
#define __LIBSCOUT__

struct scnode {
	struct scway *way;
	void *dat;
};

struct scway {
	const struct scnode *lto;
	struct scway *alt;
	float len;
	void *dat;
};

struct scwaypoint {
	const struct scnode *nod;
	const struct scway *way;
	struct scwaypoint *nxt;
	float len;
};

struct scnode *scnodalloc(void *);
struct scway *scaddway(struct scnode *, const struct scnode *, float, void *data);
int scisconnected(struct scnode *, struct scnode *);
struct scwaypoint *scout(const struct scnode *, const struct scnode *, struct scwaypoint *);
void scdestroypath(struct scwaypoint *);


#ifdef __LIBSCOUT_INTERNAL__

struct scway *__scnodgetway(const struct scnode *);
struct scwaypoint *__scallocwayp(const struct scnode *, const struct scway *);
int __scstackfind(const struct scwaypoint *, const struct scway *);
struct scwaypoint *__scstackgetend(struct scwaypoint *);

#endif // __LIBSCOUT_INTERNAL__

#ifdef __LIBSCOUT_TYPEDEF__

typedef struct scnode scnode;
typedef struct scway scway;
typedef struct scwaypoint scwaypoint;

#endif

#endif // __LIBSCOUT__