76006f358a79bab8bb9decd2df517a2ce7fa8150
[vrlugburz] / src / level.h
1 #ifndef LEVEL_H_
2 #define LEVEL_H_
3
4 enum {
5         CELL_SOLID,
6         CELL_WALK,
7         CELL_BLOCKED
8 };
9
10 struct cell {
11         int type;
12         int wall[4];
13         int floor, ceil;
14 };
15
16 struct level {
17         int width, height;
18         struct cell *cells;
19 };
20
21
22 int init_level(struct level *lvl, int xsz, int ysz);
23 void destroy_level(struct level *lvl);
24
25 int load_level(struct level *lvl, const char *fname);
26 int save_level(struct level *lvl, const char *fname);
27
28 #endif  /* LEVEL_H_ */