Source:NetHack 3.1.0/dgn file.h

Below is the full text to dgn_file.h from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/dgn_file.h#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)dgn_file.h	3.1	93/01/17	*/ 2.   /* Copyright (c) 1989 by M. Stephenson				  */ 3.   /* NetHack may be freely redistributed. See license for details. */ 4.     5.    #ifndef DGN_FILE_H 6.   #define DGN_FILE_H 7.    8.    #include "align.h"  9. 10.  /*  11.    * Structures manipulated by the dungeon loader & compiler 12.   */  13.    14.   struct	couple { 15.  	short	base, rand; 16.  };  17.    18.   struct tmpdungeon { 19.  	char	name[24], 20.  		protoname[24]; 21.  	struct	couple	lev; 22.  	int	flags, 23.  		chance, 24.  		levels, 25.  		branches, 26.  		entry_lev;		/* entry level for this dungeon */ 27.  	char	boneschar; 28.  };  29.    30.   struct tmplevel { 31.  	char	name[24]; 32.  	struct	couple	lev; 33.  	int	chance, rndlevs, chain, flags; 34.  	char	boneschar; 35.  };  36.    37.   struct tmpbranch { 38.  	char	name[24];	/* destination dungeon name */ 39.  	struct	couple	lev; 40.  	int	chain;		/* index into tmplevel array (chained branch)*/ 41.  	int	type;		/* branch type (see below) */ 42.  	int	up;		/* branch is up or down */ 43.  };  44.    45.   /*  46.    *	Values for type for tmpbranch structure. 47.   */  48.   #define TBR_STAIR   0	/* connection with both ends having a staircase */ 49.  #define TBR_NO_UP   1	/* connection with no up staircase */ 50.  #define TBR_NO_DOWN 2	/* connection with no down staircase */ 51.  #define TBR_PORTAL  3	/* portal connection */ 52.   53.   /*  54.    *	Flags that map into the dungeon flags bitfields. 55.   */  56.   #define TOWN		  1	/* levels only */ 57.  #define HELLISH		  2 58.  #define MAZELIKE	  4 59.  #define ROGUELIKE	  8 60.   61.   #define D_ALIGN_NONE	0 62.  #define D_ALIGN_CHAOTIC	(AM_CHAOTIC << 4) 63.  #define D_ALIGN_NEUTRAL	(AM_NEUTRAL << 4) 64.  #define D_ALIGN_LAWFUL	(AM_LAWFUL << 4) 65.   66.   #define D_ALIGN_MASK	0x70 67.   68.   /*  69.    *	Max number of prototype levels and branches. 70.   */  71.   #define LEV_LIMIT	50 72.  #define BRANCH_LIMIT	20 73.   74.   #endif /* DGN_FILE_H */