lev.h

Go to the documentation of this file.
00001 /*      SCCS Id: @(#)lev.h      3.4     1994/03/18      */
00002 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
00003 /* NetHack may be freely redistributed.  See license for details. */
00004 
00005 /*      Common include file for save and restore routines */
00006 
00007 #ifndef LEV_H
00008 #define LEV_H
00009 
00010 #define COUNT_SAVE      0x1
00011 #define WRITE_SAVE      0x2
00012 #define FREE_SAVE       0x4
00013 
00014 /* operations of the various saveXXXchn & co. routines */
00015 #define perform_bwrite(mode)    ((mode) & (COUNT_SAVE|WRITE_SAVE))
00016 #define release_data(mode)      ((mode) & FREE_SAVE)
00017 
00018 /* The following are used in mkmaze.c */
00019 struct container {
00020         struct container *next;
00021         xchar x, y;
00022         short what;
00023         genericptr_t list;
00024 };
00025 
00026 #define CONS_OBJ   0
00027 #define CONS_MON   1
00028 #define CONS_HERO  2
00029 #define CONS_TRAP  3
00030 
00031 struct bubble {
00032         xchar x, y;     /* coordinates of the upper left corner */
00033         schar dx, dy;   /* the general direction of the bubble's movement */
00034         uchar *bm;      /* pointer to the bubble bit mask */
00035         struct bubble *prev, *next; /* need to traverse the list up and down */
00036         struct container *cons;
00037 };
00038 
00039 /* used in light.c */
00040 typedef struct ls_t {
00041     struct ls_t *next;
00042     xchar x, y;         /* source's position */
00043     short range;        /* source's current range */
00044     short flags;
00045     short type;         /* type of light source */
00046     genericptr_t id;    /* source's identifier */
00047 } light_source;
00048 
00049 #endif /* LEV_H */