OSDN Git Service

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