Source:NetHack 3.2.0/sp lev.h

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

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

1.   /*	SCCS Id: @(#)sp_lev.h	3.2	95/06/12	*/ 2.   /* Copyright (c) 1989 by Jean-Christophe Collet			  */ 3.   /* NetHack may be freely redistributed. See license for details. */ 4.     5.    #ifndef SP_LEV_H 6.   #define SP_LEV_H 7.    8.        /* wall directions */ 9.   #define W_NORTH     1 10.  #define W_SOUTH     2 11.  #define W_EAST	    4 12.  #define W_WEST	    8 13.  #define W_ANY	    (W_NORTH|W_SOUTH|W_EAST|W_WEST) 14.   15.       /* MAP limits */ 16.  #define MAP_X_LIM  76 17.  #define MAP_Y_LIM  21 18.   19.       /* Per level flags */ 20.  #define NOTELEPORT   1 21.  #define HARDFLOOR    2 22.  #define NOMMAP	     4 23.  #define SHORTSIGHTED 8 24.   25.       /* special level types */ 26.  #define SP_LEV_ROOMS	1 27.  #define SP_LEV_MAZE	2 28.   29.   /*  30.    * Structures manipulated by the special levels loader & compiler 31.   */  32.    33.   typedef union str_or_len { 34.  	char *str; 35.  	int   len; 36.  } Str_or_Len; 37.   38.   typedef struct { 39.  	boolean	init_present; 40.  	char	fg, bg; 41.  	boolean	smoothed, joined; 42.  	xchar   lit, walled; 43.  } lev_init; 44.   45.   typedef struct { 46.  	xchar x, y, mask; 47.  } door; 48.   49.   typedef struct { 50.  	xchar wall, pos, secret, mask; 51.  } room_door; 52.   53.   typedef struct { 54.  	xchar x, y, chance, type; 55.  } trap; 56.   57.   typedef struct { 58.  	xchar x, y, class, appear; 59.  	schar peaceful, asleep; 60.  	aligntyp	align; 61.  	short id; 62.  	Str_or_Len name, appear_as; 63.  } monster; 64.   65.   typedef struct { 66.  	xchar x, y, class; 67.  	xchar curse_state; 68.  	short id; 69.  	short spe; 70.  	int   corpsenm; 71.  	xchar containment; 72.  	Str_or_Len name; 73.  } object; 74.   75.   #ifndef ALIGN_H 76.  #include "align.h"  77. #endif 78.   79.   typedef struct { 80.  	xchar		x, y;  81. aligntyp	align; 82.  	xchar		shrine; 83.  } altar; 84.   85.   typedef struct { 86.  	xchar x, y, dir, db_open; 87.  } drawbridge; 88.   89.   typedef struct { 90.  	xchar x, y, dir; 91.  } walk; 92.   93.   typedef struct { 94.  	xchar x1, y1, x2, y2; 95.  } digpos; 96.   97.   typedef struct { 98.  	xchar x, y, up; 99.  } lad; 100.  101.  typedef struct { 102. 	xchar x, y, up; 103. } stair; 104.  105.  typedef struct { 106. 	xchar x1, y1, x2, y2; 107. 	xchar rtype, rlit, rirreg; 108. } region; 109.  110.  /* values for rtype are defined in dungeon.h */ 111. typedef struct { 112. 	struct { xchar x1, y1, x2, y2; } inarea; 113. 	struct { xchar x1, y1, x2, y2; } delarea; 114. 	boolean in_islev, del_islev; 115. 	xchar rtype; 116. 	Str_or_Len rname; 117. } lev_region; 118.  119.  typedef struct { 120. 	xchar x, y;  121. int  amount; 122. } gold; 123.  124.  typedef struct { 125. 	xchar x, y;  126. Str_or_Len engr; 127. 	xchar etype; 128. } engraving; 129.  130.  typedef struct { 131. 	xchar x,y; 132. } fountain; 133.  134.  typedef struct { 135. 	xchar x,y; 136. } sink; 137.  138.  typedef struct { 139. 	xchar x,y; 140. } pool; 141.  142.  typedef struct { 143. 	char halign, valign; 144. 	char xsize, ysize; 145. 	char **map; 146. 	char nrobjects; 147. 	char *robjects; 148. 	char nloc; 149. 	char *rloc_x; 150. 	char *rloc_y; 151. 	char nrmonst; 152. 	char *rmonst; 153. 	char nreg; 154. 	region **regions; 155. 	char nlreg; 156. 	lev_region **lregions; 157. 	char ndoor; 158. 	door **doors; 159. 	char ntrap; 160. 	trap **traps; 161. 	char nmonster; 162. 	monster **monsters; 163. 	char nobject; 164. 	object **objects; 165. 	char ndrawbridge; 166. 	drawbridge **drawbridges; 167. 	char nwalk; 168. 	walk **walks; 169. 	char ndig; 170. 	digpos **digs; 171. 	char npass; 172. 	digpos **passs; 173. 	char nlad; 174. 	lad **lads; 175. 	char nstair; 176. 	stair **stairs; 177. 	char naltar; 178. 	altar **altars; 179. 	char ngold; 180. 	gold **golds; 181. 	char nengraving; 182. 	engraving **engravings; 183. 	char nfountain; 184. 	fountain **fountains; 185. } mazepart; 186.  187.  typedef struct { 188. 	long flags; 189. 	lev_init init_lev; 190. 	short filling; 191. 	char numpart; 192. 	mazepart **parts; 193. } specialmaze; 194.  195.  typedef struct _room { 196. 	char  *name; 197. 	char  *parent; 198. 	xchar x, y, w, h;  199. xchar xalign, yalign; 200. 	xchar rtype, chance, rlit, filled; 201. 	char ndoor; 202. 	room_door **doors; 203. 	char ntrap; 204. 	trap **traps; 205. 	char nmonster; 206. 	monster **monsters; 207. 	char nobject; 208. 	object **objects; 209. 	char naltar; 210. 	altar **altars; 211. 	char nstair; 212. 	stair **stairs; 213. 	char ngold; 214. 	gold **golds; 215. 	char nengraving; 216. 	engraving **engravings; 217. 	char nfountain; 218. 	fountain **fountains; 219. 	char nsink; 220. 	sink **sinks; 221. 	char npool; 222. 	pool **pools; 223. 	/* These three fields are only used when loading the level... */ 224.  	int nsubroom; 225. 	struct _room *subrooms[MAX_SUBROOMS]; 226. 	struct mkroom *mkr; 227. } room; 228.  229.  typedef struct { 230. 	struct { 231. 		xchar room; 232. 		xchar wall; 233. 		xchar door; 234. 	} src, dest; 235. } corridor; 236.  237.  typedef struct { 238. 	long flags; 239. 	lev_init init_lev; 240. 	char nrobjects; 241. 	char *robjects; 242. 	char nrmonst; 243. 	char *rmonst; 244. 	xchar nroom; 245. 	room **rooms; 246. 	xchar ncorr; 247. 	corridor **corrs; 248. } splev; 249.  250.  #endif /* SP_LEV_H */