Wikia

Wikihack

Source:NetHack 3.0.0/global.h

2,032pages on
this wiki
Talk0

Below is the full text to global.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/global.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: @(#)global.h	3.0	89/07/12
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef GLOBAL_H
6.    #define	GLOBAL_H
7.    
8.    #include <stdio.h>
9.    
10.   
11.   /* #define BETA		/* if a beta-test copy  [MRS] */
12.   #define VERSION	"3.0e"	/* version number. */
13.   
14.   /*
15.    * Files expected to exist in the playground directory.
16.    */
17.   
18.   #define RECORD	"record"  /* the file containing the list of topscorers */
19.   #define	HELP	"help"	  /* the file containing command descriptions */
20.   #define	SHELP	"hh"	  /* abbreviated form of the same */
21.   #define	RUMORFILE	"rumors"	/* a file with fortune cookies */
22.   #define ORACLEFILE	"oracles"	/* a file with oracular information */
23.   #define	DATAFILE	"data"	/* a file giving the meaning of symbols used */
24.   #define CMDHELPFILE	"cmdhelp"	/* file telling what commands do */
25.   #define HISTORY		"history"	/* a file giving nethack's history */
26.   #define LICENSE		"license"	/* file with license information */
27.   #define OPTIONFILE	"opthelp"	/* a file explaining runtime options */
28.   
29.   
30.   
31.   /* Assorted definitions that may depend on selections in config.h. */
32.   
33.   /*
34.    * for DUMB preprocessor and compiler, e.g., cpp and pcc supplied
35.    * with Microport SysV/AT, which have small symbol tables;
36.    * DUMB if needed is defined in CFLAGS
37.    */
38.   #ifdef DUMB
39.   #ifdef BITFIELDS
40.   #undef BITFIELDS
41.   #endif
42.   #ifndef STUPID
43.   #define STUPID
44.   #endif
45.   #ifndef STUPID_CPP
46.   #define STUPID_CPP
47.   #endif
48.   #endif	/* DUMB */
49.   
50.   /*
51.    * type xchar: small integers in the range 0 - 127, usually coordinates
52.    * although they are nonnegative they must not be declared unsigned
53.    * since otherwise comparisons with signed quantities are done incorrectly
54.    */
55.   typedef schar	xchar;
56.   typedef	xchar	boolean;		/* 0 or 1 */
57.   
58.   #define	TRUE	((boolean)1)
59.   #define	FALSE	((boolean)0)
60.   
61.   #ifdef BITFIELDS
62.   #define	Bitfield(x,n)	unsigned x:n
63.   #else
64.   #define	Bitfield(x,n)	uchar x
65.   #endif
66.   
67.   
68.   #define	SIZE(x)	(int)(sizeof(x) / sizeof(x[0]))
69.   
70.   /* (No, LARGEST_INT doesn't have to correspond to the largest integer on
71.    * a particular machine.)
72.    */
73.   #define LARGEST_INT	((1 << 15) - 1)
74.   
75.   
76.   #ifdef STRONGHOLD
77.   # ifdef ALTARS
78.   #  ifdef THEOLOGY
79.   #define ENDGAME
80.   #  endif
81.   # endif
82.   #endif
83.   
84.   #ifdef REDO
85.   #define Getchar pgetchar
86.   #endif
87.   
88.   /*
89.    * Automatic inclusions for the subsidiary files.
90.    * Please don't change the order.  It does matter.
91.    */
92.   
93.   #ifndef COORD_H
94.   #include "coord.h"
95.   #endif
96.   #if defined(UNIX) && !defined(UNIXCONF_H)
97.   # include "unixconf.h"
98.   #endif
99.   
100.  #if defined(MSDOS) && !defined(PCCONF_H)
101.  # include "pcconf.h"
102.  #endif
103.  
104.  #if defined(TOS) && !defined(TOSCONF_H)
105.  # include "tosconf.h"
106.  #endif
107.  
108.  #if defined(AMIGA) && !defined(AMICONF_H)
109.  # include "amiconf.h"
110.  #endif
111.  
112.  
113.  
114.  /*
115.   * Configurable internal parameters.
116.   *
117.   * Please be very careful if you are going to change one of these.  Any
118.   * changes in these parameters, unless properly done, can render the
119.   * executable inoperative.
120.   */
121.  
122.  /* size of terminal screen is (at least) (ROWNO+3) by COLNO */
123.  #define	COLNO	80
124.  #define	ROWNO	21
125.  
126.  #define	MAXNROFROOMS	20	/* max number of rooms per level */
127.  #define	DOORMAX		120	/* max number of doors per level */
128.  
129.  #define	BUFSZ		256	/* for getlin buffers */
130.  
131.  #define	PL_NSIZ		32	/* name of player, ghost, shopkeeper */
132.  #define	PL_CSIZ		20	/* sizeof pl_character */
133.  #define PL_FSIZ		32	/* fruit name */
134.  
135.  #define	MAXLEVEL	50	/* max number of levels in the dungeon */
136.  #ifdef ENDGAME
137.  #define ENDLEVEL (MAXLEVEL+1)	/* endgame level */
138.  #endif
139.  #define HELLLEVEL	30	/* first hell level (varies ifdef STRONGHOLD) */
140.  #define	MAXULEV		30	/* max character experience level */
141.  
142.  #define	MAXMONNO	120	/* geno monst after this number killed */
143.  #define MHPMAX		500	/* maximum monster hp */
144.  
145.  #endif /* GLOBAL_H /**/

Around Wikia's network

Random Wiki