NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / include / lev.h
blobe768256ec8bc81f7bf91bc9058acefd75a128840
1 /* aNetHack 0.0.1 lev.h $ANH-Date: 1432512781 2015/05/25 00:13:01 $ $ANH-Branch: master $:$ANH-Revision: 1.12 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* aNetHack may be freely redistributed. See license for details. */
5 /* Common include file for save and restore routines */
7 #ifndef LEV_H
8 #define LEV_H
10 #define COUNT_SAVE 0x1
11 #define WRITE_SAVE 0x2
12 #define FREE_SAVE 0x4
14 #define MAX_BMASK 4
16 /* operations of the various saveXXXchn & co. routines */
17 #define perform_bwrite(mode) ((mode) & (COUNT_SAVE | WRITE_SAVE))
18 #define release_data(mode) ((mode) &FREE_SAVE)
20 /* The following are used in mkmaze.c */
21 struct container {
22 struct container *next;
23 xchar x, y;
24 short what;
25 genericptr_t list;
28 #define CONS_OBJ 0
29 #define CONS_MON 1
30 #define CONS_HERO 2
31 #define CONS_TRAP 3
33 struct bubble {
34 xchar x, y; /* coordinates of the upper left corner */
35 schar dx, dy; /* the general direction of the bubble's movement */
36 uchar bm[MAX_BMASK + 2]; /* bubble bit mask */
37 struct bubble *prev, *next; /* need to traverse the list up and down */
38 struct container *cons;
41 /* used in light.c */
42 typedef struct ls_t {
43 struct ls_t *next;
44 xchar x, y; /* source's position */
45 short range; /* source's current range */
46 short flags;
47 short type; /* type of light source */
48 anything id; /* source's identifier */
49 } light_source;
51 #endif /* LEV_H */