Fandom

Wikihack

Source:NetHack 3.0.0/mkroom.h

2,034pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

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

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

The NetHack General Public License applies to screenshots, source code and other content from NetHack.
1.    /*	SCCS Id: @(#)mkroom.h	3.0	89/01/07
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef MKROOM_H
6.    #define MKROOM_H
7.    
8.    /* mkroom.h - types and structures for room and shop initialization */
9.    
10.   struct mkroom {
11.   	schar lx,hx,ly,hy;	/* usually xchar, but hx may be -1 */
12.   	schar rtype,rlit,doorct,fdoor;
13.   };
14.   
15.   struct shclass {
16.   	char	*name;	/* name of the shop type */
17.   	char	symb;	/* this identifies the shop type */
18.   	int	prob;	/* the shop type probability in % */
19.   	schar	dist;	/* artifact placement type */
20.   #define D_SCATTER	0	/* normal placement */
21.   #define D_SHOP		1	/* shop-like placement */
22.   #define D_TEMPLE	2	/* temple-like placement */
23.   	struct itp {
24.   	    int	iprob;	/* probability of an item type */
25.   	    int itype;	/* item type: if >=0 a class, if < 0 a specific item */
26.   	} iprobs[5];
27.   	char **shknms;	/* string list of shopkeeper names for this type */
28.   };
29.   extern const struct shclass shtypes[];	/* defined in shknam.c */
30.   
31.   extern struct mkroom rooms[MAXNROFROOMS+1];
32.   /* the normal rooms on the current level are described in rooms[0..n] for
33.    * some n<MAXNROFROOMS
34.    * the vault, if any, is described by rooms[n+1]
35.    * the next rooms entry has hx -1 as a flag
36.    * there is at most one non-vault special room on a level
37.    */
38.   extern coord doors[DOORMAX];
39.   
40.   /* values for rtype in the room definition structure */
41.   #define OROOM		 0	/* ordinary room */
42.   #define COURT		 2	/* contains a throne */
43.   #define	SWAMP		 3	/* contains pools */
44.   #define	VAULT		 4	/* contains piles of gold */
45.   #define	BEEHIVE		 5	/* contains killer bees and royal jelly */
46.   #define	MORGUE		 6	/* contains corpses, undead and ghosts */
47.   #define BARRACKS	 7	/* contains soldiers and their gear */
48.   #define	ZOO		 8	/* floor covered with treasure and monsters */
49.   #define DELPHI		 9	/* contains Oracle and peripherals */
50.   #define	TEMPLE		10	/* contains a shrine */
51.   #define	SHOPBASE	11	/* everything above this is a shop */
52.   #define ARMORSHOP	12	/* specific shop defines for level compiler */
53.   #define	SCROLLSHOP	13
54.   #define	POTIONSHOP	14
55.   #define	WEAPONSHOP	15
56.   #define	FOODSHOP	16
57.   #define	RINGSHOP	17
58.   #define	WANDSHOP	18
59.   #define	TOOLSHOP	19
60.   #ifdef SPELLS
61.   #define	BOOKSHOP	20
62.   #endif
63.   
64.   #define IS_SHOP(x)	((x).rtype >= SHOPBASE)
65.   
66.   #endif /* MKROOM_H /**/

Also on Fandom

Random Wiki