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