1 /*	SCCS Id: @(#)config.h	3.4	2003/12/06	*/
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed.  See license for details. */
4 
5 #ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */
6 #define CONFIG_H
7 
8 
9 /*
10  * Section 1:	Operating and window systems selection.
11  *		Select the version of the OS you are using.
12  *		For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
13  *		A "VMS" option is not needed since the VMS C-compilers
14  *		provide it (no need to change sec#1, vmsconf.h handles it).
15  */
16 
17 #define UNIX		/* delete if no fork(), exec() available */
18 
19 /* #define MSDOS */	/* in case it's not auto-detected */
20 
21 /* #define OS2 */	/* define for OS/2 */
22 
23 /* #define TOS */	/* define for Atari ST/TT */
24 
25 /* #define STUPID */	/* avoid some complicated expressions if
26 			   your C compiler chokes on them */
27 /* #define MINIMAL_TERM */
28 			/* if a terminal handles highlighting or tabs poorly,
29 			   try this define, used in pager.c and termcap.c */
30 /* #define ULTRIX_CC20 */
31 			/* define only if using cc v2.0 on a DECstation */
32 /* #define ULTRIX_PROTO */
33 			/* define for Ultrix 4.0 (or higher) on a DECstation;
34 			 * if you get compiler errors, don't define this. */
35 			/* Hint: if you're not developing code, don't define
36 			   ULTRIX_PROTO. */
37 
38 #include "config1.h"	/* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */
39 
40 #ifdef AUTOCONF
41 # include "autoconf.h"
42 #endif
43 
44 
45 /* Windowing systems...
46  * Define all of those you want supported in your binary.
47  * Some combinations make no sense.  See the installation document.
48  */
49 #define TTY_GRAPHICS 	/* good old tty based graphics */
50 /* #define CURSES_GRAPHICS */	/* Proper curses interface */
51 /* #define X11_GRAPHICS */	/* X11 interface */
52 /* #define QT_GRAPHICS */	/* Qt interface */
53 /* #define GNOME_GRAPHICS */	/* Gnome interface */
54 /* #define MSWIN_GRAPHICS */	/* Windows NT, CE, Graphics */
55 
56 #define VULTURE_GRAPHICS /* Vulture's Eye isometric graphics interface */
57 #undef TTY_GRAPHICS
58 
59 /*
60  * Define the default window system.  This should be one that is compiled
61  * into your system (see defines above).  Known window systems are:
62  *
63  *	tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
64  *	vulture (Vulture's Eye)
65  */
66 
67 /* MAC also means MAC windows */
68 #ifdef MAC
69 # ifndef	AUX
70 #  define DEFAULT_WINDOW_SYS "mac"
71 # endif
72 #endif
73 
74 /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */
75 #ifdef AMIGA
76 # define AMII_GRAPHICS			/* (optional) */
77 # define DEFAULT_WINDOW_SYS "amii"	/* "amii", "amitile" or "tty" */
78 #endif
79 
80 /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */
81 #ifdef TOS
82 # define GEM_GRAPHICS			/* Atari GEM interface (optional) */
83 # define DEFAULT_WINDOW_SYS "Gem"	/* "Gem" or "tty" */
84 #endif
85 
86 #ifdef __BEOS__
87 #define BEOS_GRAPHICS /* (optional) */
88 #define DEFAULT_WINDOW_SYS "BeOS"  /* "tty" */
89 #ifndef HACKDIR	/* override the default hackdir below */
90 # define HACKDIR "/boot/apps/UnNetHack"
91 #endif
92 #endif
93 
94 #ifdef QT_GRAPHICS
95 # define DEFAULT_WC_TILED_MAP   /* Default to tiles if users doesn't say wc_ascii_map */
96 # define USER_SOUNDS		/* Use sounds */
97 # ifndef __APPLE__
98 #  define USER_SOUNDS_REGEX
99 # endif
100 # define USE_XPM		/* Use XPM format for images (required) */
101 # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.ppm) */
102 # ifndef DEFAULT_WINDOW_SYS
103 #  define DEFAULT_WINDOW_SYS "Qt"
104 # endif
105 #endif
106 
107 #ifdef VULTURE_GRAPHICS
108 # ifndef DEFAULT_WINDOW_SYS
109 #  define DEFAULT_WINDOW_SYS "vulture"
110 # endif
111 #endif /* VULTURE_GRAPHICS */
112 
113 #ifdef GNOME_GRAPHICS
114 # define USE_XPM		/* Use XPM format for images (required) */
115 # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.ppm) */
116 # ifndef DEFAULT_WINDOW_SYS
117 #  define DEFAULT_WINDOW_SYS "Gnome"
118 # endif
119 #endif
120 
121 #ifdef MSWIN_GRAPHICS
122 # ifdef TTY_GRAPHICS
123 # undef TTY_GRAPHICS
124 # endif
125 # ifndef DEFAULT_WINDOW_SYS
126 #  define DEFAULT_WINDOW_SYS "mswin"
127 # endif
128 # define HACKDIR "\\unnethack"
129 #endif
130 
131 #ifdef CURSES_GRAPHICS
132 # ifndef DEFAULT_WINDOW_SYS
133 #  define DEFAULT_WINDOW_SYS "curses"
134 # endif
135 #endif
136 
137 #ifndef DEFAULT_WINDOW_SYS
138 # define DEFAULT_WINDOW_SYS "tty"
139 #endif
140 
141 #ifdef X11_GRAPHICS
142 /*
143  * There are two ways that X11 tiles may be defined.  (1) using a custom
144  * format loaded by NetHack code, or (2) using the XPM format loaded by
145  * the free XPM library.  The second option allows you to then use other
146  * programs to generate tiles files.  For example, the PBMPlus tools
147  * would allow:
148  *  xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
149  */
150 /* # define USE_XPM */		/* Disable if you do not have the XPM library */
151 # ifdef USE_XPM
152 #  define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.xpm) */
153 # endif
154 #endif
155 
156 
157 /*
158  * Section 2:	Some global parameters and filenames.
159  *		Commenting out WIZARD, LOGFILE, NEWS or PANICLOG removes that
160  *		feature from the game; otherwise set the appropriate wizard
161  *		name.  LOGFILE, NEWS and PANICLOG refer to files in the
162  *		playground.
163  */
164 
165 #ifndef WIZARD		/* allow for compile-time or Makefile changes */
166 # ifndef KR1ED
167 #  define WIZARD  "wizard" /* the person allowed to use the -D option */
168 # else
169 #  define WIZARD
170 #  define WIZARD_NAME "wizard"
171 # endif
172 #endif
173 
174 #define LOGFILE "logfile"	/* larger file for debugging purposes */
175 /* #define XLOGFILE "xlogfile" */ /* even larger logfile */
176 #define NEWS "news"		/* the file containing the latest hack news */
177 #define PANICLOG "paniclog"	/* log of panic and impossible events */
178 /* #define LIVELOGFILE "livelog" */ /* live game progress log file */
179 
180 /* #define LIVELOG_SHOUT */
181 
182 /*
183  *	If COMPRESS is defined, it should contain the full path name of your
184  *	'compress' program.  Defining INTERNAL_COMP causes NetHack to do
185  *	simpler byte-stream compression internally.  Both COMPRESS and
186  *	INTERNAL_COMP create smaller bones/level/save files, but require
187  *	additional code and time.  Currently, only UNIX fully implements
188  *	COMPRESS; other ports should be able to uncompress save files a
189  *	la unixmain.c if so inclined.
190  *	If you define COMPRESS, you must also define COMPRESS_EXTENSION
191  *	as the extension your compressor appends to filenames after
192  *	compression.
193  */
194 
195 #ifndef AUTOCONF
196 #ifdef UNIX
197 /* path and file name extension for compression program */
198 /* #define COMPRESS "/usr/bin/compress" */	/* Lempel-Ziv compression */
199 /* #define COMPRESS_EXTENSION ".Z"	*/	/* compress's extension */
200 /* An example of one alternative you might want to use: */
201 #define COMPRESS "/bin/gzip"	/* FSF gzip compression */
202 #define COMPRESS_EXTENSION ".gz"		/* normal gzip extension */
203 #endif
204 
205 #ifndef COMPRESS
206 # define INTERNAL_COMP	/* control use of NetHack's compression routines */
207 #endif
208 #endif
209 
210 /*
211  *	Data librarian.  Defining DLB places most of the support files into
212  *	a tar-like file, thus making a neater installation.  See *conf.h
213  *	for detailed configuration.
214  */
215 #define DLB  /* not supported on all platforms */
216 
217 /*
218  *	Defining INSURANCE slows down level changes, but allows games that
219  *	died due to program or system crashes to be resumed from the point
220  *	of the last level change, after running a utility program.
221  */
222 #define INSURANCE	/* allow crashed game recovery */
223 
224 #ifndef MAC
225 # define CHDIR		/* delete if no chdir() available */
226 #endif
227 
228 #ifdef CHDIR
229 /*
230  * If you define HACKDIR, then this will be the default playground;
231  * otherwise it will be the current directory.
232  */
233 # ifndef HACKDIR
234 #  define HACKDIR "/usr/games/lib/unnethackdir"
235 # endif
236 
237 /*
238  * Some system administrators are stupid enough to make Hack suid root
239  * or suid daemon, where daemon has other powers besides that of reading or
240  * writing Hack files.	In such cases one should be careful with chdir's
241  * since the user might create files in a directory of his choice.
242  * Of course SECURE is meaningful only if HACKDIR is defined.
243  */
244 /* #define SECURE */	/* do setuid(getuid()) after chdir() */
245 
246 /*
247  * If it is desirable to limit the number of people that can play Hack
248  * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS.
249  * #define MAX_NR_OF_PLAYERS 6
250  */
251 #endif /* CHDIR */
252 
253 
254 
255 /*
256  * Section 3:	Definitions that may vary with system type.
257  *		For example, both schar and uchar should be short ints on
258  *		the AT&T 3B2/3B5/etc. family.
259  */
260 
261 /*
262  * Uncomment the following line if your compiler doesn't understand the
263  * 'void' type (and thus would give all sorts of compile errors without
264  * this definition).
265  */
266 /* #define NOVOID */			/* define if no "void" data type. */
267 
268 /*
269  * Uncomment the following line if your compiler falsely claims to be
270  * a standard C compiler (i.e., defines __STDC__ without cause).
271  * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc.
272  */
273 /* #define NOTSTDC */			/* define for lying compilers */
274 
275 #include "tradstdc.h"
276 
277 /*
278  * type schar: small signed integers (8 bits suffice) (eg. TOS)
279  *
280  *	typedef char	schar;
281  *
282  *	will do when you have signed characters; otherwise use
283  *
284  *	typedef short int schar;
285  */
286 #ifdef AZTEC
287 # define schar	char
288 #else
289 typedef signed char	schar;
290 #endif
291 
292 /*
293  * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
294  *
295  *	typedef unsigned char	uchar;
296  *
297  *	will be satisfactory if you have an "unsigned char" type;
298  *	otherwise use
299  *
300  *	typedef unsigned short int uchar;
301  */
302 #ifndef _AIX32		/* identical typedef in system file causes trouble */
303 typedef unsigned char	uchar;
304 #endif
305 
306 /*
307  * Various structures have the option of using bitfields to save space.
308  * If your C compiler handles bitfields well (e.g., it can initialize structs
309  * containing bitfields), you can define BITFIELDS.  Otherwise, the game will
310  * allocate a separate character for each bitfield.  (The bitfields used never
311  * have more than 7 bits, and most are only 1 bit.)
312  */
313 #define BITFIELDS	/* Good bitfield handling */
314 
315 /* #define STRNCMPI */	/* compiler/library has the strncmpi function */
316 
317 /*
318  * There are various choices for the NetHack vision system.  There is a
319  * choice of two algorithms with the same behavior.  Defining VISION_TABLES
320  * creates huge (60K) tables at compile time, drastically increasing data
321  * size, but runs slightly faster than the alternate algorithm.  (MSDOS in
322  * particular cannot tolerate the increase in data size; other systems can
323  * flip a coin weighted to local conditions.)
324  *
325  * If VISION_TABLES is not defined, things will be faster if you can use
326  * MACRO_CPATH.  Some cpps, however, cannot deal with the size of the
327  * functions that have been macroized.
328  */
329 
330 /* #define VISION_TABLES */ /* use vision tables generated at compile time */
331 #ifndef VISION_TABLES
332 # ifndef NO_MACRO_CPATH
333 #  define MACRO_CPATH	/* use clear_path macros instead of functions */
334 # endif
335 #endif
336 
337 #define EXOTIC_PETS      /* Rob Ellwood  June 2002 */
338 
339 /*
340  * Section 4:  THE FUN STUFF!!!
341  *
342  * Conditional compilation of special options are controlled here.
343  * If you define the following flags, you will add not only to the
344  * complexity of the game but also to the size of the load module.
345  */
346 
347 #ifndef AUTOCONF
348 /* dungeon features */
349 #define SINKS		/* Kitchen sinks - Janet Walz */
350 /* dungeon levels */
351 #define WALLIFIED_MAZE	/* Fancy mazes - Jean-Christophe Collet */
352 #define REINCARNATION	/* Special Rogue-like levels */
353 /* monsters & objects */
354 #define KOPS		/* Keystone Kops by Scott R. Turner */
355 #define SEDUCE		/* Succubi/incubi seduction, by KAA, suggested by IM */
356 #define STEED		/* Riding steeds */
357 #define TOURIST		/* Tourist players with cameras and Hawaiian shirts */
358 /* difficulty */
359 #define ELBERETH	/* Engraving the E-word repels monsters */
360 /* I/O */
361 #define REDO		/* support for redoing last command - DGK */
362 #if !defined(MAC)
363 # define CLIPPING	/* allow smaller screens -- ERS */
364 #endif
365 
366 #define EXP_ON_BOTL	/* Show experience on bottom line */
367 /* #define SCORE_ON_BOTL */	/* added by Gary Erickson (erickson@ucivax) */
368 #endif /* AUTOCONF */
369 
370 #ifdef REDO
371 # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
372 #endif
373 
374 /* #define REALTIME_ON_BOTL */  /* Show elapsed time on bottom line.  Note:
375                                  * this breaks savefile compatibility. */
376 
377 /* The options in this section require the extended logfile support */
378 #ifdef XLOGFILE
379 #define RECORD_CONDUCT  /* Record conducts kept in logfile */
380 #define RECORD_TURNS    /* Record turns elapsed in logfile */
381 #define RECORD_ACHIEVE  /* Record certain notable achievements in the
382                          * logfile.  Note: this breaks savefile compatibility
383                          * due to the addition of the u_achieve struct. */
384 #define RECORD_REALTIME /* Record the amount of actual playing time (in
385                          * seconds) in the record file.  Note: this breaks
386                          * savefile compatibility. */
387 #define RECORD_START_END_TIME /* Record to-the-second starting and ending
388                                * times; stored as 32-bit values obtained
389                                * from time(2) (seconds since the Epoch.) */
390 #define RECORD_GENDER0   /* Record initial gender in logfile */
391 #define RECORD_ALIGN0   /* Record initial alignment in logfile */
392 #endif
393 
394 /*
395  * Section 5:  EXPERIMENTAL STUFF
396  *
397  * Conditional compilation of new or experimental options are controlled here.
398  * Enable any of these at your own risk -- there are almost certainly
399  * bugs left here.
400  */
401 
402 #ifndef AUTOCONF
403 
404 #define RANDOMIZED_PLANES /* Elemental Planes order is randomized - Patric Mueller (4 Jan 2009) */
405 #define BLACKMARKET	/* Massimo Campostrini (campo@sunthpi3.difi.unipi.it) */
406 
407 
408 #if defined(TTY_GRAPHICS) || defined(MSWIN_GRAPHICS) || \
409  defined(CURSES_GRAPHICS)
410 # define MENU_COLOR
411 # define MENU_COLOR_REGEX
412 /*# define MENU_COLOR_REGEX_POSIX */
413 /* if MENU_COLOR_REGEX is defined, use regular expressions (regex.h,
414  * GNU specific functions by default, POSIX functions with
415  * MENU_COLOR_REGEX_POSIX).
416  * otherwise use pmatch() to match menu color lines.
417  * pmatch() provides basic globbing: '*' and '?' wildcards.
418  */
419 #endif
420 
421 #define STATUS_COLORS /* Shachaf & Oren Ben-Kiki */
422 
423 #define DUNGEON_GROWTH /* Makes the dungeons feel a bit more living - Pasi Kallinen*/
424 /*#define GOLDOBJ */	/* Gold is kept on obj chains - Helge Hafting */
425 #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */
426 #define DUMP_LOG        /* Dump game end information to a file */
427 /* #define DUMP_FN "/tmp/%n.nh" */      /* Fixed dumpfile name, if you want
428                                          * to prevent definition by users */
429 #define DUMP_HTML_LOG   /* Dump game end information to a html file */
430 #define DUMPMSGS 20     /* Number of latest messages in the dump file  */
431 
432 #define AUTO_OPEN	/* open doors by walking into them - Stefano Busti */
433 
434 /* #define WHEREIS_FILE "./whereis/%n.whereis" */ /* Write out player's current location to player.whereis */
435 
436 #endif /* AUTOCONF */
437 
438 #ifdef TTY_GRAPHICS
439 # define WIN_EDGE	/* windows aligned left&top */
440 # define VIDEOSHADES    /* Slash'Em like colors */
441 #endif
442 
443 /* End of Section 5 */
444 
445 /*
446  * Section 6:  UNCODITIONAL DEFINES
447  *
448  * These defines must be defined.
449  * They come from patches that have been unconditionally incorporated
450  * into UnNetHack.
451  */
452 #define WEBB_DISINT /* Disintegrator - Nicholas Webb */
453 #define ASTRAL_ESCAPE /* Allow escape from Astral plane (with the Amulet) - CWC */
454 /* #define LIVELOG_BONES_KILLER */ /* Report if a ghost of a former player is
455                                     * killed - Patric Mueller (15 Aug 2009) */
456 #define ADJSPLIT /* splittable #adjust - Sam Dennis, conditionalized by Jukka Lahtinen */
457 #define TUTORIAL_MODE /* Alex Smith */
458 #define ELBERETH_CONDUCT /* Track the number of times the player engraves Elbereth. - Ray Kulhanek */
459 
460 /* End of Section 6 */
461 
462 #include "global.h"	/* Define everything else according to choices above */
463 
464 #endif /* CONFIG_H */
465