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 41 /* Windowing systems... 42 * Define all of those you want supported in your binary. 43 * Some combinations make no sense. See the installation document. 44 */ 45 #define TTY_GRAPHICS /* good old tty based graphics */ 46 /* #define X11_GRAPHICS */ /* X11 interface */ 47 /* #define QT_GRAPHICS */ /* Qt interface */ 48 /* #define GNOME_GRAPHICS */ /* Gnome interface */ 49 /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ 50 51 #define VULTURE_GRAPHICS /* Vulture's Eye isometric graphics interface */ 52 #undef TTY_GRAPHICS 53 54 /* 55 * Define the default window system. This should be one that is compiled 56 * into your system (see defines above). Known window systems are: 57 * 58 * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome 59 * vulture (Vulture's Eye) 60 */ 61 62 /* MAC also means MAC windows */ 63 #ifdef MAC 64 # ifndef AUX 65 # define DEFAULT_WINDOW_SYS "mac" 66 # endif 67 #endif 68 69 /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */ 70 #ifdef AMIGA 71 # define AMII_GRAPHICS /* (optional) */ 72 # define DEFAULT_WINDOW_SYS "amii" /* "amii", "amitile" or "tty" */ 73 #endif 74 75 /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */ 76 #ifdef TOS 77 # define GEM_GRAPHICS /* Atari GEM interface (optional) */ 78 # define DEFAULT_WINDOW_SYS "Gem" /* "Gem" or "tty" */ 79 #endif 80 81 #ifdef __BEOS__ 82 #define BEOS_GRAPHICS /* (optional) */ 83 #define DEFAULT_WINDOW_SYS "BeOS" /* "tty" */ 84 #ifndef HACKDIR /* override the default hackdir below */ 85 # define HACKDIR "/boot/apps/NetHack" 86 #endif 87 #endif 88 89 #ifdef QT_GRAPHICS 90 # define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */ 91 # define USER_SOUNDS /* Use sounds */ 92 # ifndef __APPLE__ 93 # define USER_SOUNDS_REGEX 94 # endif 95 # define USE_XPM /* Use XPM format for images (required) */ 96 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ 97 # ifndef DEFAULT_WINDOW_SYS 98 # define DEFAULT_WINDOW_SYS "Qt" 99 # endif 100 #endif 101 102 #ifdef VULTURE_GRAPHICS 103 # ifndef DEFAULT_WINDOW_SYS 104 # define DEFAULT_WINDOW_SYS "vulture" 105 # endif 106 #endif /* VULTURE_GRAPHICS */ 107 108 #ifdef GNOME_GRAPHICS 109 # define USE_XPM /* Use XPM format for images (required) */ 110 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ 111 # ifndef DEFAULT_WINDOW_SYS 112 # define DEFAULT_WINDOW_SYS "Gnome" 113 # endif 114 #endif 115 116 #ifdef MSWIN_GRAPHICS 117 # ifdef TTY_GRAPHICS 118 # undef TTY_GRAPHICS 119 # endif 120 # ifndef DEFAULT_WINDOW_SYS 121 # define DEFAULT_WINDOW_SYS "mswin" 122 # endif 123 # define HACKDIR "\\nethack" 124 #endif 125 126 #ifndef DEFAULT_WINDOW_SYS 127 # define DEFAULT_WINDOW_SYS "tty" 128 #endif 129 130 #ifdef X11_GRAPHICS 131 /* 132 * There are two ways that X11 tiles may be defined. (1) using a custom 133 * format loaded by NetHack code, or (2) using the XPM format loaded by 134 * the free XPM library. The second option allows you to then use other 135 * programs to generate tiles files. For example, the PBMPlus tools 136 * would allow: 137 * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm 138 */ 139 /* # define USE_XPM */ /* Disable if you do not have the XPM library */ 140 # ifdef USE_XPM 141 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ 142 # endif 143 #endif 144 145 146 /* 147 * Section 2: Some global parameters and filenames. 148 * Commenting out WIZARD, LOGFILE, NEWS or PANICLOG removes that 149 * feature from the game; otherwise set the appropriate wizard 150 * name. LOGFILE, NEWS and PANICLOG refer to files in the 151 * playground. 152 */ 153 154 #ifndef WIZARD /* allow for compile-time or Makefile changes */ 155 # ifndef KR1ED 156 # define WIZARD "wizard" /* the person allowed to use the -D option */ 157 # else 158 # define WIZARD 159 # define WIZARD_NAME "wizard" 160 # endif 161 #endif 162 163 #define LOGFILE "logfile" /* larger file for debugging purposes */ 164 #define NEWS "news" /* the file containing the latest hack news */ 165 #define PANICLOG "paniclog" /* log of panic and impossible events */ 166 167 /* 168 * If COMPRESS is defined, it should contain the full path name of your 169 * 'compress' program. Defining INTERNAL_COMP causes NetHack to do 170 * simpler byte-stream compression internally. Both COMPRESS and 171 * INTERNAL_COMP create smaller bones/level/save files, but require 172 * additional code and time. Currently, only UNIX fully implements 173 * COMPRESS; other ports should be able to uncompress save files a 174 * la unixmain.c if so inclined. 175 * If you define COMPRESS, you must also define COMPRESS_EXTENSION 176 * as the extension your compressor appends to filenames after 177 * compression. 178 */ 179 180 #ifdef UNIX 181 /* path and file name extension for compression program */ 182 /* #define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */ 183 /* #define COMPRESS_EXTENSION ".Z" */ /* compress's extension */ 184 /* An example of one alternative you might want to use: */ 185 /* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ 186 /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ 187 #endif 188 189 #ifndef COMPRESS 190 # define INTERNAL_COMP /* control use of NetHack's compression routines */ 191 #endif 192 193 /* 194 * Data librarian. Defining DLB places most of the support files into 195 * a tar-like file, thus making a neater installation. See *conf.h 196 * for detailed configuration. 197 */ 198 #define DLB /* not supported on all platforms */ 199 200 /* 201 * Defining INSURANCE slows down level changes, but allows games that 202 * died due to program or system crashes to be resumed from the point 203 * of the last level change, after running a utility program. 204 */ 205 #define INSURANCE /* allow crashed game recovery */ 206 207 #ifndef MAC 208 # define CHDIR /* delete if no chdir() available */ 209 #endif 210 211 #ifdef CHDIR 212 /* 213 * If you define HACKDIR, then this will be the default playground; 214 * otherwise it will be the current directory. 215 */ 216 # ifndef HACKDIR 217 # define HACKDIR "/usr/games/lib/nethackdir" 218 # endif 219 220 /* 221 * Some system administrators are stupid enough to make Hack suid root 222 * or suid daemon, where daemon has other powers besides that of reading or 223 * writing Hack files. In such cases one should be careful with chdir's 224 * since the user might create files in a directory of his choice. 225 * Of course SECURE is meaningful only if HACKDIR is defined. 226 */ 227 /* #define SECURE */ /* do setuid(getuid()) after chdir() */ 228 229 /* 230 * If it is desirable to limit the number of people that can play Hack 231 * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS. 232 * #define MAX_NR_OF_PLAYERS 6 233 */ 234 #endif /* CHDIR */ 235 236 237 238 /* 239 * Section 3: Definitions that may vary with system type. 240 * For example, both schar and uchar should be short ints on 241 * the AT&T 3B2/3B5/etc. family. 242 */ 243 244 /* 245 * Uncomment the following line if your compiler doesn't understand the 246 * 'void' type (and thus would give all sorts of compile errors without 247 * this definition). 248 */ 249 /* #define NOVOID */ /* define if no "void" data type. */ 250 251 /* 252 * Uncomment the following line if your compiler falsely claims to be 253 * a standard C compiler (i.e., defines __STDC__ without cause). 254 * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc. 255 */ 256 /* #define NOTSTDC */ /* define for lying compilers */ 257 258 #include "tradstdc.h" 259 260 /* 261 * type schar: small signed integers (8 bits suffice) (eg. TOS) 262 * 263 * typedef char schar; 264 * 265 * will do when you have signed characters; otherwise use 266 * 267 * typedef short int schar; 268 */ 269 #ifdef AZTEC 270 # define schar char 271 #else 272 typedef signed char schar; 273 #endif 274 275 /* 276 * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not) 277 * 278 * typedef unsigned char uchar; 279 * 280 * will be satisfactory if you have an "unsigned char" type; 281 * otherwise use 282 * 283 * typedef unsigned short int uchar; 284 */ 285 #ifndef _AIX32 /* identical typedef in system file causes trouble */ 286 typedef unsigned char uchar; 287 #endif 288 289 /* 290 * Various structures have the option of using bitfields to save space. 291 * If your C compiler handles bitfields well (e.g., it can initialize structs 292 * containing bitfields), you can define BITFIELDS. Otherwise, the game will 293 * allocate a separate character for each bitfield. (The bitfields used never 294 * have more than 7 bits, and most are only 1 bit.) 295 */ 296 #define BITFIELDS /* Good bitfield handling */ 297 298 /* #define STRNCMPI */ /* compiler/library has the strncmpi function */ 299 300 /* 301 * There are various choices for the NetHack vision system. There is a 302 * choice of two algorithms with the same behavior. Defining VISION_TABLES 303 * creates huge (60K) tables at compile time, drastically increasing data 304 * size, but runs slightly faster than the alternate algorithm. (MSDOS in 305 * particular cannot tolerate the increase in data size; other systems can 306 * flip a coin weighted to local conditions.) 307 * 308 * If VISION_TABLES is not defined, things will be faster if you can use 309 * MACRO_CPATH. Some cpps, however, cannot deal with the size of the 310 * functions that have been macroized. 311 */ 312 313 /* #define VISION_TABLES */ /* use vision tables generated at compile time */ 314 #ifndef VISION_TABLES 315 # ifndef NO_MACRO_CPATH 316 # define MACRO_CPATH /* use clear_path macros instead of functions */ 317 # endif 318 #endif 319 320 /* 321 * Section 4: THE FUN STUFF!!! 322 * 323 * Conditional compilation of special options are controlled here. 324 * If you define the following flags, you will add not only to the 325 * complexity of the game but also to the size of the load module. 326 */ 327 328 /* dungeon features */ 329 #define SINKS /* Kitchen sinks - Janet Walz */ 330 /* dungeon levels */ 331 #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ 332 #define REINCARNATION /* Special Rogue-like levels */ 333 /* monsters & objects */ 334 #define KOPS /* Keystone Kops by Scott R. Turner */ 335 #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ 336 #define STEED /* Riding steeds */ 337 #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ 338 /* difficulty */ 339 #define ELBERETH /* Engraving the E-word repels monsters */ 340 /* I/O */ 341 #define REDO /* support for redoing last command - DGK */ 342 #if !defined(MAC) 343 # define CLIPPING /* allow smaller screens -- ERS */ 344 #endif 345 346 #ifdef REDO 347 # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ 348 #endif 349 350 #define EXP_ON_BOTL /* Show experience on bottom line */ 351 /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ 352 353 /* 354 * Section 5: EXPERIMENTAL STUFF 355 * 356 * Conditional compilation of new or experimental options are controlled here. 357 * Enable any of these at your own risk -- there are almost certainly 358 * bugs left here. 359 */ 360 361 /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ 362 #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ 363 #define DUMP_LOG /* Dump game end information to a file */ 364 /* #define DUMP_FN "/tmp/%n.nh" */ /* Fixed dumpfile name, if you want 365 * to prevent definition by users */ 366 #define DUMPMSGS 20 /* Number of latest messages in the dump file */ 367 368 /* End of Section 5 */ 369 370 #include "global.h" /* Define everything else according to choices above */ 371 372 #endif /* CONFIG_H */ 373