OSDN Git Service

[Refactor] #37353 snipe_type をグローバル変数から、引数へ置換 / Replace snipe_type from global to...
[hengband/hengband.git] / src / variable.c
1 /*!
2  * @file variable.c
3  * @brief グローバル変数定義 / Angband variables
4  * @date 2014/10/05
5  * @author
6  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke<br>
7  * <br>
8  * This software may be copied and distributed for educational, research,<br>
9  * and not for profit purposes provided that this copyright and statement<br>
10  * are included in all such copies.  Other copyrights may also apply.<br>
11  */
12
13 #include "angband.h"
14 #include "geometry.h"
15
16 /*!
17  * コピーライト情報 /
18  * Hack -- Link a copyright message into the executable
19  */
20 const concptr copyright[5] =
21 {
22         "Copyright (c) 1989 James E. Wilson, Robert A. Keoneke",
23         "",
24         "This software may be copied and distributed for educational, research,",
25         "and not for profit purposes provided that this copyright and statement",
26         "are included in all such copies."
27 };
28
29 int max_macrotrigger = 0; /*!< 現在登録中のマクロ(トリガー)の数 */
30 concptr macro_template = NULL; /*!< Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ */
31 concptr macro_modifier_chr; /*!< &x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ */
32 concptr macro_modifier_name[MAX_MACRO_MOD]; /*!< マクロ上で取り扱う特殊キーを文字列上で表現するためのフォーマットを記録した文字列ポインタ配列 */
33 concptr macro_trigger_name[MAX_MACRO_TRIG]; /*!< マクロのトリガーコード */
34 concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];  /*!< マクロの内容 */
35
36 int level_up = 0; /*!< レベルアップの際に遅延してcalc_mana()関数上で上昇量を表示するかどうかの判定フラグ */
37
38
39 /* 
40  * 自動拾い/破壊設定のリストに関する変数 / List for auto-picker/destroyer entries
41  */
42 int max_autopick = 0; /*!< 現在登録している自動拾い/破壊設定の数 */
43 int max_max_autopick = 0; /*!< 自動拾い/破壊設定の限界数 */
44 autopick_type *autopick_list = NULL; /*!< 自動拾い/破壊設定構造体のポインタ配列 */
45
46 /*
47  * Savefile version
48  */
49 byte h_ver_major; /* Savefile version for Hengband 1.1.1 and later */
50 byte h_ver_minor;
51 byte h_ver_patch;
52 byte h_ver_extra;
53
54 byte sf_extra;          /* Savefile's encoding key */
55
56 byte z_major;           /* Savefile version for Hengband */
57 byte z_minor;
58 byte z_patch;
59
60 /*
61  * Savefile information
62  */
63 u32b sf_system;                 /* Operating system info */
64 u32b sf_when;                   /* Time when savefile created */
65 u16b sf_lives;                  /* Number of past "lives" with this file */
66 u16b sf_saves;                  /* Number of "saves" during this life */
67
68 /*
69  * Run-time arguments
70  */
71 bool arg_fiddle;                        /* Command arg -- Request fiddle mode */
72 bool arg_wizard;                        /* Command arg -- Request wizard mode */
73 bool arg_sound;                         /* Command arg -- Request special sounds */
74 bool arg_music;                         /* Command arg -- Request special musics */
75 byte arg_graphics;                      /* Command arg -- Request graphics mode */
76 bool arg_monochrome;            /* Command arg -- Request monochrome mode */
77 bool arg_force_original;        /* Command arg -- Request original keyset */
78 bool arg_force_roguelike;       /* Command arg -- Request roguelike keyset */
79 bool arg_bigtile = FALSE;       /* Command arg -- Request big tile mode */
80
81 /*
82  * Various things
83  */
84 bool character_generated;       /* The character exists */
85 bool character_dungeon;         /* The character has a dungeon */
86 bool character_loaded;          /* The character was loaded from a savefile */
87 bool character_saved;           /* The character was just saved to a savefile */
88
89 bool character_icky;            /* The game is in an icky full screen mode */
90 bool character_xtra;            /* The game is in an icky startup mode */
91
92 bool creating_savefile;         /* New savefile is currently created */
93
94 u32b seed_flavor;               /* Hack -- consistent object colors */
95 u32b seed_town;                 /* Hack -- consistent town layout */
96
97 s16b command_cmd;               /* Current "Angband Command" */
98
99 COMMAND_ARG command_arg;        /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */
100 COMMAND_NUM command_rep;        /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */
101 DIRECTION command_dir;          /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */
102
103 s16b command_see;               /* See "object1.c" */
104 s16b command_wrk;               /* See "object1.c" */
105
106 TERM_LEN command_gap = 999;         /* See "object1.c" */
107
108 s16b command_new;               /* Command chaining from inven/equip view */
109
110 bool msg_flag;                  /* Used in msg_print() for "buffering" */
111
112 s16b running;                   /* Current counter for running, if any */
113
114 bool invoking_midnight_curse; /*!< 悪夢モード時の真夜中太古の呪い発生処理フラグ */
115
116 GAME_TURN old_battle;
117
118 bool use_sound;                 /* The "sound" mode is enabled */
119 bool use_music;                 /* The "music" mode is enabled */
120 bool use_graphics;              /* The "graphics" mode is enabled */
121 bool use_bigtile = FALSE;
122
123 s16b signal_count;              /* Hack -- Count interupts */
124
125 bool inkey_base;                /* See the "inkey()" function */
126 bool inkey_xtra;                /* See the "inkey()" function */
127 bool inkey_scan;                /* See the "inkey()" function */
128 bool inkey_flag;                /* See the "inkey()" function */
129 bool get_com_no_macros = FALSE; /* Expand macros in "get_com" or not */
130
131 OBJECT_SUBTYPE_VALUE coin_type; /* Hack -- force coin type */
132
133 bool opening_chest;             /* Hack -- prevent chest generation */
134
135 bool shimmer_monsters;  /* Hack -- optimize multi-hued monsters */
136 bool shimmer_objects;   /* Hack -- optimize multi-hued objects */
137
138 bool repair_monsters;   /* Hack -- optimize detect monsters */
139 bool repair_objects;    /* Hack -- optimize detect objects */
140
141 bool is_loading_now;    /*!< ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
142 bool hack_mutation;
143
144 s16b inven_cnt; /* Number of items in inventory */
145 s16b equip_cnt; /* Number of items in equipment */
146
147 OBJECT_IDX o_max = 1; /* Number of allocated objects */
148 OBJECT_IDX o_cnt = 0; /* Number of live objects */
149
150 MONSTER_IDX m_max = 1; /* Number of allocated monsters */
151 MONSTER_IDX m_cnt = 0; /* Number of live monsters */
152
153 MONSTER_IDX hack_m_idx = 0;     /* Hack -- see "process_monsters()" */
154 MONSTER_IDX hack_m_idx_ii = 0;
155
156 bool multi_rew = FALSE;
157 char summon_kin_type;   /* Hack, by Julian Lighton: summon 'relatives' */
158
159 int total_friends = 0;
160 s32b friend_align = 0;
161
162 int leaving_quest = 0;
163 bool reinit_wilderness = FALSE;
164
165
166
167 /*
168  * Dungeon variables
169  */
170
171 bool closing_flag;              /* Dungeon is closing */
172
173
174 /*
175  * Dungeon size info
176  */
177
178 POSITION panel_row_min, panel_row_max;
179 POSITION panel_col_min, panel_col_max;
180 POSITION panel_col_prt, panel_row_prt;
181
182
183 /*
184  * Targetting variables
185  */
186 MONSTER_IDX target_who;
187 POSITION target_col;
188 POSITION target_row;
189
190
191 /*
192  * User info
193  */
194 int player_uid;
195 int player_euid;
196 int player_egid;
197
198 /*
199  * Stripped version of "player_name"
200  */
201 char player_base[32];
202
203
204 /*
205  * Buffer to hold the current savefile name
206  * 'savefile' holds full path name. 'savefile_base' holds only base name.
207  */
208 char savefile[1024];
209 char savefile_base[40];
210
211
212 pos_list tmp_pos;
213
214
215 /*
216  * Number of active macros.
217  */
218 s16b macro__num;
219
220 /*
221  * Array of macro patterns [MACRO_MAX]
222  */
223 concptr *macro__pat;
224
225 /*
226  * Array of macro actions [MACRO_MAX]
227  */
228 concptr *macro__act;
229
230 /*
231  * Array of macro types [MACRO_MAX]
232  */
233 bool *macro__cmd;
234
235 /*
236  * Current macro action [1024]
237  */
238 char *macro__buf;
239
240
241 /*
242  * The number of quarks
243  */
244 STR_OFFSET quark__num;
245
246 /*
247  * The pointers to the quarks [QUARK_MAX]
248  */
249 concptr *quark__str;
250
251
252 /*
253  * The next "free" index to use
254  */
255 u32b message__next;
256
257 /*
258  * The index of the oldest message (none yet)
259  */
260 u32b message__last;
261
262 /*
263  * The next "free" offset
264  */
265 u32b message__head;
266
267 /*
268  * The offset to the oldest used char (none yet)
269  */
270 u32b message__tail;
271
272 /*
273  * The array of offsets, by index [MESSAGE_MAX]
274  */
275 u32b *message__ptr;
276
277 /*
278  * The array of chars, by offset [MESSAGE_BUF]
279  */
280 char *message__buf;
281
282 BIT_FLAGS option_flag[8]; //!< The array of normal options
283 BIT_FLAGS option_mask[8]; //!< The array of normal options
284 BIT_FLAGS window_flag[8]; //!< The array of window options
285 BIT_FLAGS window_mask[8]; //!< The array of window options
286
287 /*
288  * The array of window pointers
289  */
290 term *angband_term[8];
291
292 /*
293  * Standard window names
294  */
295 const char angband_term_name[8][16] =
296 {
297         "Hengband",
298         "Term-1",
299         "Term-2",
300         "Term-3",
301         "Term-4",
302         "Term-5",
303         "Term-6",
304         "Term-7"
305 };
306
307
308 /*
309  * Global table of color definitions
310  */
311 byte angband_color_table[256][4] =
312 {
313         {0x00, 0x00, 0x00, 0x00},       /* TERM_DARK */
314         {0x00, 0xFF, 0xFF, 0xFF},       /* TERM_WHITE */
315         {0x00, 0x80, 0x80, 0x80},       /* TERM_SLATE */
316         {0x00, 0xFF, 0x80, 0x00},       /* TERM_ORANGE */
317         {0x00, 0xC0, 0x00, 0x00},       /* TERM_RED */
318         {0x00, 0x00, 0x80, 0x40},       /* TERM_GREEN */
319         {0x00, 0x00, 0x00, 0xFF},       /* TERM_BLUE */
320         {0x00, 0x80, 0x40, 0x00},       /* TERM_UMBER */
321         {0x00, 0x40, 0x40, 0x40},       /* TERM_L_DARK */
322         {0x00, 0xC0, 0xC0, 0xC0},       /* TERM_L_WHITE */
323         {0x00, 0xFF, 0x00, 0xFF},       /* TERM_VIOLET */
324         {0x00, 0xFF, 0xFF, 0x00},       /* TERM_YELLOW */
325         {0x00, 0xFF, 0x00, 0x00},       /* TERM_L_RED */
326         {0x00, 0x00, 0xFF, 0x00},       /* TERM_L_GREEN */
327         {0x00, 0x00, 0xFF, 0xFF},       /* TERM_L_BLUE */
328         {0x00, 0xC0, 0x80, 0x40}        /* TERM_L_UMBER */
329 };
330
331
332 /*
333  * Standard sound names
334  */
335 const concptr angband_sound_name[SOUND_MAX] =
336 {
337         "dummy",
338         "hit",
339         "miss",
340         "flee",
341         "drop",
342         "kill",
343         "level",
344         "death",
345         "study",
346         "teleport",
347         "shoot",
348         "quaff",
349         "zap",
350         "walk",
351         "tpother",
352         "hitwall",
353         "eat",
354         "store1",
355         "store2",
356         "store3",
357         "store4",
358         "dig",
359         "opendoor",
360         "shutdoor",
361         "tplevel",
362         "scroll",
363         "buy",
364         "sell",
365         "warn",
366         "rocket",
367         "n_kill",
368         "u_kill",
369         "quest",
370         "heal",
371         "x_heal",
372         "bite",
373         "claw",
374         "m_spell",
375         "summon",
376         "breath",
377         "ball",
378         "m_heal",
379         "atkspell",
380         "evil",
381         "touch",
382         "sting",
383         "crush",
384         "slime",
385         "wail",
386         "winner",
387         "fire",
388         "acid",
389         "elec",
390         "cold",
391         "illegal",
392         "fail",
393         "wakeup",
394         "invuln",
395         "fall",
396         "pain",
397         "destitem",
398         "moan",
399         "show",
400         "unused",
401         "explode",
402         "glass",
403         "reflect",
404 };
405
406 /*
407  * Standard music names
408  */
409 const concptr angband_music_basic_name[MUSIC_BASIC_MAX] =
410 {
411         "default",
412         "gameover",
413         "exit",
414         "town",
415         "field1",
416         "field2",
417         "field3",
418         "dun_low",
419         "dun_med",
420         "dun_high",
421         "feel1",
422         "feel2",
423         "winner",
424         "build",
425         "wild",
426         "quest",
427         "arena",
428         "battle",
429         "quest_clear",
430         "final_quest_clear",
431         "ambush",
432 };
433
434
435 /*
436  * The array of "current_floor_ptr->grid_array grids" [MAX_WID][MAX_HGT].
437  * Not completely allocated, that would be inefficient
438  * Not completely hardcoded, that would overflow memory
439  */
440 floor_type floor;
441 floor_type *current_floor_ptr = &floor;
442
443 /*
444  * The array of saved floors
445  */
446 saved_floor_type saved_floors[MAX_SAVED_FLOORS];
447
448
449 /*
450  * Number of floor_id used from birth
451  */
452 FLOOR_IDX max_floor_id;
453
454
455 world_type world;
456 world_type *current_world_ptr = &world;
457
458
459 /*
460  * Sign for current process used in temporal files.
461  * Actually it is the start time of current process.
462  */
463 u32b saved_floor_file_sign;
464
465
466 /*
467  * Maximum number of towns
468  */
469 TOWN_IDX max_towns;
470
471 /*
472  * The towns [max_towns]
473  */
474 town_type *town_info;
475
476
477 /*
478  * The player's inventory [INVEN_TOTAL]
479  */
480 object_type *inventory;
481
482
483 /*
484  * The size of "alloc_kind_table" (at most max_k_idx * 4)
485  */
486 s16b alloc_kind_size;
487
488 /*
489  * The entries in the "kind allocator table"
490  */
491 alloc_entry *alloc_kind_table;
492
493
494 /*
495  * The size of "alloc_race_table" (at most max_r_idx)
496  */
497 s16b alloc_race_size;
498
499 /*
500  * The entries in the "race allocator table"
501  */
502 alloc_entry *alloc_race_table;
503
504
505 /*
506  * Specify attr/char pairs for visual special effects
507  * Be sure to use "index & 0x7F" to avoid illegal access
508  */
509 TERM_COLOR misc_to_attr[256];
510 SYMBOL_CODE misc_to_char[256];
511
512
513 /*
514  * Specify attr/char pairs for inventory items (by tval)
515  * Be sure to use "index & 0x7F" to avoid illegal access
516  */
517 TERM_COLOR tval_to_attr[128];
518 SYMBOL_CODE tval_to_char[128];
519
520
521 /*
522  * Keymaps for each "mode" associated with each keypress.
523  */
524 concptr keymap_act[KEYMAP_MODES][256];
525
526
527
528 /*** Player information ***/
529
530 /*
531  * Static player info record
532  */
533 player_type p_body;
534
535 /*
536  * Pointer to the player info
537  */
538 player_type *p_ptr = &p_body;
539
540 /*
541  * Pointer to the player tables
542  * (sex, race, class, magic)
543  */
544 const player_sex *sp_ptr;
545 const player_race *rp_ptr;
546 const player_class *cp_ptr;
547 const player_seikaku *ap_ptr;
548 const player_magic *mp_ptr;
549
550
551 /*
552  * The last character rolled,
553  * holded for quick start
554  */
555 birther previous_char;
556
557
558 /*
559  * The vault generation arrays
560  */
561 vault_type *v_info;
562 char *v_name;
563 char *v_text;
564
565 /*
566  * The skill table
567  */
568 skill_table *s_info;
569
570 /*
571  * The magic info
572  */
573 player_magic *m_info;
574
575 /*
576  * The terrain feature arrays
577  */
578 feature_type *f_info;
579 char *f_name;
580 char *f_tag;
581
582 /*
583  * The object kind arrays
584  */
585 object_kind *k_info;
586 char *k_name;
587 char *k_text;
588
589 /*
590  * The artifact arrays
591  */
592 artifact_type *a_info;
593 char *a_name;
594 char *a_text;
595
596 /*
597  * The ego-item arrays
598  */
599 ego_item_type *e_info;
600 char *e_name;
601 char *e_text;
602
603
604 /*
605  * The monster race arrays
606  */
607 monster_race *r_info;
608 char *r_name;
609 char *r_text;
610
611
612 /*
613  * The dungeon arrays
614  */
615 dungeon_type *d_info;
616 char *d_name;
617 char *d_text;
618
619
620 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file
621
622
623 #ifdef JP
624 concptr ANGBAND_KEYBOARD = "JAPAN"; //!< Hack -- The special Angband "Keyboard Suffix" This variable is used to choose an appropriate macro-trigger definition
625 #else
626 concptr ANGBAND_KEYBOARD = "0";
627 #endif
628
629 concptr ANGBAND_GRAF = "ascii"; //!< Hack -- The special Angband "Graphics Suffix" This variable is used to choose an appropriate "graf-xxx" file
630 concptr ANGBAND_DIR; //!< Path name: The main "lib" directory This variable is not actually used anywhere in the code
631 concptr ANGBAND_DIR_APEX; //!< High score files (binary) These files may be portable between platforms
632 concptr ANGBAND_DIR_BONE; //!< Bone files for player ghosts (ascii) These files are portable between platforms
633 concptr ANGBAND_DIR_DATA; //!< Binary image files for the "*_info" arrays (binary) These files are not portable between platforms
634 concptr ANGBAND_DIR_EDIT; //!< Textual template files for the "*_info" arrays (ascii) These files are portable between platforms
635 concptr ANGBAND_DIR_SCRIPT; //!< Script files These files are portable between platforms.
636 concptr ANGBAND_DIR_FILE; //!< Various extra files (ascii) These files may be portable between platforms
637 concptr ANGBAND_DIR_HELP; //!< Help files (normal) for the online help (ascii) These files are portable between platforms
638 concptr ANGBAND_DIR_INFO; //!< Help files (spoilers) for the online help (ascii) These files are portable between platforms
639 concptr ANGBAND_DIR_PREF; //!< Default user "preference" files (ascii) These files are rarely portable between platforms
640 concptr ANGBAND_DIR_SAVE; //!< Savefiles for current characters (binary)
641 concptr ANGBAND_DIR_USER; //!< User "preference" files (ascii) These files are rarely portable between platforms
642 concptr ANGBAND_DIR_XTRA; //!< Various extra files (binary) These files are rarely portable between platforms
643
644
645 /*
646  * Here is a "pseudo-hook" used during calls to "get_item()" and
647  * "show_inven()" and "show_equip()", and the choice window routines.
648  */
649 OBJECT_TYPE_VALUE item_tester_tval;
650
651
652 /*
653  * Here is a "hook" used during calls to "get_item()" and
654  * "show_inven()" and "show_equip()", and the choice window routines.
655  */
656 bool (*item_tester_hook)(object_type*);
657
658
659
660 /*
661  * Current "comp" function for ang_sort()
662  */
663 bool (*ang_sort_comp)(vptr u, vptr v, int a, int b);
664
665
666 /*
667  * Current "swap" function for ang_sort()
668  */
669 void (*ang_sort_swap)(vptr u, vptr v, int a, int b);
670
671
672
673 /*
674  * Hack -- function hooks to restrict "get_mon_num_prep()" function
675  */
676 monsterrace_hook_type get_mon_num_hook;
677 monsterrace_hook_type get_mon_num2_hook;
678
679
680 /*
681  * Hack -- function hook to restrict "get_obj_num_prep()" function
682  */
683 bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
684
685 /*
686  * Buildings
687  */
688 building_type building[MAX_BLDG];
689
690
691 /*
692  * Maximum number of quests
693  */
694 QUEST_IDX max_q_idx;
695
696 /*
697  * Maximum number of monsters in r_info.txt
698  */
699 MONRACE_IDX max_r_idx;
700
701 /*
702  * Maximum number of items in k_info.txt
703  */
704 KIND_OBJECT_IDX max_k_idx;
705
706 /*
707  * Maximum number of vaults in v_info.txt
708  */
709 VAULT_IDX max_v_idx;
710
711 /*
712  * Maximum number of terrain features in f_info.txt
713  */
714 FEAT_IDX max_f_idx;
715
716 /*
717  * Maximum number of artifacts in a_info.txt
718  */
719 ARTIFACT_IDX max_a_idx;
720
721 /*
722  * Maximum number of ego-items in e_info.txt
723  */
724 EGO_IDX max_e_idx;
725
726 /*
727  * Maximum number of dungeon in e_info.txt
728  */
729 DUNGEON_IDX max_d_idx;
730
731
732
733 /*
734  * Quest info
735  */
736 quest_type *quest;
737
738 /*
739  * Quest text
740  */
741 char quest_text[10][80];
742
743 /*
744  * Current line of the quest text
745  */
746 int quest_text_line;
747
748 /*
749  * Default spell color table (quark index)
750  */
751 TERM_COLOR gf_color[MAX_GF];
752
753 /*
754  * Flags for initialization
755  */
756 int init_flags;
757
758
759 /*
760  * The "highscore" file descriptor, if available.
761  */
762 int highscore_fd = -1;
763
764 bool can_save = FALSE;        /* Game can be saved */
765
766
767 int cap_mon;
768 int cap_mspeed;
769 HIT_POINT cap_hp;
770 HIT_POINT cap_maxhp;
771 STR_OFFSET cap_nickname;
772
773 MONRACE_IDX battle_mon[4];
774 int sel_monster;
775 int battle_odds;
776 PRICE kakekin;
777 u32b mon_odds[4];
778
779 MONSTER_IDX pet_t_m_idx;
780 MONSTER_IDX riding_t_m_idx;
781
782 MONSTER_IDX today_mon;
783
784 bool write_level;
785
786 u32b start_time;
787
788 bool sukekaku;
789 bool new_mane;
790
791 bool mon_fight;
792
793 bool ambush_flag;
794 bool generate_encounter;
795
796 concptr screen_dump = NULL;
797
798 /*** Terrain feature variables ***/
799
800 /* Nothing */
801 FEAT_IDX feat_none;
802
803 /* Floor */
804 FEAT_IDX feat_floor;
805
806 /* Objects */
807 FEAT_IDX feat_glyph;
808 FEAT_IDX feat_explosive_rune;
809 FEAT_IDX feat_mirror;
810
811 /* Stairs */
812 FEAT_IDX feat_up_stair;
813 FEAT_IDX feat_down_stair;
814 FEAT_IDX feat_entrance;
815
816 /* Special traps */
817 FEAT_IDX feat_trap_open;
818 FEAT_IDX feat_trap_armageddon;
819 FEAT_IDX feat_trap_piranha;
820
821 /* Rubble */
822 FEAT_IDX feat_rubble;
823
824 /* Seams */
825 FEAT_IDX feat_magma_vein;
826 FEAT_IDX feat_quartz_vein;
827
828 /* Walls */
829 FEAT_IDX feat_granite;
830 FEAT_IDX feat_permanent;
831
832 /* Glass floor */
833 FEAT_IDX feat_glass_floor;
834
835 /* Glass walls */
836 FEAT_IDX feat_glass_wall;
837 FEAT_IDX feat_permanent_glass_wall;
838
839 /* Pattern */
840 FEAT_IDX feat_pattern_start;
841 FEAT_IDX feat_pattern_1;
842 FEAT_IDX feat_pattern_2;
843 FEAT_IDX feat_pattern_3;
844 FEAT_IDX feat_pattern_4;
845 FEAT_IDX feat_pattern_end;
846 FEAT_IDX feat_pattern_old;
847 FEAT_IDX feat_pattern_exit;
848 FEAT_IDX feat_pattern_corrupted;
849
850 /* Various */
851 FEAT_IDX feat_black_market;
852 FEAT_IDX feat_town;
853
854 /* Terrains */
855 FEAT_IDX feat_deep_water;
856 FEAT_IDX feat_shallow_water;
857 FEAT_IDX feat_deep_lava;
858 FEAT_IDX feat_shallow_lava;
859 FEAT_IDX feat_heavy_cold_zone;
860 FEAT_IDX feat_cold_zone;
861 FEAT_IDX feat_heavy_electrical_zone;
862 FEAT_IDX feat_electrical_zone;
863 FEAT_IDX feat_deep_acid_puddle;
864 FEAT_IDX feat_shallow_acid_puddle;
865 FEAT_IDX feat_deep_poisonous_puddle;
866 FEAT_IDX feat_shallow_poisonous_puddle;
867 FEAT_IDX feat_dirt;
868 FEAT_IDX feat_grass;
869 FEAT_IDX feat_flower;
870 FEAT_IDX feat_brake;
871 FEAT_IDX feat_tree;
872 FEAT_IDX feat_mountain;
873 FEAT_IDX feat_swamp;
874
875 /* Unknown grid (not detected) */
876 FEAT_IDX feat_undetected;
877
878 /*
879  * Which dungeon ?
880  */
881 DEPTH *max_dlv;
882
883 FEAT_IDX feat_wall_outer;
884 FEAT_IDX feat_wall_inner;
885 FEAT_IDX feat_wall_solid;
886 FEAT_IDX feat_ground_type[100], feat_wall_type[100];
887
888 COMMAND_CODE now_message;
889 bool use_menu;
890
891 #ifdef CHUUKEI
892 bool chuukei_server;
893 bool chuukei_client;
894 char *server_name;
895 int server_port;
896 #endif
897
898 /* for movie */
899 bool browsing_movie;
900
901 #ifdef TRAVEL
902 /* for travel */
903 travel_type travel;
904 #endif
905
906 /* for snipers */
907 bool reset_concent = FALSE;   /* Concentration reset flag */
908 bool is_fired = FALSE;
909