4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Angband specific configuration stuff */
13 /* Allow debug commands */
16 /* Allow various special stuff (sound, graphics, etc.) */
22 * USE_FONTSET and/or USE_XIM can be commented out
23 * when you don't want to use it.
31 #if defined(USE_FONTSET) || defined(USE_XIM)
35 #if defined(JP) && !defined(USE_FONTSET)
36 #define USE_JP_FONTSTRUCT
39 #endif /* HAVE_CONFIG_H */
43 * Look through the following lines, and where a comment includes the
44 * tag "OPTION:", examine the associated "#define" statements, and decide
45 * whether you wish to keep, comment, or uncomment them. You should not
46 * have to modify any lines not indicated by "OPTION".
48 * Note: Also examine the "system" configuration file "h-config.h"
49 * and the variable initialization file "variable.c". If you change
50 * anything in "variable.c", you only need to recompile that file.
52 * And finally, remember that the "Makefile" will specify some rather
53 * important compile time options, like what visual module to use.
58 * OPTION: See the Makefile(s), where several options may be declared.
60 * Some popular options include "USE_GCU" (allow use with Unix "curses"),
61 * "USE_X11" (allow basic use with Unix X11), "USE_XAW" (allow use with
62 * Unix X11 plus the Athena Widget set), and "USE_CAP" (allow use with
63 * the "termcap" library, or with hard-coded vt100 terminals).
65 * The old "USE_NCU" option has been replaced with "USE_GCU".
67 * Several other such options are available for non-unix machines,
68 * such as "MACINTOSH", "WINDOWS", "USE_IBM", "USE_EMX".
70 * You may also need to specify the "system", using defines such as
71 * "SOLARIS" (for Solaris), etc, see "h-config.h" for more info.
76 * OPTION: define "SPECIAL_BSD" for using certain versions of UNIX
77 * that use the 4.4BSD Lite version of Curses in "main-gcu.c"
79 /* #define SPECIAL_BSD */
83 * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
85 /* #define USE_TPOSIX */
88 * OPTION: Use the "termio" methods in "main-gcu.c"
90 /* #define USE_TERMIO */
93 * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
95 /* #define USE_TCHARS */
99 * OPTION: Use "blocking getch() calls" in "main-gcu.c".
100 * Hack -- Note that this option will NOT work on many BSD machines
101 * Currently used whenever available, if you get a warning about
102 * "nodelay()" undefined, then make sure to undefine this.
104 #if defined(SYS_V) || defined(AMIGA)
110 * OPTION: Use the "curs_set()" call in "main-gcu.c".
111 * Hack -- This option will not work on most BSD machines
114 # define USE_CURS_SET
119 * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
121 /* #define USE_NCURSES */
125 * OPTION: for multi-user machines running the game setuid to some other
126 * user (like 'games') this SAFE_SETUID option allows the program to drop
127 * its privileges when saving files that allow for user specified pathnames.
128 * This lets the game be installed system wide without major security
129 * concerns. There should not be any side effects on any machines.
131 * This will handle "gids" correctly once the permissions are set right.
137 * This flag enables the "POSIX" methods for "SAFE_SETUID".
139 #ifdef _POSIX_SAVED_IDS
140 # define SAFE_SETUID_POSIX
145 * Prevent problems on (non-Solaris) Suns using "SAFE_SETUID".
146 * The SAFE_SETUID code is weird, use it at your own risk...
148 #if defined(SUNOS) && !defined(SOLARIS)
149 # undef SAFE_SETUID_POSIX
156 * OPTION: for the AFS distributed file system, define this to ensure that
157 * the program is secure with respect to the setuid code. This option has
158 * not been tested (to the best of my knowledge). This option may require
159 * some weird tricks with "player_uid" and such involving "defines".
160 * Note that this option used the AFS library routines Authenticate(),
161 * bePlayer(), beGames() to enforce the proper priviledges.
162 * You may need to turn "SAFE_SETUID" off to use this option.
170 * OPTION: Verify savefile Checksums (Angband 2.7.0 and up)
171 * This option can help prevent "corruption" of savefiles, and also
172 * stop intentional modification by amateur users.
174 #define VERIFY_CHECKSUMS
178 * OPTION: Forbid the use of "fiddled" savefiles. As far as I can tell,
179 * a fiddled savefile is one with an internal timestamp different from
180 * the actual timestamp. Thus, turning this option on forbids one from
181 * copying a savefile to a different name. Combined with disabling the
182 * ability to save the game without quitting, and with some method of
183 * stopping the user from killing the process at the tombstone screen,
184 * this should prevent the use of backup savefiles. It may also stop
185 * the use of savefiles from other platforms, so be careful.
187 /* #define VERIFY_TIMESTAMP */
191 * OPTION: Forbid the "savefile over-write" cheat, in which you simply
192 * run another copy of the game, loading a previously saved savefile,
193 * and let that copy over-write the "dead" savefile later. This option
194 * either locks the savefile, or creates a fake "xxx.lok" file to prevent
195 * the use of the savefile until the file is deleted. Not ready yet.
197 /* #define VERIFY_SAVEFILE */
202 * OPTION: Hack -- Compile in support for "Cyborg" mode
204 /*#define ALLOW_BORG*/
209 * OPTION: Hack -- Compile in support for "Wizard Commands"
214 * OPTION: Hack -- Compile in support for "Spoiler Generation"
216 #define ALLOW_SPOILERS
218 #endif /* USE_DEBUG */
221 * OPTION: Allow "do_cmd_colors" at run-time
226 * OPTION: Allow "do_cmd_visuals" at run-time
228 #define ALLOW_VISUALS
231 * OPTION: Allow "do_cmd_macros" at run-time
236 * OPTION: Allow characteres to be "auto-rolled"
238 #define ALLOW_AUTOROLLER
242 * OPTION: Allow monsters to "flee" when hit hard
247 * OPTION: Allow monsters to "flee" from strong players
253 * OPTION: Allow parsing of the ascii template files in "init.c".
254 * This must be defined if you do not have valid binary image files.
255 * It should be usually be defined anyway to allow easy "updating".
257 #define ALLOW_TEMPLATES
260 * OPTION: Allow loading of pre-2.7.0 savefiles. Note that it takes
261 * about 15K of code in "save-old.c" to parse the old savefile format.
262 * Angband 2.8.0 will ignore a lot of info from pre-2.7.0 savefiles.
264 #define ALLOW_OLD_SAVEFILES
268 * OPTION: Handle signals
270 #define HANDLE_SIGNALS
274 * Allow "Wizards" to yield "high scores"
276 /* #define SCORE_WIZARDS */
279 * Allow "Borgs" to yield "high scores"
281 /*#define SCORE_BORGS*/
284 * Allow "Cheaters" to yield "high scores"
286 /* #define SCORE_CHEATERS */
291 * OPTION: Maximum flow depth when using "MONSTER_FLOW"
293 #define MONSTER_FLOW_DEPTH 32
299 * OPTION: Allow the use of "sound" in various places.
304 * OPTION: Allow the use of "graphics" in various places
309 * OPTION: Allow the use of "music" in various places
311 /* #define USE_MUSIC */
313 #endif /* USE_SPECIAL */
316 * OPTION: Hack -- Macintosh stuff
320 /* Do not handle signals */
321 # undef HANDLE_SIGNALS
327 * OPTION: Hack -- Windows stuff
331 /* Do not handle signals */
332 # undef HANDLE_SIGNALS
338 * OPTION: Hack -- EMX stuff
342 /* Do not handle signals */
343 # undef HANDLE_SIGNALS
349 * OPTION: Set the "default" path to the angband "lib" directory.
351 * See "main.c" for usage, and note that this value is only used on
352 * certain machines, primarily Unix machines. If this value is used,
353 * it will be over-ridden by the "ANGBAND_PATH" environment variable,
354 * if that variable is defined and accessable. The final slash is
355 * optional, but it may eventually be required.
357 * Using the value "./lib/" below tells Angband that, by default,
358 * the user will run "angband" from the same directory that contains
359 * the "lib" directory. This is a reasonable (but imperfect) default.
361 * If at all possible, you should change this value to refer to the
362 * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
363 * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
366 # define DEFAULT_PATH "./lib/"
371 * OPTION: Create and use a hidden directory in the users home directory
372 * for storing pref-files and character-dumps.
375 #define PRIVATE_USER_PATH "~/.angband"
380 * On multiuser systems, add the "uid" to savefile names
383 # define SAVEFILE_USE_UID
388 * OPTION: Check the "time" against "lib/file/hours.txt"
390 /* #define CHECK_TIME */
393 * OPTION: Check the "load" against "lib/file/load.txt"
394 * This may require the 'rpcsvs' library
396 /* #define CHECK_LOAD */
400 * OPTION: For some brain-dead computers with no command line interface,
401 * namely Macintosh, there has to be some way of "naming" your savefiles.
402 * The current "Macintosh" hack is to make it so whenever the character
403 * name changes, the savefile is renamed accordingly. But on normal
404 * machines, once you manage to "load" a savefile, it stays that way.
405 * Macintosh is particularly weird because you can load savefiles that
406 * are not contained in the "lib:save:" folder, and if you change the
407 * player's name, it will then save the savefile elsewhere. Note that
408 * this also gives a method of "bypassing" the "VERIFY_TIMESTAMP" code.
411 #if defined(MACINTOSH) || defined(WINDOWS) || defined(AMIGA)
412 # define SAVEFILE_MUTABLE
417 * OPTION: Capitalize the "user_name" (for "default" player name)
418 * This option is only relevant on SET_UID machines.
420 #define CAPITALIZE_USER_NAME
425 * OPTION: Person to bother if something goes wrong.
427 /* #define MAINTAINER "rr9@angband.org" */
428 #define MAINTAINER "echizen@users.sourceforge.jp"
434 * OPTION: Default font (when using X11).
436 #define DEFAULT_X11_FONT "a24"
437 #define DEFAULT_X11_KFONT "kanji24"
438 #define DEFAULT_X11_FONT_SUB "a16"
439 #define DEFAULT_X11_KFONT_SUB "kanji16"
443 * OPTION: Default fonts (when using X11)
445 #define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
446 #define DEFAULT_X11_KFONT_0 DEFAULT_X11_KFONT
447 #define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
448 #define DEFAULT_X11_KFONT_1 DEFAULT_X11_KFONT_SUB
449 #define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
450 #define DEFAULT_X11_KFONT_2 DEFAULT_X11_KFONT_SUB
451 #define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
452 #define DEFAULT_X11_KFONT_3 DEFAULT_X11_KFONT_SUB
453 #define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
454 #define DEFAULT_X11_KFONT_4 DEFAULT_X11_KFONT_SUB
455 #define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
456 #define DEFAULT_X11_KFONT_5 DEFAULT_X11_KFONT_SUB
457 #define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
458 #define DEFAULT_X11_KFONT_6 DEFAULT_X11_KFONT_SUB
459 #define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
460 #define DEFAULT_X11_KFONT_7 DEFAULT_X11_KFONT_SUB
464 * OPTION: Default font (when using X11).
466 #define DEFAULT_X11_FONT \
467 "-*-*-medium-r-normal--24-*-*-*-*-*-iso8859-1" \
468 ",-*-*-medium-r-normal--24-*-*-*-*-*-jisx0208.1983-0"
471 #define DEFAULT_X11_FONT_SUB \
472 "-*-*-medium-r-normal--16-*-*-*-*-*-iso8859-1" \
473 ",-*-*-medium-r-normal--16-*-*-*-*-*-jisx0208.1983-0"
478 * OPTION: Default fonts (when using X11)
480 #define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
481 #define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
482 #define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
483 #define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
484 #define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
485 #define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
486 #define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
487 #define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
492 * OPTION: Default font (when using X11).
494 #define DEFAULT_X11_FONT "9x15"
497 * OPTION: Default fonts (when using X11)
499 #define DEFAULT_X11_FONT_0 "10x20"
500 #define DEFAULT_X11_FONT_1 "9x15"
501 #define DEFAULT_X11_FONT_2 "9x15"
502 #define DEFAULT_X11_FONT_3 "5x8"
503 #define DEFAULT_X11_FONT_4 "5x8"
504 #define DEFAULT_X11_FONT_5 "5x8"
505 #define DEFAULT_X11_FONT_6 "5x8"
506 #define DEFAULT_X11_FONT_7 "5x8"
511 * OPTION: Gamma correct X11 colours.
514 #define SUPPORT_GAMMA
517 * Hack -- Special "ancient machine" versions
519 #if defined(USE_286) || defined(ANGBAND_LITE_MAC)
520 # ifndef ANGBAND_LITE
521 # define ANGBAND_LITE
526 * OPTION: Attempt to minimize the size of the game
529 /* #define ANGBAND_LITE */
533 * Hack -- React to the "ANGBAND_LITE" flag
537 # undef ALLOW_VISUALS
539 # undef ALLOW_OLD_SAVEFILES
542 # undef ALLOW_SPOILERS
543 # undef ALLOW_TEMPLATES
544 # undef DELAY_LOAD_R_TEXT
545 # define DELAY_LOAD_R_TEXT
551 * OPTION: Attempt to prevent all "cheating"
553 /* #define VERIFY_HONOR */
557 * React to the "VERIFY_HONOR" flag
560 # define VERIFY_SAVEFILE
561 # define VERIFY_CHECKSUMS
562 # define VERIFY_TIMESTAMPS
565 /* Zangband options: */
567 /* Allow hordes of 'similar' monsters */
568 # define MONSTER_HORDES
571 * OPTION: Repeat last command -- TNB
576 * OPTION: Make opening and closing things easy -- TNB
578 #define ALLOW_EASY_OPEN
581 * OPTION: Make disarming traps easy -- TNB
583 #define ALLOW_EASY_DISARM
586 * OPTION: Make floor stacks easy -- TNB
588 #define ALLOW_EASY_FLOOR
591 * Check the modification time of *_info.raw files
595 #define CHECK_MODIFICATION_TIME
599 * Use the new sorting routines for creation
600 * of the monster allocation table
605 * Use a scripting language
607 /* #define USE_SCRIPT */
611 * Python is statically linked into ZAngband
613 # define STATIC_PYTHON
614 /* # define SCRIPT_OBJ_KIND */
615 #endif /* USE_SCRIPT */
617 #ifndef HAVE_CONFIG_H
621 #endif /* HAVE_CONFIG_H */