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.
30 #if defined(USE_FONTSET) || defined(USE_XIM)
34 #if defined(JP) && !defined(USE_FONTSET)
38 #endif /* HAVE_CONFIG_H */
42 * Look through the following lines, and where a comment includes the
43 * tag "OPTION:", examine the associated "#define" statements, and decide
44 * whether you wish to keep, comment, or uncomment them. You should not
45 * have to modify any lines not indicated by "OPTION".
47 * Note: Also examine the "system" configuration file "h-config.h"
48 * and the variable initialization file "variable.c". If you change
49 * anything in "variable.c", you only need to recompile that file.
51 * And finally, remember that the "Makefile" will specify some rather
52 * important compile time options, like what visual module to use.
57 * OPTION: See the Makefile(s), where several options may be declared.
59 * Some popular options include "USE_GCU" (allow use with Unix "curses"),
60 * "USE_X11" (allow basic use with Unix X11), "USE_XAW" (allow use with
61 * Unix X11 plus the Athena Widget set), and "USE_CAP" (allow use with
62 * the "termcap" library, or with hard-coded vt100 terminals).
64 * The old "USE_NCU" option has been replaced with "USE_GCU".
66 * Several other such options are available for non-unix machines,
67 * such as "MACINTOSH", "WINDOWS", "USE_IBM", "USE_EMX".
69 * You may also need to specify the "system", using defines such as
70 * "SOLARIS" (for Solaris), etc, see "h-config.h" for more info.
75 * OPTION: define "SPECIAL_BSD" for using certain versions of UNIX
76 * that use the 4.4BSD Lite version of Curses in "main-gcu.c"
78 /* #define SPECIAL_BSD */
82 * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
84 /* #define USE_TPOSIX */
87 * OPTION: Use the "termio" methods in "main-gcu.c"
89 /* #define USE_TERMIO */
92 * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
94 /* #define USE_TCHARS */
98 * OPTION: Use "blocking getch() calls" in "main-gcu.c".
99 * Hack -- Note that this option will NOT work on many BSD machines
100 * Currently used whenever available, if you get a warning about
101 * "nodelay()" undefined, then make sure to undefine this.
103 #if defined(SYS_V) || defined(AMIGA)
109 * OPTION: Use the "curs_set()" call in "main-gcu.c".
110 * Hack -- This option will not work on most BSD machines
113 # define USE_CURS_SET
118 * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
120 /* #define USE_NCURSES */
124 * OPTION: for multi-user machines running the game setuid to some other
125 * user (like 'games') this SAFE_SETUID option allows the program to drop
126 * its privileges when saving files that allow for user specified pathnames.
127 * This lets the game be installed system wide without major security
128 * concerns. There should not be any side effects on any machines.
130 * This will handle "gids" correctly once the permissions are set right.
136 * This flag enables the "POSIX" methods for "SAFE_SETUID".
138 #ifdef _POSIX_SAVED_IDS
139 # define SAFE_SETUID_POSIX
144 * Prevent problems on (non-Solaris) Suns using "SAFE_SETUID".
145 * The SAFE_SETUID code is weird, use it at your own risk...
147 #if defined(SUNOS) && !defined(SOLARIS)
148 # undef SAFE_SETUID_POSIX
155 * OPTION: for the AFS distributed file system, define this to ensure that
156 * the program is secure with respect to the setuid code. This option has
157 * not been tested (to the best of my knowledge). This option may require
158 * some weird tricks with "player_uid" and such involving "defines".
159 * Note that this option used the AFS library routines Authenticate(),
160 * bePlayer(), beGames() to enforce the proper priviledges.
161 * You may need to turn "SAFE_SETUID" off to use this option.
169 * OPTION: Verify savefile Checksums (Angband 2.7.0 and up)
170 * This option can help prevent "corruption" of savefiles, and also
171 * stop intentional modification by amateur users.
173 #define VERIFY_CHECKSUMS
177 * OPTION: Forbid the use of "fiddled" savefiles. As far as I can tell,
178 * a fiddled savefile is one with an internal timestamp different from
179 * the actual timestamp. Thus, turning this option on forbids one from
180 * copying a savefile to a different name. Combined with disabling the
181 * ability to save the game without quitting, and with some method of
182 * stopping the user from killing the process at the tombstone screen,
183 * this should prevent the use of backup savefiles. It may also stop
184 * the use of savefiles from other platforms, so be careful.
186 /* #define VERIFY_TIMESTAMP */
190 * OPTION: Forbid the "savefile over-write" cheat, in which you simply
191 * run another copy of the game, loading a previously saved savefile,
192 * and let that copy over-write the "dead" savefile later. This option
193 * either locks the savefile, or creates a fake "xxx.lok" file to prevent
194 * the use of the savefile until the file is deleted. Not ready yet.
196 /* #define VERIFY_SAVEFILE */
201 * OPTION: Hack -- Compile in support for "Cyborg" mode
203 /*#define ALLOW_BORG*/
208 * OPTION: Hack -- Compile in support for "Wizard Commands"
213 * OPTION: Hack -- Compile in support for "Spoiler Generation"
215 #define ALLOW_SPOILERS
217 #endif /* USE_DEBUG */
220 * OPTION: Allow "do_cmd_colors" at run-time
225 * OPTION: Allow "do_cmd_visuals" at run-time
227 #define ALLOW_VISUALS
230 * OPTION: Allow "do_cmd_macros" at run-time
235 * OPTION: Allow characteres to be "auto-rolled"
237 #define ALLOW_AUTOROLLER
241 * OPTION: Allow monsters to "flee" when hit hard
246 * OPTION: Allow monsters to "flee" from strong players
252 * OPTION: Allow parsing of the ascii template files in "init.c".
253 * This must be defined if you do not have valid binary image files.
254 * It should be usually be defined anyway to allow easy "updating".
256 #define ALLOW_TEMPLATES
259 * OPTION: Allow loading of pre-2.7.0 savefiles. Note that it takes
260 * about 15K of code in "save-old.c" to parse the old savefile format.
261 * Angband 2.8.0 will ignore a lot of info from pre-2.7.0 savefiles.
263 #define ALLOW_OLD_SAVEFILES
267 * OPTION: Handle signals
269 #define HANDLE_SIGNALS
273 * Allow "Wizards" to yield "high scores"
275 /* #define SCORE_WIZARDS */
278 * Allow "Borgs" to yield "high scores"
280 /*#define SCORE_BORGS*/
283 * Allow "Cheaters" to yield "high scores"
285 /* #define SCORE_CHEATERS */
290 * OPTION: Maximum flow depth when using "MONSTER_FLOW"
292 #define MONSTER_FLOW_DEPTH 32
298 * OPTION: Allow the use of "sound" in various places.
303 * OPTION: Allow the use of "graphics" in various places
308 * OPTION: Allow the use of "music" in various places
310 /* #define USE_MUSIC */
312 #endif /* USE_SPECIAL */
315 * OPTION: Hack -- Macintosh stuff
319 /* Do not handle signals */
320 # undef HANDLE_SIGNALS
326 * OPTION: Hack -- Windows stuff
330 /* Do not handle signals */
331 # undef HANDLE_SIGNALS
337 * OPTION: Hack -- EMX stuff
341 /* Do not handle signals */
342 # undef HANDLE_SIGNALS
348 * OPTION: Set the "default" path to the angband "lib" directory.
350 * See "main.c" for usage, and note that this value is only used on
351 * certain machines, primarily Unix machines. If this value is used,
352 * it will be over-ridden by the "ANGBAND_PATH" environment variable,
353 * if that variable is defined and accessable. The final slash is
354 * optional, but it may eventually be required.
356 * Using the value "./lib/" below tells Angband that, by default,
357 * the user will run "angband" from the same directory that contains
358 * the "lib" directory. This is a reasonable (but imperfect) default.
360 * If at all possible, you should change this value to refer to the
361 * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
362 * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
365 # define DEFAULT_PATH "./lib/"
370 * OPTION: Create and use a hidden directory in the users home directory
371 * for storing pref-files and character-dumps.
374 #define PRIVATE_USER_PATH "~/.angband"
379 * On multiuser systems, add the "uid" to savefile names
382 # define SAVEFILE_USE_UID
387 * OPTION: Check the "time" against "lib/file/hours.txt"
389 /* #define CHECK_TIME */
392 * OPTION: Check the "load" against "lib/file/load.txt"
393 * This may require the 'rpcsvs' library
395 /* #define CHECK_LOAD */
399 * OPTION: For some brain-dead computers with no command line interface,
400 * namely Macintosh, there has to be some way of "naming" your savefiles.
401 * The current "Macintosh" hack is to make it so whenever the character
402 * name changes, the savefile is renamed accordingly. But on normal
403 * machines, once you manage to "load" a savefile, it stays that way.
404 * Macintosh is particularly weird because you can load savefiles that
405 * are not contained in the "lib:save:" folder, and if you change the
406 * player's name, it will then save the savefile elsewhere. Note that
407 * this also gives a method of "bypassing" the "VERIFY_TIMESTAMP" code.
410 #if defined(MACINTOSH) || defined(WINDOWS) || defined(AMIGA)
411 # define SAVEFILE_MUTABLE
416 * OPTION: Capitalize the "user_name" (for "default" player name)
417 * This option is only relevant on SET_UID machines.
419 #define CAPITALIZE_USER_NAME
424 * OPTION: Person to bother if something goes wrong.
426 /* #define MAINTAINER "rr9@angband.org" */
427 #define MAINTAINER "echizen@users.sourceforge.jp"
433 * OPTION: Default font (when using X11).
435 #define DEFAULT_X11_FONT "a24"
436 #define DEFAULT_X11_KFONT "kanji24"
437 #define DEFAULT_X11_FONT_SUB "a16"
438 #define DEFAULT_X11_KFONT_SUB "kanji16"
442 * OPTION: Default fonts (when using X11)
444 #define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
445 #define DEFAULT_X11_KFONT_0 DEFAULT_X11_KFONT
446 #define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
447 #define DEFAULT_X11_KFONT_1 DEFAULT_X11_KFONT_SUB
448 #define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
449 #define DEFAULT_X11_KFONT_2 DEFAULT_X11_KFONT_SUB
450 #define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
451 #define DEFAULT_X11_KFONT_3 DEFAULT_X11_KFONT_SUB
452 #define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
453 #define DEFAULT_X11_KFONT_4 DEFAULT_X11_KFONT_SUB
454 #define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
455 #define DEFAULT_X11_KFONT_5 DEFAULT_X11_KFONT_SUB
456 #define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
457 #define DEFAULT_X11_KFONT_6 DEFAULT_X11_KFONT_SUB
458 #define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
459 #define DEFAULT_X11_KFONT_7 DEFAULT_X11_KFONT_SUB
463 * OPTION: Default font (when using X11).
465 #define DEFAULT_X11_FONT \
466 "-*-*-medium-r-normal--24-*-*-*-*-*-iso8859-1" \
467 ",-*-*-medium-r-normal--24-*-*-*-*-*-jisx0208.1983-0"
470 #define DEFAULT_X11_FONT_SUB \
471 "-*-*-medium-r-normal--16-*-*-*-*-*-iso8859-1" \
472 ",-*-*-medium-r-normal--16-*-*-*-*-*-jisx0208.1983-0"
477 * OPTION: Default fonts (when using X11)
479 #define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
480 #define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
481 #define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
482 #define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
483 #define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
484 #define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
485 #define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
486 #define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
491 * OPTION: Default font (when using X11).
493 #define DEFAULT_X11_FONT "9x15"
496 * OPTION: Default fonts (when using X11)
498 #define DEFAULT_X11_FONT_0 "10x20"
499 #define DEFAULT_X11_FONT_1 "9x15"
500 #define DEFAULT_X11_FONT_2 "9x15"
501 #define DEFAULT_X11_FONT_3 "5x8"
502 #define DEFAULT_X11_FONT_4 "5x8"
503 #define DEFAULT_X11_FONT_5 "5x8"
504 #define DEFAULT_X11_FONT_6 "5x8"
505 #define DEFAULT_X11_FONT_7 "5x8"
510 * OPTION: Gamma correct X11 colours.
513 #define SUPPORT_GAMMA
516 * Hack -- Special "ancient machine" versions
518 #if defined(USE_286) || defined(ANGBAND_LITE_MAC)
519 # ifndef ANGBAND_LITE
520 # define ANGBAND_LITE
525 * OPTION: Attempt to minimize the size of the game
528 /* #define ANGBAND_LITE */
532 * Hack -- React to the "ANGBAND_LITE" flag
536 # undef ALLOW_VISUALS
538 # undef ALLOW_OLD_SAVEFILES
541 # undef ALLOW_SPOILERS
542 # undef ALLOW_TEMPLATES
543 # undef DELAY_LOAD_R_TEXT
544 # define DELAY_LOAD_R_TEXT
550 * OPTION: Attempt to prevent all "cheating"
552 /* #define VERIFY_HONOR */
556 * React to the "VERIFY_HONOR" flag
559 # define VERIFY_SAVEFILE
560 # define VERIFY_CHECKSUMS
561 # define VERIFY_TIMESTAMPS
564 /* Zangband options: */
566 /* Allow hordes of 'similar' monsters */
567 # define MONSTER_HORDES
569 /* Wizard mode testing options: */
572 /* # define TRACK_FRIENDS */
575 * OPTION: Repeat last command -- TNB
580 * OPTION: Make opening and closing things easy -- TNB
582 #define ALLOW_EASY_OPEN
585 * OPTION: Make disarming traps easy -- TNB
587 #define ALLOW_EASY_DISARM
590 * OPTION: Make floor stacks easy -- TNB
592 #define ALLOW_EASY_FLOOR
595 * Check the modification time of *_info.raw files
599 #define CHECK_MODIFICATION_TIME
603 * Use the new sorting routines for creation
604 * of the monster allocation table
609 * Use a scripting language
611 /* #define USE_SCRIPT */
615 * Python is statically linked into ZAngband
617 # define STATIC_PYTHON
618 /* # define SCRIPT_OBJ_KIND */
619 #endif /* USE_SCRIPT */
621 #ifndef HAVE_CONFIG_H
625 #endif /* HAVE_CONFIG_H */