OSDN Git Service

z-config.h内の無意味なオプション用マクロを削除。
[hengband/hengband.git] / src / z-config.h
1 /* File: z-config.h */
2
3 /*
4  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
5  *
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.
9  */
10
11 /* Purpose: Angband specific configuration stuff */
12
13 /* Allow debug commands */
14 #define USE_DEBUG
15
16 /* Allow various special stuff (sound, graphics, etc.) */
17 #define USE_SPECIAL
18
19 #ifndef HAVE_CONFIG_H
20
21 /*
22  * USE_FONTSET and/or USE_XIM can be commented out
23  * when you don't want to use it.
24  */
25 #ifdef JP
26 #define USE_FONTSET
27 #define USE_XIM
28 #endif
29
30 #if defined(USE_FONTSET) || defined(USE_XIM)
31 #define USE_LOCALE
32 #endif
33
34 #if defined(JP) && !defined(USE_FONTSET)
35 #define _JP
36 #endif
37
38 #endif /* HAVE_CONFIG_H */
39
40
41 /*
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".
46  *
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.
50  *
51  * And finally, remember that the "Makefile" will specify some rather
52  * important compile time options, like what visual module to use.
53  */
54
55
56 /*
57  * OPTION: See the Makefile(s), where several options may be declared.
58  *
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).
63  *
64  * The old "USE_NCU" option has been replaced with "USE_GCU".
65  *
66  * Several other such options are available for non-unix machines,
67  * such as "MACINTOSH", "WINDOWS", "USE_IBM", "USE_EMX".
68  *
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.
71  */
72
73
74 /*
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"
77  */
78 /* #define SPECIAL_BSD */
79
80
81 /*
82  * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
83  */
84 /* #define USE_TPOSIX */
85
86 /*
87  * OPTION: Use the "termio" methods in "main-gcu.c"
88  */
89 /* #define USE_TERMIO */
90
91 /*
92  * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
93  */
94 /* #define USE_TCHARS */
95
96
97 /*
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.
102  */
103 #if defined(SYS_V) || defined(AMIGA)
104 # define USE_GETCH
105 #endif
106
107
108 /*
109  * OPTION: Use the "curs_set()" call in "main-gcu.c".
110  * Hack -- This option will not work on most BSD machines
111  */
112 #ifdef SYS_V
113 # define USE_CURS_SET
114 #endif
115
116
117 /*
118  * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
119  */
120 /* #define USE_NCURSES */
121
122
123 /*
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.
129  *
130  * This will handle "gids" correctly once the permissions are set right.
131  */
132 #define SAFE_SETUID
133
134
135 /*
136  * This flag enables the "POSIX" methods for "SAFE_SETUID".
137  */
138 #ifdef _POSIX_SAVED_IDS
139 # define SAFE_SETUID_POSIX
140 #endif
141
142
143 /*
144  * Prevent problems on (non-Solaris) Suns using "SAFE_SETUID".
145  * The SAFE_SETUID code is weird, use it at your own risk...
146  */
147 #if defined(SUNOS) && !defined(SOLARIS)
148 # undef SAFE_SETUID_POSIX
149 #endif
150
151
152
153
154 /*
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.
162  */
163 /* #define SECURE */
164
165
166
167
168 /*
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.
172  */
173 #define VERIFY_CHECKSUMS
174
175
176 /*
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.
185  */
186 /* #define VERIFY_TIMESTAMP */
187
188
189 /*
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.
195  */
196 /* #define VERIFY_SAVEFILE */
197
198
199
200 /*
201  * OPTION: Hack -- Compile in support for "Cyborg" mode
202  */
203 /*#define ALLOW_BORG*/
204
205 #ifdef USE_DEBUG
206
207 /*
208  * OPTION: Hack -- Compile in support for "Wizard Commands"
209  */
210 #define ALLOW_WIZARD
211
212 /*
213  * OPTION: Hack -- Compile in support for "Spoiler Generation"
214  */
215 #define ALLOW_SPOILERS
216
217 #endif /* USE_DEBUG */
218
219 /*
220  * OPTION: Allow "do_cmd_colors" at run-time
221  */
222 #define ALLOW_COLORS
223
224 /*
225  * OPTION: Allow "do_cmd_visuals" at run-time
226  */
227 #define ALLOW_VISUALS
228
229 /*
230  * OPTION: Allow "do_cmd_macros" at run-time
231  */
232 #define ALLOW_MACROS
233
234 /*
235  * OPTION: Allow characteres to be "auto-rolled"
236  */
237 #define ALLOW_AUTOROLLER
238
239
240 /*
241  * OPTION: Allow monsters to "flee" when hit hard
242  */
243 #define ALLOW_FEAR
244
245 /*
246  * OPTION: Allow monsters to "flee" from strong players
247  */
248 #define ALLOW_TERROR
249
250
251 /*
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".
255  */
256 #define ALLOW_TEMPLATES
257
258 /*
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.
262  */
263 #define ALLOW_OLD_SAVEFILES
264
265
266 /*
267  * OPTION: Delay the loading of the "f_text" array until it is actually
268  * needed, saving ~1K, since "feature" descriptions are unused.
269  */
270 #define DELAY_LOAD_F_TEXT
271
272 /*
273  * OPTION: Delay the loading of the "k_text" array until it is actually
274  * needed, saving ~1K, since "object" descriptions are unused.
275  */
276 #define DELAY_LOAD_K_TEXT
277
278 /*
279  * OPTION: Delay the loading of the "a_text" array until it is actually
280  * needed, saving ~1K, since "artifact" descriptions are unused.
281  */
282 #ifndef JP
283 #define DELAY_LOAD_A_TEXT
284 #endif
285
286 /*
287  * OPTION: Delay the loading of the "e_text" array until it is actually
288  * needed, saving ~1K, since "ego-item" descriptions are unused.
289  */
290 #define DELAY_LOAD_E_TEXT
291
292 /*
293  * OPTION: Delay the loading of the "r_text" array until it is actually
294  * needed, saving ~60K, but "simplifying" the "monster" descriptions.
295  */
296 /* #define DELAY_LOAD_R_TEXT */
297
298 /*
299  * OPTION: Delay the loading of the "d_text" array until it is actually
300  * needed, saving ~1K, since "dungeon" descriptions are unused.
301  */
302 /* #define DELAY_LOAD_D_TEXT */
303
304 /*
305  * OPTION: Delay the loading of the "v_text" array until it is actually
306  * needed, saving ~1K, but "destroying" the "vault" generation.
307  */
308 /* #define DELAY_LOAD_V_TEXT */
309
310
311 /*
312  * OPTION: Handle signals
313  */
314 #define HANDLE_SIGNALS
315
316
317 /*
318  * Allow "Wizards" to yield "high scores"
319  */
320 /* #define SCORE_WIZARDS */
321
322 /*
323  * Allow "Borgs" to yield "high scores"
324  */
325 /*#define SCORE_BORGS*/
326
327 /*
328  * Allow "Cheaters" to yield "high scores"
329  */
330 /* #define SCORE_CHEATERS */
331
332
333
334 /*
335  * OPTION: Maximum flow depth when using "MONSTER_FLOW"
336  */
337 #define MONSTER_FLOW_DEPTH 32
338
339
340 #ifdef USE_SPECIAL
341
342 /*
343  * OPTION: Allow the use of "sound" in various places.
344  */
345 #define USE_SOUND
346
347 /*
348  * OPTION: Allow the use of "graphics" in various places
349  */
350 #define USE_GRAPHICS
351
352 /*
353  * OPTION: Allow the use of "music" in various places
354  */
355 /* #define USE_MUSIC */
356
357 #endif /* USE_SPECIAL */
358
359 /*
360  * OPTION: Hack -- Macintosh stuff
361  */
362 #ifdef MACINTOSH
363
364 /* Do not handle signals */
365 # undef HANDLE_SIGNALS
366
367 #endif
368
369
370 /*
371  * OPTION: Hack -- Windows stuff
372  */
373 #ifdef WINDOWS
374
375 /* Do not handle signals */
376 # undef HANDLE_SIGNALS
377
378 #endif
379
380
381 /*
382  * OPTION: Hack -- EMX stuff
383  */
384 #ifdef USE_EMX
385
386 /* Do not handle signals */
387 # undef HANDLE_SIGNALS
388
389 #endif
390
391
392 /*
393  * OPTION: Set the "default" path to the angband "lib" directory.
394  *
395  * See "main.c" for usage, and note that this value is only used on
396  * certain machines, primarily Unix machines.  If this value is used,
397  * it will be over-ridden by the "ANGBAND_PATH" environment variable,
398  * if that variable is defined and accessable.  The final slash is
399  * optional, but it may eventually be required.
400  *
401  * Using the value "./lib/" below tells Angband that, by default,
402  * the user will run "angband" from the same directory that contains
403  * the "lib" directory.  This is a reasonable (but imperfect) default.
404  *
405  * If at all possible, you should change this value to refer to the
406  * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
407  * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
408  */
409 #ifndef DEFAULT_PATH
410 # define DEFAULT_PATH "./lib/"
411 #endif
412
413
414 /*
415  * OPTION: Create and use a hidden directory in the users home directory
416  * for storing pref-files and character-dumps.
417  */
418 #ifdef SET_UID
419 #define PRIVATE_USER_PATH "~/.angband"
420 #endif /* SET_UID */
421
422
423 /*
424  * On multiuser systems, add the "uid" to savefile names
425  */
426 #ifdef SET_UID
427 # define SAVEFILE_USE_UID
428 #endif
429
430
431 /*
432  * OPTION: Check the "time" against "lib/file/hours.txt"
433  */
434 /* #define CHECK_TIME */
435
436 /*
437  * OPTION: Check the "load" against "lib/file/load.txt"
438  * This may require the 'rpcsvs' library
439  */
440 /* #define CHECK_LOAD */
441
442
443 /*
444  * OPTION: For some brain-dead computers with no command line interface,
445  * namely Macintosh, there has to be some way of "naming" your savefiles.
446  * The current "Macintosh" hack is to make it so whenever the character
447  * name changes, the savefile is renamed accordingly.  But on normal
448  * machines, once you manage to "load" a savefile, it stays that way.
449  * Macintosh is particularly weird because you can load savefiles that
450  * are not contained in the "lib:save:" folder, and if you change the
451  * player's name, it will then save the savefile elsewhere.  Note that
452  * this also gives a method of "bypassing" the "VERIFY_TIMESTAMP" code.
453  */
454 /*
455 #if defined(MACINTOSH) || defined(WINDOWS) || defined(AMIGA)
456 # define SAVEFILE_MUTABLE
457 #endif
458 */
459
460 /*
461  * OPTION: Capitalize the "user_name" (for "default" player name)
462  * This option is only relevant on SET_UID machines.
463  */
464 #define CAPITALIZE_USER_NAME
465
466
467
468 /*
469  * OPTION: Person to bother if something goes wrong.
470  */
471 /* #define MAINTAINER   "rr9@angband.org" */
472 #define MAINTAINER      "echizen@users.sourceforge.jp"
473
474
475 #ifdef JP
476 #ifndef USE_FONTSET
477 /*
478  * OPTION: Default font (when using X11).
479  */
480 #define DEFAULT_X11_FONT  "a24"
481 #define DEFAULT_X11_KFONT "kanji24"
482 #define DEFAULT_X11_FONT_SUB  "a16"
483 #define DEFAULT_X11_KFONT_SUB "kanji16"
484
485
486 /*
487  * OPTION: Default fonts (when using X11)
488  */
489 #define DEFAULT_X11_FONT_0  DEFAULT_X11_FONT
490 #define DEFAULT_X11_KFONT_0 DEFAULT_X11_KFONT
491 #define DEFAULT_X11_FONT_1  DEFAULT_X11_FONT_SUB
492 #define DEFAULT_X11_KFONT_1 DEFAULT_X11_KFONT_SUB
493 #define DEFAULT_X11_FONT_2  DEFAULT_X11_FONT_SUB
494 #define DEFAULT_X11_KFONT_2 DEFAULT_X11_KFONT_SUB
495 #define DEFAULT_X11_FONT_3  DEFAULT_X11_FONT_SUB
496 #define DEFAULT_X11_KFONT_3 DEFAULT_X11_KFONT_SUB
497 #define DEFAULT_X11_FONT_4  DEFAULT_X11_FONT_SUB
498 #define DEFAULT_X11_KFONT_4 DEFAULT_X11_KFONT_SUB
499 #define DEFAULT_X11_FONT_5  DEFAULT_X11_FONT_SUB
500 #define DEFAULT_X11_KFONT_5 DEFAULT_X11_KFONT_SUB
501 #define DEFAULT_X11_FONT_6  DEFAULT_X11_FONT_SUB
502 #define DEFAULT_X11_KFONT_6 DEFAULT_X11_KFONT_SUB
503 #define DEFAULT_X11_FONT_7  DEFAULT_X11_FONT_SUB
504 #define DEFAULT_X11_KFONT_7 DEFAULT_X11_KFONT_SUB
505
506 #else
507 /*
508  * OPTION: Default font (when using X11).
509  */
510 #define DEFAULT_X11_FONT \
511         "-*-*-medium-r-normal--24-*-*-*-*-*-iso8859-1" \
512         ",-*-*-medium-r-normal--24-*-*-*-*-*-jisx0208.1983-0"
513 /*      "12x24" \
514         ",kanji24"*/
515 #define DEFAULT_X11_FONT_SUB \
516         "-*-*-medium-r-normal--16-*-*-*-*-*-iso8859-1" \
517         ",-*-*-medium-r-normal--16-*-*-*-*-*-jisx0208.1983-0"
518 /*      "8x16" \
519         ",kanji16"*/
520
521 /*
522  * OPTION: Default fonts (when using X11)
523  */
524 #define DEFAULT_X11_FONT_0              DEFAULT_X11_FONT
525 #define DEFAULT_X11_FONT_1              DEFAULT_X11_FONT_SUB
526 #define DEFAULT_X11_FONT_2              DEFAULT_X11_FONT_SUB
527 #define DEFAULT_X11_FONT_3              DEFAULT_X11_FONT_SUB
528 #define DEFAULT_X11_FONT_4              DEFAULT_X11_FONT_SUB
529 #define DEFAULT_X11_FONT_5              DEFAULT_X11_FONT_SUB
530 #define DEFAULT_X11_FONT_6              DEFAULT_X11_FONT_SUB
531 #define DEFAULT_X11_FONT_7              DEFAULT_X11_FONT_SUB
532 #endif
533
534 #else
535 /*
536  * OPTION: Default font (when using X11).
537  */
538 #define DEFAULT_X11_FONT                "9x15"
539
540 /*
541  * OPTION: Default fonts (when using X11)
542  */
543 #define DEFAULT_X11_FONT_0              "10x20"
544 #define DEFAULT_X11_FONT_1              "9x15"
545 #define DEFAULT_X11_FONT_2              "9x15"
546 #define DEFAULT_X11_FONT_3              "5x8"
547 #define DEFAULT_X11_FONT_4              "5x8"
548 #define DEFAULT_X11_FONT_5              "5x8"
549 #define DEFAULT_X11_FONT_6              "5x8"
550 #define DEFAULT_X11_FONT_7              "5x8"
551 #endif
552
553
554 /*
555  * OPTION: Gamma correct X11 colours.
556  */
557  
558 #define SUPPORT_GAMMA
559
560 /*
561  * Hack -- Special "ancient machine" versions
562  */
563 #if defined(USE_286) || defined(ANGBAND_LITE_MAC)
564 # ifndef ANGBAND_LITE
565 #  define ANGBAND_LITE
566 # endif
567 #endif
568
569 /*
570  * OPTION: Attempt to minimize the size of the game
571  */
572 #ifndef ANGBAND_LITE
573 /* #define ANGBAND_LITE */
574 #endif
575
576 /*
577  * Hack -- React to the "ANGBAND_LITE" flag
578  */
579 #ifdef ANGBAND_LITE
580 # undef ALLOW_COLORS
581 # undef ALLOW_VISUALS
582 # undef ALLOW_MACROS
583 # undef ALLOW_OLD_SAVEFILES
584 # undef ALLOW_BORG
585 # undef ALLOW_WIZARD
586 # undef ALLOW_SPOILERS
587 # undef ALLOW_TEMPLATES
588 # undef DELAY_LOAD_R_TEXT
589 # define DELAY_LOAD_R_TEXT
590 #endif
591
592
593
594 /*
595  * OPTION: Attempt to prevent all "cheating"
596  */
597 /* #define VERIFY_HONOR */
598
599
600 /*
601  * React to the "VERIFY_HONOR" flag
602  */
603 #ifdef VERIFY_HONOR
604 # define VERIFY_SAVEFILE
605 # define VERIFY_CHECKSUMS
606 # define VERIFY_TIMESTAMPS
607 #endif
608
609 /* Zangband options: */
610
611 /* Allow hordes of 'similar' monsters */
612 # define MONSTER_HORDES
613
614 /* Wizard mode testing options: */
615
616 /* Testing upkeep */
617 /* # define TRACK_FRIENDS */
618
619 /*
620  * OPTION: Repeat last command -- TNB
621  */
622 #define ALLOW_REPEAT
623
624 /*
625  * OPTION: Make opening and closing things easy -- TNB
626  */
627 #define ALLOW_EASY_OPEN
628
629 /*
630  * OPTION: Make disarming traps easy -- TNB
631  */
632 #define ALLOW_EASY_DISARM
633
634 /*
635  * OPTION: Make floor stacks easy -- TNB
636  */
637 #define ALLOW_EASY_FLOOR
638
639 /*
640  * Check the modification time of *_info.raw files
641  * (by Keldon Jones)
642  */
643 #ifndef MAC_MPW
644 #define CHECK_MODIFICATION_TIME
645 #endif
646
647 /*
648  * Use the new sorting routines for creation
649  * of the monster allocation table
650  */
651 #define SORT_R_INFO
652
653 /*
654  * Use a scripting language
655  */
656 /* #define USE_SCRIPT */
657
658 #ifdef USE_SCRIPT
659 /*
660  * Python is statically linked into ZAngband
661  */
662 # define STATIC_PYTHON
663 /* # define SCRIPT_OBJ_KIND */
664 #endif /* USE_SCRIPT */
665
666 #ifndef HAVE_CONFIG_H
667 #ifndef MSDOS
668 #define WORLD_SCORE
669 #endif
670 #endif /* HAVE_CONFIG_H */