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 #undef SHORT_FILENAMES 9 10 11 /*#define DEBUG*/ 12 /*#define DDEBUG*/ 13 /*#define MONITOR_HEAP*/ 14 #if defined(MONITOR_HEAP) && (defined(UNIX) || defined(WIN32)) 15 #define INTERNAL_MALLOC /* Use internal malloc implementation */ 16 #endif 17 18 /* 19 * Section 1: Operating and window systems selection. 20 * Select the version of the OS you are using. 21 * For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h. 22 * A "VMS" option is not needed since the VMS C-compilers 23 * provide it (no need to change sec#1, vmsconf.h handles it). 24 */ 25 26 #define UNIX /* delete if no fork(), exec() available */ 27 28 /* #define MSDOS */ /* in case it's not auto-detected */ 29 30 /* #define OS2 */ /* in case it's not auto-detected */ 31 32 /* #define TOS */ /* define for Atari ST/TT */ 33 34 /* #define STUPID */ /* avoid some complicated expressions if 35 your C compiler chokes on them */ 36 /* #define MINIMAL_TERM */ 37 /* if a terminal handles highlighting or tabs poorly, 38 try this define, used in pager.c and termcap.c */ 39 /* #define ULTRIX_CC20 */ 40 /* define only if using cc v2.0 on a DECstation */ 41 /* #define ULTRIX_PROTO */ 42 /* define for Ultrix 4.0 (or higher) on a DECstation; 43 * if you get compiler errors, don't define this. */ 44 /* Hint: if you're not developing code, don't define 45 ULTRIX_PROTO. */ 46 47 #include "config1.h" /* should auto-detect MSDOS, MAC, AMIGA, WIN32 and OS2 */ 48 49 /* Windowing systems... 50 * Define all of those you want supported in your binary. 51 * Some combinations make no sense. See the installation document. 52 */ 53 /* #define TTY_GRAPHICS */ /* good old tty based graphics */ 54 /* #define X11_GRAPHICS */ /* X11 interface */ 55 /* #define QT_GRAPHICS */ /* Qt Interface */ 56 /* #define KDE */ /* KDE Interface */ 57 /* #define GTK_GRAPHICS */ /* GTK Interface */ 58 /* #define GNOME_GRAPHICS */ /* Gnome interface */ 59 /* #define PROXY_GRAPHICS */ /* Plug-in interfaces */ 60 /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ 61 /* #define GL_GRAPHICS */ /* OpenGL graphics */ 62 /* #define SDL_GRAPHICS */ /* Software SDL graphics */ 63 #define VULTURE_GRAPHICS /* Vulture's Eye isometric graphics interface */ 64 65 /* 66 * Define the default window system. This should be one that is compiled 67 * into your system (see defines above). Known window systems are: 68 * 69 * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, gtk, proxy, GL, SDL, Vulture's Eye (vulture) 70 */ 71 72 /* MAC also means MAC windows */ 73 #ifdef MAC 74 # ifndef AUX 75 # define DEFAULT_WINDOW_SYS "Mac" 76 # endif 77 #endif 78 79 /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */ 80 #ifdef AMIGA 81 # define AMII_GRAPHICS /* (optional) */ 82 # define DEFAULT_WINDOW_SYS "amii" /* "amii", "amitile" or "tty" */ 83 #endif 84 85 #if 0 /* Removed in 3.3.0 */ 86 /* Windows NT supports TTY_GRAPHICS */ 87 #ifdef WIN32 88 # define DEFAULT_WINDOW_SYS "tty" 89 #endif 90 #endif 91 92 /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */ 93 #ifdef TOS 94 # define GEM_GRAPHICS /* Atari GEM interface (optional) */ 95 # define DEFAULT_WINDOW_SYS "Gem" /* "Gem" or "tty" */ 96 #endif 97 98 #ifdef __BEOS__ 99 #define BEOS_GRAPHICS /* (optional) */ 100 #define DEFAULT_WINDOW_SYS "BeOS" /* "tty" */ 101 #ifndef HACKDIR /* override the default hackdir below */ 102 # define HACKDIR "/boot/apps/NetHack" 103 #endif 104 #endif 105 106 #ifdef QT_GRAPHICS 107 # define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */ 108 # define USER_SOUNDS /* Use sounds */ 109 # ifndef __APPLE__ 110 # define USER_SOUNDS_REGEX 111 # endif 112 # define USE_XPM /* Use XPM format for images (required) */ 113 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ 114 # ifndef DEFAULT_WINDOW_SYS 115 # define DEFAULT_WINDOW_SYS "Qt" 116 # endif 117 #endif 118 119 #ifdef VULTURE_GRAPHICS 120 # ifndef DEFAULT_WINDOW_SYS 121 # define DEFAULT_WINDOW_SYS "vulture" 122 # endif 123 #endif /* VULTURE_GRAPHICS */ 124 125 #ifdef GNOME_GRAPHICS 126 # define USE_XPM /* Use XPM format for images (required) */ 127 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ 128 # ifndef DEFAULT_WINDOW_SYS 129 # define DEFAULT_WINDOW_SYS "Gnome" 130 # endif 131 #endif 132 133 #ifdef GTK_GRAPHICS 134 # define USE_XPM /* Use XPM format for images (required) */ 135 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ 136 /* # define GTK_PROXY */ /* Build for proxy interface */ 137 # ifndef DEFAULT_WINDOW_SYS 138 # define DEFAULT_WINDOW_SYS "gtk" 139 # endif 140 #endif 141 142 #ifdef PROXY_GRAPHICS 143 # define USE_XPM /* Use XPM format for images */ 144 /* 145 * The proxy interface shouldn't be used as the default window system. 146 * This will cause it to always be initialized with undesirable side 147 * effects. Instead, use the windowtype option. --ALI 148 */ 149 #endif 150 151 #ifdef MSWIN_GRAPHICS 152 # ifndef DEFAULT_WINDOW_SYS 153 # define DEFAULT_WINDOW_SYS "mswin" 154 # endif 155 # define HACKDIR "\\nethack" 156 #endif 157 158 #ifdef GL_GRAPHICS 159 # ifndef DEFAULT_WINDOW_SYS 160 # define DEFAULT_WINDOW_SYS "GL" 161 # endif 162 #endif 163 164 #ifdef SDL_GRAPHICS 165 # ifndef DEFAULT_WINDOW_SYS 166 # define DEFAULT_WINDOW_SYS "SDL" 167 # endif 168 #endif 169 170 #if defined(GL_GRAPHICS) || defined(SDL_GRAPHICS) 171 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone */ 172 /* -AJA- workaround for clash with ZLIB headers */ 173 # if defined(VANILLA_GLHACK) 174 # define compress nh_compress 175 # define uncompress nh_uncompress 176 # endif 177 #endif 178 179 #ifdef X11_GRAPHICS 180 /* 181 * There are two ways that X11 tiles may be defined. (1) using a custom 182 * format loaded by NetHack code, or (2) using the XPM format loaded by 183 * the free XPM library. The second option allows you to then use other 184 * programs to generate tiles files. For example, the PBMPlus tools 185 * would allow: 186 * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | pnmdepth 255 | 187 * ppmquant 90 | ppmtoxpm >x11tiles_big.xpm 188 */ 189 /* # define USE_XPM */ /* Disable if you do not have the XPM library */ 190 # ifdef USE_XPM 191 # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ 192 # endif 193 # ifndef DEFAULT_WINDOW_SYS 194 # define DEFAULT_WINDOW_SYS "X11" 195 # endif 196 #endif 197 198 #ifndef DEFAULT_WINDOW_SYS 199 # define DEFAULT_WINDOW_SYS "tty" 200 #endif 201 202 /* 203 * Section 2: Some global parameters and filenames. 204 * Commenting out WIZARD, LOGFILE, NEWS or PANICLOG removes that 205 * feature from the game; otherwise set the appropriate wizard 206 * name. LOGFILE, NEWS and PANICLOG refer to files in the 207 * playground. 208 */ 209 210 #ifndef WIZARD /* allow for compile-time or Makefile changes */ 211 # ifndef KR1ED 212 # define WIZARD "wizard" /* the person allowed to use the -D option */ 213 # else 214 # define WIZARD 215 # define WIZARD_NAME "wizard" 216 # endif 217 #endif 218 219 #define LOGFILE "logfile" /* larger file for debugging purposes */ 220 #define LOGAREA FILE_AREA_VAR 221 #define NEWS "news" /* the file containing the latest hack news */ 222 #define NEWS_AREA FILE_AREA_SHARE 223 #define PANICLOG "paniclog" /* log of panic and impossible events */ 224 225 /* 226 * If COMPRESS is defined, it should contain the full path name of your 227 * 'compress' program. Defining INTERNAL_COMP causes NetHack to do 228 * simpler byte-stream compression internally. Both COMPRESS and 229 * INTERNAL_COMP create smaller bones/level/save files, but require 230 * additional code and time. Currently, only UNIX fully implements 231 * COMPRESS; other ports should be able to uncompress save files a 232 * la unixmain.c if so inclined. 233 * If you define COMPRESS, you must also define COMPRESS_EXTENSION 234 * as the extension your compressor appends to filenames after 235 * compression. 236 */ 237 238 #ifdef UNIX 239 /* path and file name extension for compression program */ 240 # define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ 241 # define COMPRESS_EXTENSION ".Z" /* compress's extension */ 242 243 /* An example of one alternative you might want to use: */ 244 /* # define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ 245 /* # define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ 246 247 /* # define COMPRESS "/usr/bin/bzip2" *//* bzip2 compression */ 248 /* # define COMPRESS_EXTENSION ".bz2" *//* bzip2 extension */ 249 #endif 250 #ifndef COMPRESS 251 # define INTERNAL_COMP /* control use of NetHack's compression routines */ 252 #endif 253 254 /* 255 * Data librarian. Defining DLB places most of the support files into 256 * a tar-like file, thus making a neater installation. See *conf.h 257 * for detailed configuration. 258 */ 259 #define DLB /* not supported on all platforms */ 260 261 /* 262 * Defining INSURANCE slows down level changes, but allows games that 263 * died due to program or system crashes to be resumed from the point 264 * of the last level change, after running a utility program. 265 */ 266 #define INSURANCE /* allow crashed game recovery */ 267 268 #ifndef MAC 269 # define CHDIR /* delete if no chdir() available */ 270 #endif 271 272 #ifdef CHDIR 273 /* 274 * If you define HACKDIR, then this will be the default playground; 275 * otherwise it will be the current directory. 276 */ 277 # ifndef HACKDIR 278 # ifdef __APPLE__ 279 # define HACKDIR "nethackdir" /* nethack directory */ 280 # else 281 # define HACKDIR "." 282 # endif 283 # endif 284 285 /* 286 * Some system administrators are stupid enough to make Hack suid root 287 * or suid daemon, where daemon has other powers besides that of reading or 288 * writing Hack files. In such cases one should be careful with chdir's 289 * since the user might create files in a directory of his choice. 290 * Of course SECURE is meaningful only if HACKDIR is defined. 291 */ 292 /* #define SECURE */ /* do setuid(getuid()) after chdir() */ 293 294 /* 295 * If it is desirable to limit the number of people that can play Hack 296 * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS. 297 * #define MAX_NR_OF_PLAYERS 6 298 */ 299 #endif /* CHDIR */ 300 301 302 303 /* 304 * Section 3: Definitions that may vary with system type. 305 * For example, both schar and uchar should be short ints on 306 * the AT&T 3B2/3B5/etc. family. 307 */ 308 309 /* 310 * Uncomment the following line if your compiler doesn't understand the 311 * 'void' type (and thus would give all sorts of compile errors without 312 * this definition). 313 */ 314 /* #define NOVOID */ /* define if no "void" data type. */ 315 316 /* 317 * Uncomment the following line if your compiler falsely claims to be 318 * a standard C compiler (i.e., defines __STDC__ without cause). 319 * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc. 320 */ 321 /* #define NOTSTDC */ /* define for lying compilers */ 322 323 #include "tradstdc.h" 324 325 /* 326 * type schar: small signed integers (8 bits suffice) (eg. TOS) 327 * 328 * typedef char schar; 329 * 330 * will do when you have signed characters; otherwise use 331 * 332 * typedef short int schar; 333 */ 334 #ifdef AZTEC 335 # define schar char 336 #else 337 typedef signed char schar; 338 #endif 339 340 /* 341 * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not) 342 * 343 * typedef unsigned char uchar; 344 * 345 * will be satisfactory if you have an "unsigned char" type; 346 * otherwise use 347 * 348 * typedef unsigned short int uchar; 349 */ 350 #ifndef _AIX32 /* identical typedef in system file causes trouble */ 351 typedef unsigned char uchar; 352 #endif 353 354 #define RECORD_CONDUCT /* Record conduct challenges in logfile */ 355 356 /* 357 * Various structures have the option of using bitfields to save space. 358 * If your C compiler handles bitfields well (e.g., it can initialize structs 359 * containing bitfields), you can define BITFIELDS. Otherwise, the game will 360 * allocate a separate character for each bitfield. (The bitfields used never 361 * have more than 7 bits, and most are only 1 bit.) 362 */ 363 #define BITFIELDS /* Good bitfield handling */ 364 365 /* #define STRNCMPI */ /* compiler/library has the strncmpi function */ 366 367 /* 368 * There are various choices for the NetHack vision system. There is a 369 * choice of two algorithms with the same behavior. Defining VISION_TABLES 370 * creates huge (60K) tables at compile time, drastically increasing data 371 * size, but runs slightly faster than the alternate algorithm. (MSDOS in 372 * particular cannot tolerate the increase in data size; other systems can 373 * flip a coin weighted to local conditions.) 374 * 375 * If VISION_TABLES is not defined, things will be faster if you can use 376 * MACRO_CPATH. Some cpps, however, cannot deal with the size of the 377 * functions that have been macroized. 378 */ 379 /* WAC Can be defined under DJGPP, even though it's DOS*/ 380 /*#define VISION_TABLES */ /* use vision tables generated at compile time */ 381 #ifndef VISION_TABLES 382 # ifndef NO_MACRO_CPATH 383 # define MACRO_CPATH /* use clear_path macros instead of functions */ 384 # endif 385 #endif 386 387 /* 388 * Section 4: THE FUN STUFF!!! 389 * 390 * Conditional compilation of special options are controlled here. 391 * If you define the following flags, you will add not only to the 392 * complexity of the game but also to the size of the load module. 393 */ 394 395 /* dungeon features */ 396 #define SINKS /* Kitchen sinks - Janet Walz */ 397 #define LIGHT_SRC_SPELL /* WAC Light sourced spells (wac@intergate.bc.ca)*/ 398 399 /* dungeon levels */ 400 #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ 401 /* #define REINCARNATION */ /* Special Rogue-like levels */ 402 #define BLACKMARKET /* Massimo Campostrini (campo@sunthpi3.difi.unipi.it) */ 403 404 /* monsters & objects */ 405 #define KOPS /* Keystone Kops by Scott R. Turner */ 406 #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ 407 #define INVISIBLE_OBJECTS /* Not yet fully implemented */ 408 #define UNPOLYPILE /* WAC -- Items can unpolymorph */ 409 #define WALLET_O_P /* Perseus' Wallet, and all related code (tsanth@iname.com)*/ 410 #define LIGHTSABERS 411 #ifdef LIGHTSABERS 412 # define D_SABER /* Enable WEAPON(dimsaber), and all related code (tsanth@iname.com)*/ 413 #endif 414 #define P_SPOON /* Enable WEPTOOL(spoon), and all related code (tsanth@iname.com)*/ 415 #define FIREARMS /* KMH -- Guns and bullets */ 416 #define EATEN_MEMORY /* WAC -- Remember which monsters have been eaten */ 417 #define STEED /* The ability to ride monsters */ 418 419 /* Roles */ 420 #define DWARF /* Dwarf Patch, Osku Salerma (osku@iki.fi) */ 421 #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ 422 #define YEOMAN /* KMH -- Yeoman class */ 423 /* #define ZOUTHERN */ /* KMH -- Zoutherner class and its animals */ 424 425 /* I/O */ 426 #define REDO /* support for redoing last command - DGK */ 427 #if !defined(MAC) 428 # define CLIPPING /* allow smaller screens -- ERS */ 429 #endif 430 #ifdef TTY_GRAPHICS 431 # define MENU_COLOR 432 #endif 433 434 #if defined(UNIX) 435 #define USE_REGEX_MATCH 436 /* if USE_REGEX_MATCH is defined, use regular expressions (GNU regex.h) 437 * otherwise use pmatch() to match menu color lines. 438 * pmatch() provides basic globbing: '*' and '?' wildcards. 439 */ 440 #endif 441 442 /* difficulty */ 443 #define ELBERETH /* Engraving the E-word repels monsters */ 444 /* #define NOARTIFACTWISH */ /* No wishing for special artifacts -- swhite@cs.mun.ca */ 445 /* #define NO_BONES */ /*Disables loading and saving bones levels*/ 446 447 /* The following are best left disabled until their bugs are completely fixed */ 448 449 450 /* User_sounds are sounds matches with messages. The messages are defined 451 * in the player's .nethackrc using lines of the form: 452 * 453 * SOUND=MESG <message-regex-pattern> <sound-filename> <volume> 454 * 455 * For example: 456 * 457 * SOUND=MESG "board beneath .....* squeaks" "squeak.au" 60 458 * 459 * By default, the filenames are relative to the nethack install directory, 460 * but this can be set in the .nethackrc via: 461 * 462 * SOUNDDIR=<directory> 463 */ 464 /* #define USER_SOUNDS */ /* Allow user-defined regex mappings from messages to sounds */ 465 /* Only supported on Qt with NAS - Network Audio System */ 466 467 468 #ifdef REDO 469 # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ 470 #endif 471 472 #define EXP_ON_BOTL /* Show experience on bottom line */ 473 /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ 474 /* #define BORG */ /* Works only under DOS */ 475 /* #define KEEP_SAVE */ /* Keep savefiles after Restore (wac@intergate.bc.ca)*/ 476 /* #define CHARON */ /* Charon's boat, enables Cerebus - not implemented */ 477 #define SHOW_DMG /* WAC made dmg reports optional (wac@intergate.bc.ca)*/ 478 #define SHOW_WEIGHT /* [max] added display of object weight when picking up */ 479 /* and in inventory (madmax@fly.cc.fer.hr). */ 480 /* Originally added by zaga. */ 481 #define OTHER_SERVICES /* shopkeeper services */ 482 #define DUNGEON_GROWTH 483 484 /* #define SHOUT */ /* JRN -- shouting and petcommands - not implemented */ 485 486 #define DISPLAY_LAYERS /* Improved support for transparent tile sets - ALI */ 487 488 /* 489 * Section 5: EXPERIMENTAL STUFF 490 * 491 * Conditional compilation of new or experimental options are controlled here. 492 * Enable any of these at your own risk -- there are almost certainly 493 * bugs left here. 494 */ 495 496 /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ 497 #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ 498 499 /* End of Section 5 */ 500 501 #include "global.h" /* Define everything else according to choices above */ 502 503 #endif /* CONFIG_H */ 504