Source:NetHack 3.4.3/include/dgn file.h

From NetHackWiki
Jump to: navigation, search

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

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