Source:NetHack 3.6.0/include/lev.h

From NetHackWiki
(Redirected from Source:NetHack 3.6.0/lev.h)
Jump to: navigation, 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.

  1.  /* NetHack 3.6	lev.h	$NHDT-Date: 1432512781 2015/05/25 00:13:01 $  $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
  2.  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3.  /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5.  /*	Common include file for save and restore routines */
  6.  
  7.  #ifndef LEV_H
  8.  #define LEV_H
  9.  
  10.  #define COUNT_SAVE 0x1
  11.  #define WRITE_SAVE 0x2
  12.  #define FREE_SAVE 0x4
  13.  
  14.  #define MAX_BMASK 4
  15.  
  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)
  19.  
  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;
  26.  };
  27.  
  28.  #define CONS_OBJ 0
  29.  #define CONS_MON 1
  30.  #define CONS_HERO 2
  31.  #define CONS_TRAP 3
  32.  
  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;
  39.  };
  40.  
  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;
  50.  
  51.  #endif /* LEV_H */