• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision43fddf087e2b32cfa73f155d764cfa3dd06e1b45 (tree)
Time2019-06-12 07:39:04
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 z-config.h を h-config.h へ合流.

Change Summary

Incremental Difference

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -400,7 +400,6 @@
400400 <ClInclude Include="..\..\src\warning.h" />
401401 <ClInclude Include="..\..\src\wild.h" />
402402 <ClInclude Include="..\..\src\world.h" />
403- <ClInclude Include="..\..\src\z-config.h" />
404403 <ClInclude Include="..\..\src\z-form.h" />
405404 <ClInclude Include="..\..\src\z-rand.h" />
406405 <ClInclude Include="..\..\src\z-term.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -407,7 +407,6 @@
407407 <ClInclude Include="..\..\src\h-type.h" />
408408 <ClInclude Include="..\..\src\init.h" />
409409 <ClInclude Include="..\..\src\readdib.h" />
410- <ClInclude Include="..\..\src\z-config.h" />
411410 <ClInclude Include="..\..\src\z-form.h" />
412411 <ClInclude Include="..\..\src\z-term.h" />
413412 <ClInclude Include="..\..\src\warning.h" />
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,7 +92,6 @@ hengband_SOURCES = \
9292 \
9393 view-mainwindow.c view-mainwindow.h targeting.c \
9494 \
95- z-config.h \
9695 z-form.c z-form.h z-rand.c z-rand.h z-term.c z-term.h z-util.c z-util.h \
9796 z-virt.c z-virt.h
9897
--- a/src/angband.h
+++ b/src/angband.h
@@ -37,8 +37,6 @@
3737 /*
3838 * Include the "Angband" configuration header
3939 */
40-#include "z-config.h"
41-
4240 #include "gamevalue.h"
4341 #include "gameoption.h"
4442
--- a/src/h-config.h
+++ b/src/h-config.h
@@ -1,6 +1,6 @@
11 /*!
22 * @file h-config.h
3- * @brief 変愚時追加された基本事項のヘッダーファイル /
3+ * @brief 主に変愚/Zang時追加された基本事項のヘッダーファイル /
44 * The most basic "include" file. This file simply includes other low level header files.
55 * @date 2014/08/15
66 * @author
@@ -14,13 +14,16 @@
1414 * options in the "Makefile", especially any options describing
1515 * what "system" is being used.
1616 * no system definitions are needed for 4.3BSD, SUN OS, DG/UX
17- * </pre>
18- */
17+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
18+ *
19+ * This software may be copied and distributed for educational, research,
20+ * and not for profit purposes provided that this copyright and statement
21+ * are included in all such copies. Other copyrights may also apply.
22+*/
1923
2024 #ifndef INCLUDED_H_CONFIG_H
2125 #define INCLUDED_H_CONFIG_H
2226
23-
2427 /*
2528 * OPTION: Compile on a Macintosh (see "A-mac-h" or "A-mac-pch")
2629 * Automatic for Mac MPW compilation
@@ -262,3 +265,500 @@
262265 #endif
263266
264267 #endif /* INCLUDED_H_CONFIG_H */
268+
269+
270+/* Allow debug commands */
271+#define USE_DEBUG
272+
273+/* Allow various special stuff (sound, graphics, etc.) */
274+#define USE_SPECIAL
275+
276+#ifndef HAVE_CONFIG_H
277+
278+/*
279+ * USE_FONTSET and/or USE_XIM can be commented out
280+ * when you don't want to use it.
281+ */
282+#define USE_FONTSET
283+
284+#ifdef JP
285+#define USE_XIM
286+#endif
287+
288+#if defined(USE_FONTSET) || defined(USE_XIM)
289+#define USE_LOCALE
290+#endif
291+
292+#if defined(JP) && !defined(USE_FONTSET)
293+#define USE_JP_FONTSTRUCT
294+#endif
295+
296+#endif /* HAVE_CONFIG_H */
297+
298+
299+/*
300+ * Look through the following lines, and where a comment includes the
301+ * tag "OPTION:", examine the associated "#define" statements, and decide
302+ * whether you wish to keep, comment, or uncomment them. You should not
303+ * have to modify any lines not indicated by "OPTION".
304+ *
305+ * Note: Also examine the "system" configuration file "h-config.h"
306+ * and the variable initialization file "variable.c". If you change
307+ * anything in "variable.c", you only need to recompile that file.
308+ *
309+ * And finally, remember that the "Makefile" will specify some rather
310+ * important compile time options, like what visual module to use.
311+ */
312+
313+
314+/*
315+ * OPTION: See the Makefile(s), where several options may be declared.
316+ *
317+ * Some popular options include "USE_GCU" (allow use with Unix "curses"),
318+ * "USE_X11" (allow basic use with Unix X11), "USE_XAW" (allow use with
319+ * Unix X11 plus the Athena Widget set), and "USE_CAP" (allow use with
320+ * the "termcap" library, or with hard-coded vt100 terminals).
321+ *
322+ * The old "USE_NCU" option has been replaced with "USE_GCU".
323+ *
324+ * Several other such options are available for non-unix machines,
325+ * such as "MACINTOSH", "WINDOWS", "USE_IBM".
326+ *
327+ * You may also need to specify the "system", using defines such as
328+ * "SOLARIS" (for Solaris), etc, see "h-config.h" for more info.
329+ */
330+
331+
332+/*
333+ * OPTION: define "SPECIAL_BSD" for using certain versions of UNIX
334+ * that use the 4.4BSD Lite version of Curses in "main-gcu.c"
335+ */
336+/* #define SPECIAL_BSD */
337+
338+
339+/*
340+ * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
341+ */
342+/* #define USE_TPOSIX */
343+
344+/*
345+ * OPTION: Use the "termio" methods in "main-gcu.c"
346+ */
347+/* #define USE_TERMIO */
348+
349+/*
350+ * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
351+ */
352+/* #define USE_TCHARS */
353+
354+/*
355+ * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
356+ */
357+/* #define USE_NCURSES */
358+
359+
360+/*
361+ * OPTION: for multi-user machines running the game setuid to some other
362+ * user (like 'games') this SAFE_SETUID option allows the program to drop
363+ * its privileges when saving files that allow for user specified pathnames.
364+ * This lets the game be installed system wide without major security
365+ * concerns. There should not be any side effects on any machines.
366+ *
367+ * This will handle "gids" correctly once the permissions are set right.
368+ */
369+#define SAFE_SETUID
370+
371+
372+/*
373+ * This flag enables the "POSIX" methods for "SAFE_SETUID".
374+ */
375+#ifdef _POSIX_SAVED_IDS
376+# define SAFE_SETUID_POSIX
377+#endif
378+
379+
380+/*
381+ * Prevent problems on (non-Solaris) Suns using "SAFE_SETUID".
382+ * The SAFE_SETUID code is weird, use it at your own risk...
383+ */
384+#if !defined(SOLARIS)
385+# undef SAFE_SETUID_POSIX
386+#endif
387+
388+
389+
390+
391+/*
392+ * OPTION: for the AFS distributed file system, define this to ensure that
393+ * the program is secure with respect to the setuid code. This option has
394+ * not been tested (to the best of my knowledge). This option may require
395+ * some weird tricks with "p_ptr->player_uid" and such involving "defines".
396+ * Note that this option used the AFS library routines Authenticate(),
397+ * bePlayer(), beGames() to enforce the proper priviledges.
398+ * You may need to current_world_ptr->game_turn "SAFE_SETUID" off to use this option.
399+ */
400+/* #define SECURE */
401+
402+
403+
404+
405+/*
406+ * OPTION: Verify savefile Checksums (Angband 2.7.0 and up)
407+ * This option can help prevent "corruption" of savefiles, and also
408+ * stop intentional modification by amateur users.
409+ */
410+#define VERIFY_CHECKSUMS
411+
412+
413+/*
414+ * OPTION: Forbid the use of "fiddled" savefiles. As far as I can tell,
415+ * a fiddled savefile is one with an internal timestamp different from
416+ * the actual timestamp. Thus, turning this option on forbids one from
417+ * copying a savefile to a different name. Combined with disabling the
418+ * ability to save the game without quitting, and with some method of
419+ * stopping the user from killing the process at the tombstone screen,
420+ * this should prevent the use of backup savefiles. It may also stop
421+ * the use of savefiles from other platforms, so be careful.
422+ */
423+/* #define VERIFY_TIMESTAMP */
424+
425+
426+/*
427+ * OPTION: Forbid the "savefile over-write" cheat, in which you simply
428+ * run another copy of the game, loading a previously saved savefile,
429+ * and let that copy over-write the "dead" savefile later. This option
430+ * either locks the savefile, or creates a fake "xxx.lok" file to prevent
431+ * the use of the savefile until the file is deleted. Not ready yet.
432+ */
433+/* #define VERIFY_SAVEFILE */
434+
435+
436+
437+/*
438+ * OPTION: Hack -- Compile in support for "Cyborg" mode
439+ */
440+/*#define ALLOW_BORG*/
441+
442+#ifdef USE_DEBUG
443+
444+/*!
445+ * @brief ウィザードモードへの移行を許可する / OPTION: Hack -- Compile in support for "Wizard Commands"
446+ */
447+#define ALLOW_WIZARD
448+
449+/*!
450+ * @brief スポイラー出力を許可する / OPTION: Hack -- Compile in support for "Spoiler Generation"
451+ */
452+#define ALLOW_SPOILERS
453+
454+#endif /* USE_DEBUG */
455+
456+/*!
457+ * @brief キャラクターの色変更機能を付加する / OPTION: Allow "do_cmd_colors" at run-time
458+ */
459+#define ALLOW_COLORS
460+
461+/*!
462+ * @brief キャラクターのシンボル変更機能を付加する / OPTION: Allow "do_cmd_visuals" at run-time
463+ */
464+#define ALLOW_VISUALS
465+
466+/*!
467+ * @brief マクロ機能を付加する / OPTION: Allow "do_cmd_macros" at run-time
468+ */
469+#define ALLOW_MACROS
470+
471+/*!
472+ * @brief オートローラー機能を付加する / OPTION: Allow characteres to be "auto-rolled"
473+ */
474+#define ALLOW_AUTOROLLER
475+
476+/*!
477+ * @brief 一定以上のダメージを受けたモンスターが恐怖して逃走する / OPTION: Allow monsters to "flee" when hit hard
478+ */
479+#define ALLOW_FEAR
480+
481+/*!
482+ * @brief 一定以上のレベルを持ったプレイヤーが相手ならば、弱いモンスターは逃げ出す/ OPTION: Allow monsters to "flee" from strong players
483+ */
484+#define ALLOW_TERROR
485+
486+
487+/*
488+ * OPTION: Allow parsing of the ascii template files in "init.c".
489+ * This must be defined if you do not have valid binary image files.
490+ * It should be usually be defined anyway to allow easy "updating".
491+ */
492+#define ALLOW_TEMPLATES
493+
494+/*
495+ * OPTION: Allow loading of pre-2.7.0 savefiles. Note that it takes
496+ * about 15K of code in "save-old.c" to parse the old savefile format.
497+ * Angband 2.8.0 will ignore a lot of info from pre-2.7.0 savefiles.
498+ */
499+#define ALLOW_OLD_SAVEFILES
500+
501+
502+/*
503+ * OPTION: Handle signals
504+ */
505+#define HANDLE_SIGNALS
506+
507+
508+/*
509+ * Allow "Wizards" to yield "high scores"
510+ */
511+/* #define SCORE_WIZARDS */
512+
513+/*
514+ * Allow "Borgs" to yield "high scores"
515+ */
516+/*#define SCORE_BORGS*/
517+
518+/*
519+ * Allow "Cheaters" to yield "high scores"
520+ */
521+/* #define SCORE_CHEATERS */
522+
523+
524+
525+/*
526+ * OPTION: Maximum flow depth when using "MONSTER_FLOW"
527+ */
528+#define MONSTER_FLOW_DEPTH 32
529+
530+
531+#ifdef USE_SPECIAL
532+
533+/*
534+ * OPTION: Allow the use of "sound" in various places.
535+ */
536+#define USE_SOUND
537+
538+/*
539+ * OPTION: Allow the use of "graphics" in various places
540+ */
541+#define USE_GRAPHICS
542+
543+/*
544+ * OPTION: Allow the use of "music" in various places
545+ */
546+#define USE_MUSIC
547+
548+#endif /* USE_SPECIAL */
549+
550+
551+/*
552+ * OPTION: Set the "default" path to the angband "lib" directory.
553+ *
554+ * See "main.c" for usage, and note that this value is only used on
555+ * certain machines, primarily Unix machines. If this value is used,
556+ * it will be over-ridden by the "ANGBAND_PATH" environment variable,
557+ * if that variable is defined and accessable. The final slash is
558+ * optional, but it may eventually be required.
559+ *
560+ * Using the value "./lib/" below tells Angband that, by default,
561+ * the user will run "angband" from the same directory that contains
562+ * the "lib" directory. This is a reasonable (but imperfect) default.
563+ *
564+ * If at all possible, you should change this value to refer to the
565+ * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
566+ * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
567+ */
568+#ifndef DEFAULT_PATH
569+# define DEFAULT_PATH "./lib/"
570+#endif
571+
572+
573+/*
574+ * OPTION: Create and use a hidden directory in the users home directory
575+ * for storing pref-files and character-dumps.
576+ */
577+#ifdef SET_UID
578+#define PRIVATE_USER_PATH "~/.angband"
579+#endif /* SET_UID */
580+
581+
582+/*
583+ * On multiuser systems, add the "uid" to savefile names
584+ */
585+#ifdef SET_UID
586+# define SAVEFILE_USE_UID
587+#endif
588+
589+
590+/*
591+ * OPTION: Check the "time" against "lib/file/hours.txt"
592+ */
593+/* #define CHECK_TIME */
594+
595+/*
596+ * OPTION: Check the "load" against "lib/file/load.txt"
597+ * This may require the 'rpcsvs' library
598+ */
599+/* #define CHECK_LOAD */
600+
601+
602+/*
603+ * OPTION: For some brain-dead computers with no command line interface,
604+ * namely Macintosh, there has to be some way of "naming" your savefiles.
605+ * The current "Macintosh" hack is to make it so whenever the character
606+ * name changes, the savefile is renamed accordingly. But on normal
607+ * machines, once you manage to "load" a savefile, it stays that way.
608+ * Macintosh is particularly weird because you can load savefiles that
609+ * are not contained in the "lib:save:" folder, and if you change the
610+ * player's name, it will then save the savefile elsewhere. Note that
611+ * this also gives a method of "bypassing" the "VERIFY_TIMESTAMP" code.
612+ */
613+/*
614+#if defined(MACINTOSH) || defined(WINDOWS)
615+# define SAVEFILE_MUTABLE
616+#endif
617+*/
618+
619+/*
620+ * OPTION: Capitalize the "user_name" (for "default" player name)
621+ * This option is only relevant on SET_UID machines.
622+ */
623+#define CAPITALIZE_USER_NAME
624+
625+
626+
627+/*
628+ * OPTION: Person to bother if something goes wrong.
629+ */
630+/* #define MAINTAINER "rr9@angband.org" */
631+#define MAINTAINER "echizen@users.sourceforge.jp"
632+
633+
634+#ifdef JP
635+#ifndef USE_FONTSET
636+/*
637+ * OPTION: Default font (when using X11).
638+ */
639+#define DEFAULT_X11_FONT "a24"
640+#define DEFAULT_X11_KFONT "kanji24"
641+#define DEFAULT_X11_FONT_SUB "a16"
642+#define DEFAULT_X11_KFONT_SUB "kanji16"
643+
644+
645+/*
646+ * OPTION: Default fonts (when using X11)
647+ */
648+#define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
649+#define DEFAULT_X11_KFONT_0 DEFAULT_X11_KFONT
650+#define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
651+#define DEFAULT_X11_KFONT_1 DEFAULT_X11_KFONT_SUB
652+#define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
653+#define DEFAULT_X11_KFONT_2 DEFAULT_X11_KFONT_SUB
654+#define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
655+#define DEFAULT_X11_KFONT_3 DEFAULT_X11_KFONT_SUB
656+#define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
657+#define DEFAULT_X11_KFONT_4 DEFAULT_X11_KFONT_SUB
658+#define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
659+#define DEFAULT_X11_KFONT_5 DEFAULT_X11_KFONT_SUB
660+#define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
661+#define DEFAULT_X11_KFONT_6 DEFAULT_X11_KFONT_SUB
662+#define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
663+#define DEFAULT_X11_KFONT_7 DEFAULT_X11_KFONT_SUB
664+
665+#else
666+/*
667+ * OPTION: Default font (when using X11).
668+ */
669+#define DEFAULT_X11_FONT \
670+ "-*-*-medium-r-normal--24-*-*-*-*-*-iso8859-1" \
671+ ",-*-*-medium-r-normal--24-*-*-*-*-*-jisx0208.1983-0"
672+/* "12x24" \
673+ ",kanji24"*/
674+#define DEFAULT_X11_FONT_SUB \
675+ "-*-*-medium-r-normal--16-*-*-*-*-*-iso8859-1" \
676+ ",-*-*-medium-r-normal--16-*-*-*-*-*-jisx0208.1983-0"
677+/* "8x16" \
678+ ",kanji16"*/
679+
680+/*
681+ * OPTION: Default fonts (when using X11)
682+ */
683+#define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
684+#define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
685+#define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
686+#define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
687+#define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
688+#define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
689+#define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
690+#define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
691+#endif
692+
693+#else
694+/*
695+ * OPTION: Default font (when using X11).
696+ */
697+#define DEFAULT_X11_FONT "9x15"
698+
699+/*
700+ * OPTION: Default fonts (when using X11)
701+ */
702+#define DEFAULT_X11_FONT_0 "10x20"
703+#define DEFAULT_X11_FONT_1 "9x15"
704+#define DEFAULT_X11_FONT_2 "9x15"
705+#define DEFAULT_X11_FONT_3 "5x8"
706+#define DEFAULT_X11_FONT_4 "5x8"
707+#define DEFAULT_X11_FONT_5 "5x8"
708+#define DEFAULT_X11_FONT_6 "5x8"
709+#define DEFAULT_X11_FONT_7 "5x8"
710+#endif
711+
712+
713+/*
714+ * OPTION: Gamma correct X11 colours.
715+ */
716+
717+#define SUPPORT_GAMMA
718+
719+/*
720+ * Hack -- Mach-O (native binary format of OS X) is basically a Un*x
721+ * but has Mac OS/Windows-like user interface
722+ */
723+#ifdef MACH_O_CARBON
724+# ifdef PRIVATE_USER_PATH
725+# undef PRIVATE_USER_PATH
726+# endif
727+# ifdef SAVEFILE_USE_UID
728+# undef SAVEFILE_USE_UID
729+# endif
730+#endif
731+
732+/*
733+ * OPTION: Attempt to prevent all "cheating"
734+ */
735+/* #define VERIFY_HONOR */
736+
737+
738+/*
739+ * React to the "VERIFY_HONOR" flag
740+ */
741+#ifdef VERIFY_HONOR
742+# define VERIFY_SAVEFILE
743+# define VERIFY_CHECKSUMS
744+# define VERIFY_TIMESTAMPS
745+#endif
746+
747+/*
748+ * Check the modification time of *_info.raw files
749+ * (by Keldon Jones)
750+ */
751+#ifndef MAC_MPW
752+#define CHECK_MODIFICATION_TIME
753+#endif
754+
755+/*
756+ * Use the new sorting routines for creation
757+ * of the monster allocation table
758+ */
759+#define SORT_R_INFO
760+
761+
762+#ifndef HAVE_CONFIG_H
763+#define WORLD_SCORE
764+#endif /* HAVE_CONFIG_H */
--- a/src/makefile.std
+++ b/src/makefile.std
@@ -91,7 +91,7 @@ OBJS = \
9191 ## change the compiler to "cc", or remove the "debugging" options, or
9292 ## remove the X11 or Curses support, etc, as desired.
9393 ##
94-## See also "z-config.h" and "h-config.h" for important information.
94+## See also "h-config.h" for important information.
9595 ##
9696 ## Some "examples" are given below, they can be used by simply
9797 ## removing the FIRST column of "#" signs from the "block" of lines
@@ -130,8 +130,8 @@ JP_OPT= -D"JP" -D"EUC" -DDEFAULT_LOCALE="\"ja_JP.eucJP\""
130130 # "new curses" library instead of the "old curses" library, and
131131 # you may have to add "-l/usr/include/ncurses" to the "CFLAGS".
132132 #
133-# See "main-gcu.c" and "z-config.h" for some optional "curses" defines,
134-# including "USE_GETCH" and "USE_CURS_SET". Note that "z-config.h" will
133+# See "main-gcu.c" for some optional "curses" defines,
134+# including "USE_GETCH" and "USE_CURS_SET". Note that "h-config.h" will
135135 # attempt to "guess" at many of these flags based on your system.
136136 #
137137 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU"
@@ -299,7 +299,7 @@ HDRS = \
299299
300300 INCS = \
301301 angband.h \
302- z-config.h defines.h types.h externs.h \
302+ defines.h types.h externs.h \
303303 z-term.h z-rand.h z-util.h z-virt.h z-form.h $(HDRS)
304304
305305
--- a/src/z-config.h
+++ /dev/null
@@ -1,507 +0,0 @@
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-#define USE_FONTSET
26-
27-#ifdef JP
28-#define USE_XIM
29-#endif
30-
31-#if defined(USE_FONTSET) || defined(USE_XIM)
32-#define USE_LOCALE
33-#endif
34-
35-#if defined(JP) && !defined(USE_FONTSET)
36-#define USE_JP_FONTSTRUCT
37-#endif
38-
39-#endif /* HAVE_CONFIG_H */
40-
41-
42-/*
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".
47- *
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.
51- *
52- * And finally, remember that the "Makefile" will specify some rather
53- * important compile time options, like what visual module to use.
54- */
55-
56-
57-/*
58- * OPTION: See the Makefile(s), where several options may be declared.
59- *
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).
64- *
65- * The old "USE_NCU" option has been replaced with "USE_GCU".
66- *
67- * Several other such options are available for non-unix machines,
68- * such as "MACINTOSH", "WINDOWS", "USE_IBM".
69- *
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.
72- */
73-
74-
75-/*
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"
78- */
79-/* #define SPECIAL_BSD */
80-
81-
82-/*
83- * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
84- */
85-/* #define USE_TPOSIX */
86-
87-/*
88- * OPTION: Use the "termio" methods in "main-gcu.c"
89- */
90-/* #define USE_TERMIO */
91-
92-/*
93- * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
94- */
95-/* #define USE_TCHARS */
96-
97-/*
98- * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
99- */
100-/* #define USE_NCURSES */
101-
102-
103-/*
104- * OPTION: for multi-user machines running the game setuid to some other
105- * user (like 'games') this SAFE_SETUID option allows the program to drop
106- * its privileges when saving files that allow for user specified pathnames.
107- * This lets the game be installed system wide without major security
108- * concerns. There should not be any side effects on any machines.
109- *
110- * This will handle "gids" correctly once the permissions are set right.
111- */
112-#define SAFE_SETUID
113-
114-
115-/*
116- * This flag enables the "POSIX" methods for "SAFE_SETUID".
117- */
118-#ifdef _POSIX_SAVED_IDS
119-# define SAFE_SETUID_POSIX
120-#endif
121-
122-
123-/*
124- * Prevent problems on (non-Solaris) Suns using "SAFE_SETUID".
125- * The SAFE_SETUID code is weird, use it at your own risk...
126- */
127-#if !defined(SOLARIS)
128-# undef SAFE_SETUID_POSIX
129-#endif
130-
131-
132-
133-
134-/*
135- * OPTION: for the AFS distributed file system, define this to ensure that
136- * the program is secure with respect to the setuid code. This option has
137- * not been tested (to the best of my knowledge). This option may require
138- * some weird tricks with "p_ptr->player_uid" and such involving "defines".
139- * Note that this option used the AFS library routines Authenticate(),
140- * bePlayer(), beGames() to enforce the proper priviledges.
141- * You may need to current_world_ptr->game_turn "SAFE_SETUID" off to use this option.
142- */
143-/* #define SECURE */
144-
145-
146-
147-
148-/*
149- * OPTION: Verify savefile Checksums (Angband 2.7.0 and up)
150- * This option can help prevent "corruption" of savefiles, and also
151- * stop intentional modification by amateur users.
152- */
153-#define VERIFY_CHECKSUMS
154-
155-
156-/*
157- * OPTION: Forbid the use of "fiddled" savefiles. As far as I can tell,
158- * a fiddled savefile is one with an internal timestamp different from
159- * the actual timestamp. Thus, turning this option on forbids one from
160- * copying a savefile to a different name. Combined with disabling the
161- * ability to save the game without quitting, and with some method of
162- * stopping the user from killing the process at the tombstone screen,
163- * this should prevent the use of backup savefiles. It may also stop
164- * the use of savefiles from other platforms, so be careful.
165- */
166-/* #define VERIFY_TIMESTAMP */
167-
168-
169-/*
170- * OPTION: Forbid the "savefile over-write" cheat, in which you simply
171- * run another copy of the game, loading a previously saved savefile,
172- * and let that copy over-write the "dead" savefile later. This option
173- * either locks the savefile, or creates a fake "xxx.lok" file to prevent
174- * the use of the savefile until the file is deleted. Not ready yet.
175- */
176-/* #define VERIFY_SAVEFILE */
177-
178-
179-
180-/*
181- * OPTION: Hack -- Compile in support for "Cyborg" mode
182- */
183-/*#define ALLOW_BORG*/
184-
185-#ifdef USE_DEBUG
186-
187-/*!
188- * @brief ウィザードモードへの移行を許可する / OPTION: Hack -- Compile in support for "Wizard Commands"
189- */
190-#define ALLOW_WIZARD
191-
192-/*!
193- * @brief スポイラー出力を許可する / OPTION: Hack -- Compile in support for "Spoiler Generation"
194- */
195-#define ALLOW_SPOILERS
196-
197-#endif /* USE_DEBUG */
198-
199-/*!
200- * @brief キャラクターの色変更機能を付加する / OPTION: Allow "do_cmd_colors" at run-time
201- */
202-#define ALLOW_COLORS
203-
204-/*!
205- * @brief キャラクターのシンボル変更機能を付加する / OPTION: Allow "do_cmd_visuals" at run-time
206- */
207-#define ALLOW_VISUALS
208-
209-/*!
210- * @brief マクロ機能を付加する / OPTION: Allow "do_cmd_macros" at run-time
211- */
212-#define ALLOW_MACROS
213-
214-/*!
215- * @brief オートローラー機能を付加する / OPTION: Allow characteres to be "auto-rolled"
216- */
217-#define ALLOW_AUTOROLLER
218-
219-/*!
220- * @brief 一定以上のダメージを受けたモンスターが恐怖して逃走する / OPTION: Allow monsters to "flee" when hit hard
221- */
222-#define ALLOW_FEAR
223-
224-/*!
225- * @brief 一定以上のレベルを持ったプレイヤーが相手ならば、弱いモンスターは逃げ出す/ OPTION: Allow monsters to "flee" from strong players
226- */
227-#define ALLOW_TERROR
228-
229-
230-/*
231- * OPTION: Allow parsing of the ascii template files in "init.c".
232- * This must be defined if you do not have valid binary image files.
233- * It should be usually be defined anyway to allow easy "updating".
234- */
235-#define ALLOW_TEMPLATES
236-
237-/*
238- * OPTION: Allow loading of pre-2.7.0 savefiles. Note that it takes
239- * about 15K of code in "save-old.c" to parse the old savefile format.
240- * Angband 2.8.0 will ignore a lot of info from pre-2.7.0 savefiles.
241- */
242-#define ALLOW_OLD_SAVEFILES
243-
244-
245-/*
246- * OPTION: Handle signals
247- */
248-#define HANDLE_SIGNALS
249-
250-
251-/*
252- * Allow "Wizards" to yield "high scores"
253- */
254-/* #define SCORE_WIZARDS */
255-
256-/*
257- * Allow "Borgs" to yield "high scores"
258- */
259-/*#define SCORE_BORGS*/
260-
261-/*
262- * Allow "Cheaters" to yield "high scores"
263- */
264-/* #define SCORE_CHEATERS */
265-
266-
267-
268-/*
269- * OPTION: Maximum flow depth when using "MONSTER_FLOW"
270- */
271-#define MONSTER_FLOW_DEPTH 32
272-
273-
274-#ifdef USE_SPECIAL
275-
276-/*
277- * OPTION: Allow the use of "sound" in various places.
278- */
279-#define USE_SOUND
280-
281-/*
282- * OPTION: Allow the use of "graphics" in various places
283- */
284-#define USE_GRAPHICS
285-
286-/*
287- * OPTION: Allow the use of "music" in various places
288- */
289-#define USE_MUSIC
290-
291-#endif /* USE_SPECIAL */
292-
293-
294-/*
295- * OPTION: Set the "default" path to the angband "lib" directory.
296- *
297- * See "main.c" for usage, and note that this value is only used on
298- * certain machines, primarily Unix machines. If this value is used,
299- * it will be over-ridden by the "ANGBAND_PATH" environment variable,
300- * if that variable is defined and accessable. The final slash is
301- * optional, but it may eventually be required.
302- *
303- * Using the value "./lib/" below tells Angband that, by default,
304- * the user will run "angband" from the same directory that contains
305- * the "lib" directory. This is a reasonable (but imperfect) default.
306- *
307- * If at all possible, you should change this value to refer to the
308- * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
309- * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
310- */
311-#ifndef DEFAULT_PATH
312-# define DEFAULT_PATH "./lib/"
313-#endif
314-
315-
316-/*
317- * OPTION: Create and use a hidden directory in the users home directory
318- * for storing pref-files and character-dumps.
319- */
320-#ifdef SET_UID
321-#define PRIVATE_USER_PATH "~/.angband"
322-#endif /* SET_UID */
323-
324-
325-/*
326- * On multiuser systems, add the "uid" to savefile names
327- */
328-#ifdef SET_UID
329-# define SAVEFILE_USE_UID
330-#endif
331-
332-
333-/*
334- * OPTION: Check the "time" against "lib/file/hours.txt"
335- */
336-/* #define CHECK_TIME */
337-
338-/*
339- * OPTION: Check the "load" against "lib/file/load.txt"
340- * This may require the 'rpcsvs' library
341- */
342-/* #define CHECK_LOAD */
343-
344-
345-/*
346- * OPTION: For some brain-dead computers with no command line interface,
347- * namely Macintosh, there has to be some way of "naming" your savefiles.
348- * The current "Macintosh" hack is to make it so whenever the character
349- * name changes, the savefile is renamed accordingly. But on normal
350- * machines, once you manage to "load" a savefile, it stays that way.
351- * Macintosh is particularly weird because you can load savefiles that
352- * are not contained in the "lib:save:" folder, and if you change the
353- * player's name, it will then save the savefile elsewhere. Note that
354- * this also gives a method of "bypassing" the "VERIFY_TIMESTAMP" code.
355- */
356-/*
357-#if defined(MACINTOSH) || defined(WINDOWS)
358-# define SAVEFILE_MUTABLE
359-#endif
360-*/
361-
362-/*
363- * OPTION: Capitalize the "user_name" (for "default" player name)
364- * This option is only relevant on SET_UID machines.
365- */
366-#define CAPITALIZE_USER_NAME
367-
368-
369-
370-/*
371- * OPTION: Person to bother if something goes wrong.
372- */
373-/* #define MAINTAINER "rr9@angband.org" */
374-#define MAINTAINER "echizen@users.sourceforge.jp"
375-
376-
377-#ifdef JP
378-#ifndef USE_FONTSET
379-/*
380- * OPTION: Default font (when using X11).
381- */
382-#define DEFAULT_X11_FONT "a24"
383-#define DEFAULT_X11_KFONT "kanji24"
384-#define DEFAULT_X11_FONT_SUB "a16"
385-#define DEFAULT_X11_KFONT_SUB "kanji16"
386-
387-
388-/*
389- * OPTION: Default fonts (when using X11)
390- */
391-#define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
392-#define DEFAULT_X11_KFONT_0 DEFAULT_X11_KFONT
393-#define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
394-#define DEFAULT_X11_KFONT_1 DEFAULT_X11_KFONT_SUB
395-#define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
396-#define DEFAULT_X11_KFONT_2 DEFAULT_X11_KFONT_SUB
397-#define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
398-#define DEFAULT_X11_KFONT_3 DEFAULT_X11_KFONT_SUB
399-#define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
400-#define DEFAULT_X11_KFONT_4 DEFAULT_X11_KFONT_SUB
401-#define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
402-#define DEFAULT_X11_KFONT_5 DEFAULT_X11_KFONT_SUB
403-#define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
404-#define DEFAULT_X11_KFONT_6 DEFAULT_X11_KFONT_SUB
405-#define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
406-#define DEFAULT_X11_KFONT_7 DEFAULT_X11_KFONT_SUB
407-
408-#else
409-/*
410- * OPTION: Default font (when using X11).
411- */
412-#define DEFAULT_X11_FONT \
413- "-*-*-medium-r-normal--24-*-*-*-*-*-iso8859-1" \
414- ",-*-*-medium-r-normal--24-*-*-*-*-*-jisx0208.1983-0"
415-/* "12x24" \
416- ",kanji24"*/
417-#define DEFAULT_X11_FONT_SUB \
418- "-*-*-medium-r-normal--16-*-*-*-*-*-iso8859-1" \
419- ",-*-*-medium-r-normal--16-*-*-*-*-*-jisx0208.1983-0"
420-/* "8x16" \
421- ",kanji16"*/
422-
423-/*
424- * OPTION: Default fonts (when using X11)
425- */
426-#define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
427-#define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
428-#define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
429-#define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
430-#define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
431-#define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
432-#define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
433-#define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
434-#endif
435-
436-#else
437-/*
438- * OPTION: Default font (when using X11).
439- */
440-#define DEFAULT_X11_FONT "9x15"
441-
442-/*
443- * OPTION: Default fonts (when using X11)
444- */
445-#define DEFAULT_X11_FONT_0 "10x20"
446-#define DEFAULT_X11_FONT_1 "9x15"
447-#define DEFAULT_X11_FONT_2 "9x15"
448-#define DEFAULT_X11_FONT_3 "5x8"
449-#define DEFAULT_X11_FONT_4 "5x8"
450-#define DEFAULT_X11_FONT_5 "5x8"
451-#define DEFAULT_X11_FONT_6 "5x8"
452-#define DEFAULT_X11_FONT_7 "5x8"
453-#endif
454-
455-
456-/*
457- * OPTION: Gamma correct X11 colours.
458- */
459-
460-#define SUPPORT_GAMMA
461-
462-/*
463- * Hack -- Mach-O (native binary format of OS X) is basically a Un*x
464- * but has Mac OS/Windows-like user interface
465- */
466-#ifdef MACH_O_CARBON
467-# ifdef PRIVATE_USER_PATH
468-# undef PRIVATE_USER_PATH
469-# endif
470-# ifdef SAVEFILE_USE_UID
471-# undef SAVEFILE_USE_UID
472-# endif
473-#endif
474-
475-/*
476- * OPTION: Attempt to prevent all "cheating"
477- */
478-/* #define VERIFY_HONOR */
479-
480-
481-/*
482- * React to the "VERIFY_HONOR" flag
483- */
484-#ifdef VERIFY_HONOR
485-# define VERIFY_SAVEFILE
486-# define VERIFY_CHECKSUMS
487-# define VERIFY_TIMESTAMPS
488-#endif
489-
490-/*
491- * Check the modification time of *_info.raw files
492- * (by Keldon Jones)
493- */
494-#ifndef MAC_MPW
495-#define CHECK_MODIFICATION_TIME
496-#endif
497-
498-/*
499- * Use the new sorting routines for creation
500- * of the monster allocation table
501- */
502-#define SORT_R_INFO
503-
504-
505-#ifndef HAVE_CONFIG_H
506-#define WORLD_SCORE
507-#endif /* HAVE_CONFIG_H */
Show on old repository browser