Source:NetHack 2.3e/mkroom.h

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

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

1.   /*	SCCS Id: @(#)mkroom.h	2.3	87/12/12 2.   /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3.     4.    /* mkroom.h - types and structures for room and shop initialization */ 5.    6.    struct mkroom { 7.   	schar lx,hx,ly,hy;	/* usually xchar, but hx may be -1 */ 8.   	schar rtype,rlit,doorct,fdoor; 9.   };  10.    11.   struct shclass { 12.  	char	*name;	/* name of the shop type */ 13.  	char	symb;	/* this identifies the shop type */ 14.      	int	prob;	/* the shop type probability in % */ 15.  	schar	dist;	/* artifact placement type */ 16.  #define D_SCATTER	0	/* normal placement */ 17.  #define D_SHOP		1	/* shop-like placement */ 18.  #define D_TEMPLE	2	/* temple-like placement */ 19.  	struct itp { 20.  	    int	iprob;	/* probability of an item type */ 21.  	    int itype;	/* item type: if >=0 a class, if < 0 a specific item */ 22.  	} iprobs[5]; 23.  	char **shknms;	/* string list of shopkeeper names for this type */ 24.  };  25.   extern struct shclass shtypes[];	/* defined in shknam.c */ 26.   27.   #define	MAXNROFROOMS	15 28.  extern struct mkroom rooms[MAXNROFROOMS+1]; 29.   30.   #define	DOORMAX	100 31.  extern coord doors[DOORMAX]; 32.   33.   /* values for rtype in the room definition structure */ 34.  #define OROOM		 0	/* ordinary room */ 35.  #define COURT		 2	/* contains a throne */ 36.  #define	SWAMP		 3	/* contains pools */ 37.  #define	VAULT		 4	/* contains piles of gold */ 38.  #define	BEEHIVE		 5	/* contains killer bees and royal jelly */ 39.  #define	MORGUE		 6	/* contains corpses, undead and ghosts */ 40.  #define BARRACKS	 7	/* contains soldiers and their gear */ 41.  #define	ZOO		 8	/* floor covered with treasure and monsters */ 42.  #define	SHOPBASE	 9	/* everything above this is a shop */ 43.   44.   #define IS_SHOP(x)	((x).rtype >= SHOPBASE) 45.   46.   /* mkshop.c entry points (should become mkroom.c in next major release) */ 47.  extern void mkroom;		/* make and stock a room of a given type */ 48.  extern boolean nexttodoor;	/* TRUE if adjacent to a door */ 49.  extern boolean has_dnstairs;	/* TRUE if given room has a down staircase */ 50.  extern boolean has_upstairs;	/* TRUE if given room has an up staircase */ 51.  extern int dist2;		/* Euclidean square-of-distance function */ 52.  extern struct permonst *courtmon;	/* generate a court monster */