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