Source:NetHack 3.4.3/include/lev.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to include/lev.h from NetHack 3.4.3. To link to a particular line, write [[lev.h#line123]], for example.

  1. /*	SCCS Id: @(#)lev.h	3.4	1994/03/18	*/
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3. /* NetHack may be freely redistributed.  See license for details. */

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. /*	Common include file for save and restore routines */
  2.  
  3. #ifndef LEV_H
  4. #define LEV_H
  5.  
  6. #define COUNT_SAVE	0x1
  7. #define WRITE_SAVE	0x2
  8. #define FREE_SAVE	0x4
  9.  
  10. /* operations of the various saveXXXchn & co. routines */
  11. #define perform_bwrite(mode)	((mode) & (COUNT_SAVE|WRITE_SAVE))
  12. #define release_data(mode)	((mode) & FREE_SAVE)
  13.  
  14. /* The following are used in mkmaze.c */
  15. struct container {
  16. 	struct container *next;
  17. 	xchar x, y;
  18. 	short what;
  19. 	genericptr_t list;
  20. };
  21.  
  22. #define CONS_OBJ   0
  23. #define CONS_MON   1
  24. #define CONS_HERO  2
  25. #define CONS_TRAP  3
  26.  
  27. struct bubble {
  28. 	xchar x, y;	/* coordinates of the upper left corner */
  29. 	schar dx, dy;	/* the general direction of the bubble's movement */
  30. 	uchar *bm;	/* pointer to the bubble bit mask */
  31. 	struct bubble *prev, *next; /* need to traverse the list up and down */
  32. 	struct container *cons;
  33. };
  34.  
  35. /* used in light.c */
  36. typedef struct ls_t {
  37. struct ls_t *next;
  38. xchar x, y;		/* source's position */
  39. short range;	/* source's current range */
  40. short flags;
  41. short type;		/* type of light source */
  42. genericptr_t id;	/* source's identifier */
  43. } light_source;
  44.  
  45. #endif /* LEV_H */