Angband
z-type.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_ZTYPE_H
20 #define INCLUDED_ZTYPE_H
21 
22 #include "h-basic.h"
23 
24 struct loc {
25  int x;
26  int y;
27 };
28 
29 struct loc loc(int x, int y);
30 
31 
35 typedef struct grouper grouper;
36 struct grouper {
37  int tval;
38  const char *name;
39 };
40 
44 struct point_set {
45  int n;
46  int allocated;
47  struct loc *pts;
48 };
49 
50 struct point_set *point_set_new(int initial_size);
51 void point_set_dispose(struct point_set *ps);
52 void add_to_point_set(struct point_set *ps, int y, int x);
53 int point_set_size(struct point_set *ps);
54 int point_set_contains(struct point_set *ps, int y, int x);
55 
56 #endif /* !INCLUDED_ZTYPE_H */
int n
Definition: z-type.h:45
Definition: z-type.h:24
void point_set_dispose(struct point_set *ps)
Definition: z-type.c:41
typedef int
Definition: libpng12/png.h:1135
struct point_set * point_set_new(int initial_size)
Utility functions to work with point_sets.
Definition: z-type.c:32
A set of points that can be constructed to apply a set of changes to.
Definition: z-type.h:44
int x
Definition: z-type.h:25
The lowest level header.
const char * name
Definition: z-type.h:38
struct loc * pts
Definition: z-type.h:47
int y
Definition: z-type.h:26
int point_set_contains(struct point_set *ps, int y, int x)
Definition: z-type.c:67
Definition: z-type.h:36
int allocated
Definition: z-type.h:46
int point_set_size(struct point_set *ps)
Definition: z-type.c:62
void add_to_point_set(struct point_set *ps, int y, int x)
Add the point to the given point set, making more space if there is no more space left...
Definition: z-type.c:51
int tval
Definition: z-type.h:37