Fandom

Wikihack

Source:NetHack 3.0.0/sp lev.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 sp_lev.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/sp_lev.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: @(#)sp_lev.h	3.0	88/18/12
2.    /* 	Copyright (c) 1989 by Jean-Christophe Collet */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #define W_NORTH     0
6.    #define W_SOUTH     2
7.    #define W_EAST	    1
8.    #define W_WEST	    3
9.    
10.   /* 
11.    * Structures manipulated by the special levels loader & compiler
12.    */
13.   
14.   typedef struct {
15.   	xchar x, y, mask;
16.   } door;
17.   
18.   typedef struct {
19.   	xchar x, y, type;
20.   } trap;
21.   
22.   typedef struct {
23.   	xchar x, y, class;
24.   	short id;
25.   } monster;
26.   
27.   typedef struct {
28.   	xchar x, y, class;
29.   	short id;
30.   } object;
31.   
32.   typedef struct {
33.   	xchar x, y, align, shrine;
34.   } altar;
35.   
36.   typedef struct {
37.   	xchar x, y, dir, open;
38.   } drawbridge;
39.   
40.   typedef struct {
41.   	xchar x, y, dir;
42.   } walk;
43.   
44.   typedef struct {
45.   	xchar x1, y1, x2, y2;
46.   } dig;
47.   
48.   typedef struct {
49.   	xchar x, y, up;
50.   } lad;
51.   
52.   typedef struct {
53.   	xchar x1, y1, x2, y2;
54.   	xchar rtype, rlit;
55.   } region;
56.   
57.   typedef struct {
58.   	char halign, valign;
59.   	char xsize, ysize;
60.   	char **map;
61.   	char nrobjects;
62.   	char *robjects;
63.   	char nloc;
64.   	char *rloc_x;
65.   	char *rloc_y;
66.   	char nrmonst;
67.   	char *rmonst;
68.   	char nreg;
69.   	region **regions;
70.   	char ndoor;
71.   	door **doors;
72.   	char ntraps;
73.   	trap **traps;
74.   	char nmonster;
75.   	monster **monsters;
76.   	char nobjects;
77.   	object **objects;
78.   	char ndrawbridge;
79.   	drawbridge **drawbridges;
80.   	char nwalk;
81.   	walk **walks;
82.   	char ndig;
83.   	dig **digs;
84.   	char nlad;
85.   	lad **lads;
86.   #ifdef ALTARS
87.   	char naltar;
88.   	altar **altars;
89.   #endif /* ALTARS /**/
90.   } mazepart;
91.       
92.   typedef struct {
93.   	char numpart;
94.   	mazepart **parts;
95.   } specialmaze;
96.   
97.   typedef struct {
98.   	xchar x, y, w, h;
99.   	xchar rtype, rlit;
100.  	char ndoor;
101.  	door **doors;
102.  	char ntraps;
103.  	trap **traps;
104.  	char nmonster;
105.  	monster **monsters;
106.  	char nobjects;
107.  	object **objects;
108.  #ifdef ALTARS
109.  	char naltar;
110.  	altar **altars;
111.  #endif /* ALTARS /**/
112.  } room;
113.  
114.  typedef struct {
115.  	xchar x1,y1, x2,y2;
116.  } corridor;
117.  
118.  typedef struct {
119.  	xchar nroom;
120.  	room **rooms;
121.  	xchar ncorr;
122.  	corridor **corrs;
123.  	char ntraps;
124.  	trap **traps;
125.  	char nmonster;
126.  	monster **monsters;
127.  	char nobjects;
128.  	object **objects;
129.  	xchar xdnstairs, ydnstairs;
130.  	xchar xupstairs, yupstairs;
131.  } splev;

Also on Fandom

Random Wiki