3 * @brief グローバル変数定義 / Angband variables
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke<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>
16 int max_macrotrigger = 0; /*!< 現在登録中のマクロ(トリガー)の数 */
17 concptr macro_template = NULL; /*!< Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ */
18 concptr macro_modifier_chr; /*!< &x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ */
19 concptr macro_modifier_name[MAX_MACRO_MOD]; /*!< マクロ上で取り扱う特殊キーを文字列上で表現するためのフォーマットを記録した文字列ポインタ配列 */
20 concptr macro_trigger_name[MAX_MACRO_TRIG]; /*!< マクロのトリガーコード */
21 concptr macro_trigger_keycode[2][MAX_MACRO_TRIG]; /*!< マクロの内容 */
23 int level_up = 0; /*!< レベルアップの際に遅延してcalc_mana()関数上で上昇量を表示するかどうかの判定フラグ */
28 bool character_generated; /* The character exists */
29 bool character_dungeon; /* The character has a dungeon */
30 bool character_loaded; /* The character was loaded from a savefile */
31 bool character_saved; /* The character was just saved to a savefile */
33 bool character_icky; /* The game is in an icky full screen mode */
34 bool character_xtra; /* The game is in an icky startup mode */
36 bool creating_savefile; /* New savefile is currently created */
38 s16b command_cmd; /* Current "Angband Command" */
40 COMMAND_ARG command_arg; /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */
41 COMMAND_NUM command_rep; /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */
42 DIRECTION command_dir; /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */
44 s16b command_see; /* See "object1.c" */
45 s16b command_wrk; /* See "object1.c" */
47 TERM_LEN command_gap = 999; /* See "object1.c" */
49 s16b command_new; /* Command chaining from inven/equip view */
51 bool msg_flag; /* Used in msg_print() for "buffering" */
53 s16b running; /* Current counter for running, if any */
57 s16b signal_count; /* Hack -- Count interupts */
59 bool inkey_base; /* See the "inkey()" function */
60 bool inkey_xtra; /* See the "inkey()" function */
61 bool inkey_scan; /* See the "inkey()" function */
62 bool inkey_flag; /* See the "inkey()" function */
63 bool get_com_no_macros = FALSE; /* Expand macros in "get_com" or not */
65 OBJECT_SUBTYPE_VALUE coin_type; /* Hack -- force coin type */
67 bool opening_chest; /* Hack -- prevent chest generation */
69 bool shimmer_monsters; /* Hack -- optimize multi-hued monsters */
70 bool shimmer_objects; /* Hack -- optimize multi-hued objects */
72 bool repair_monsters; /* Hack -- optimize detect monsters */
73 bool repair_objects; /* Hack -- optimize detect objects */
75 MONSTER_IDX hack_m_idx = 0; /* Hack -- see "process_monsters()" */
76 MONSTER_IDX hack_m_idx_ii = 0;
78 bool multi_rew = FALSE;
80 int total_friends = 0;
81 int leaving_quest = 0;
82 bool reinit_wilderness = FALSE;
88 POSITION panel_row_min, panel_row_max;
89 POSITION panel_col_min, panel_col_max;
90 POSITION panel_col_prt, panel_row_prt;
94 * Targetting variables
96 MONSTER_IDX target_who;
109 * Stripped version of "player_name"
111 char player_base[32];
115 * Buffer to hold the current savefile name
116 * 'savefile' holds full path name. 'savefile_base' holds only base name.
119 char savefile_base[40];
126 * Number of active macros.
131 * Array of macro patterns [MACRO_MAX]
136 * Array of macro actions [MACRO_MAX]
141 * Array of macro types [MACRO_MAX]
146 * Current macro action [1024]
152 * The number of quarks
154 STR_OFFSET quark__num;
157 * The pointers to the quarks [QUARK_MAX]
161 BIT_FLAGS option_flag[8]; //!< The array of normal options
162 BIT_FLAGS option_mask[8]; //!< The array of normal options
163 BIT_FLAGS window_flag[8]; //!< The array of window options
164 BIT_FLAGS window_mask[8]; //!< The array of window options
167 * The array of window pointers
169 term *angband_term[8];
172 * Standard window names
174 const char angband_term_name[8][16] =
188 * Global table of color definitions
190 byte angband_color_table[256][4] =
192 {0x00, 0x00, 0x00, 0x00}, /* TERM_DARK */
193 {0x00, 0xFF, 0xFF, 0xFF}, /* TERM_WHITE */
194 {0x00, 0x80, 0x80, 0x80}, /* TERM_SLATE */
195 {0x00, 0xFF, 0x80, 0x00}, /* TERM_ORANGE */
196 {0x00, 0xC0, 0x00, 0x00}, /* TERM_RED */
197 {0x00, 0x00, 0x80, 0x40}, /* TERM_GREEN */
198 {0x00, 0x00, 0x00, 0xFF}, /* TERM_BLUE */
199 {0x00, 0x80, 0x40, 0x00}, /* TERM_UMBER */
200 {0x00, 0x40, 0x40, 0x40}, /* TERM_L_DARK */
201 {0x00, 0xC0, 0xC0, 0xC0}, /* TERM_L_WHITE */
202 {0x00, 0xFF, 0x00, 0xFF}, /* TERM_VIOLET */
203 {0x00, 0xFF, 0xFF, 0x00}, /* TERM_YELLOW */
204 {0x00, 0xFF, 0x00, 0x00}, /* TERM_L_RED */
205 {0x00, 0x00, 0xFF, 0x00}, /* TERM_L_GREEN */
206 {0x00, 0x00, 0xFF, 0xFF}, /* TERM_L_BLUE */
207 {0x00, 0xC0, 0x80, 0x40} /* TERM_L_UMBER */
212 * Standard sound names
214 const concptr angband_sound_name[SOUND_MAX] =
286 * Standard music names
288 const concptr angband_music_basic_name[MUSIC_BASIC_MAX] =
315 * Number of floor_id used from birth
317 FLOOR_IDX max_floor_id;
320 * Sign for current process used in temporal files.
321 * Actually it is the start time of current process.
323 u32b saved_floor_file_sign;
327 * Keymaps for each "mode" associated with each keypress.
329 concptr keymap_act[KEYMAP_MODES][256];
333 /*** Player information ***/
336 * Static player info record
341 * Pointer to the player info
343 player_type *p_ptr = &p_body;
347 * Here is a "pseudo-hook" used during calls to "get_item()" and
348 * "show_inven()" and "show_equip()", and the choice window routines.
350 OBJECT_TYPE_VALUE item_tester_tval;
354 * Here is a "hook" used during calls to "get_item()" and
355 * "show_inven()" and "show_equip()", and the choice window routines.
357 bool (*item_tester_hook)(object_type*);
363 * Hack -- function hooks to restrict "get_mon_num_prep()" function
365 monsterrace_hook_type get_mon_num_hook;
366 monsterrace_hook_type get_mon_num2_hook;
370 * Hack -- function hook to restrict "get_obj_num_prep()" function
372 bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
375 * Maximum number of vaults in v_info.txt
380 * Maximum number of terrain features in f_info.txt
385 * Maximum number of ego-items in e_info.txt
390 * Maximum number of dungeon in e_info.txt
392 DUNGEON_IDX max_d_idx;
395 * Flags for initialization
401 * The "highscore" file descriptor, if available.
403 int highscore_fd = -1;
405 bool can_save = FALSE; /* Game can be saved */
412 STR_OFFSET cap_nickname;
414 MONRACE_IDX battle_mon[4];
420 MONSTER_IDX pet_t_m_idx;
421 MONSTER_IDX riding_t_m_idx;
423 MONSTER_IDX today_mon;
434 bool generate_encounter;
436 concptr screen_dump = NULL;
444 COMMAND_CODE now_message;
459 bool reset_concent = FALSE; /* Concentration reset flag */
460 bool is_fired = FALSE;