Source:NetHack 3.6.0/include/lev.h

From NetHackWiki
Revision as of 13:27, 15 December 2015 by DizzyBot (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Below is the full text to lev.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/lev.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

 /* NetHack 3.6	lev.h	$NHDT-Date: 1432512781 2015/05/25 00:13:01 $  $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
 /*	Common include file for save and restore routines */
 
 #ifndef LEV_H
 #define LEV_H
 
 #define COUNT_SAVE 0x1
 #define WRITE_SAVE 0x2
 #define FREE_SAVE 0x4
 
 #define MAX_BMASK 4
 
 /* operations of the various saveXXXchn & co. routines */
 #define perform_bwrite(mode) ((mode) & (COUNT_SAVE | WRITE_SAVE))
 #define release_data(mode) ((mode) &FREE_SAVE)
 
 /* The following are used in mkmaze.c */
 struct container {
     struct container *next;
     xchar x, y;
     short what;
     genericptr_t list;
 };
 
 #define CONS_OBJ 0
 #define CONS_MON 1
 #define CONS_HERO 2
 #define CONS_TRAP 3
 
 struct bubble {
     xchar x, y;   /* coordinates of the upper left corner */
     schar dx, dy; /* the general direction of the bubble's movement */
     uchar bm[MAX_BMASK + 2];    /* bubble bit mask */
     struct bubble *prev, *next; /* need to traverse the list up and down */
     struct container *cons;
 };
 
 /* used in light.c */
 typedef struct ls_t {
     struct ls_t *next;
     xchar x, y;  /* source's position */
     short range; /* source's current range */
     short flags;
     short type;  /* type of light source */
     anything id; /* source's identifier */
 } light_source;
 
 #endif /* LEV_H */