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 repair_monsters; /* Hack -- optimize detect monsters */
68 bool repair_objects; /* Hack -- optimize detect objects */
70 MONSTER_IDX hack_m_idx = 0; /* Hack -- see "process_monsters()" */
71 MONSTER_IDX hack_m_idx_ii = 0;
73 bool multi_rew = FALSE;
75 int total_friends = 0;
76 int leaving_quest = 0;
77 bool reinit_wilderness = FALSE;
83 POSITION panel_row_min, panel_row_max;
84 POSITION panel_col_min, panel_col_max;
85 POSITION panel_col_prt, panel_row_prt;
89 * Targetting variables
91 MONSTER_IDX target_who;
104 * Stripped version of "player_name"
106 char player_base[32];
110 * Buffer to hold the current savefile name
111 * 'savefile' holds full path name. 'savefile_base' holds only base name.
114 char savefile_base[40];
121 * Number of active macros.
126 * Array of macro patterns [MACRO_MAX]
131 * Array of macro actions [MACRO_MAX]
136 * Array of macro types [MACRO_MAX]
141 * Current macro action [1024]
147 * The number of quarks
149 STR_OFFSET quark__num;
152 * The pointers to the quarks [QUARK_MAX]
157 * The array of window pointers
159 term *angband_term[8];
162 * Standard window names
164 const char angband_term_name[8][16] =
178 * Global table of color definitions
180 byte angband_color_table[256][4] =
182 {0x00, 0x00, 0x00, 0x00}, /* TERM_DARK */
183 {0x00, 0xFF, 0xFF, 0xFF}, /* TERM_WHITE */
184 {0x00, 0x80, 0x80, 0x80}, /* TERM_SLATE */
185 {0x00, 0xFF, 0x80, 0x00}, /* TERM_ORANGE */
186 {0x00, 0xC0, 0x00, 0x00}, /* TERM_RED */
187 {0x00, 0x00, 0x80, 0x40}, /* TERM_GREEN */
188 {0x00, 0x00, 0x00, 0xFF}, /* TERM_BLUE */
189 {0x00, 0x80, 0x40, 0x00}, /* TERM_UMBER */
190 {0x00, 0x40, 0x40, 0x40}, /* TERM_L_DARK */
191 {0x00, 0xC0, 0xC0, 0xC0}, /* TERM_L_WHITE */
192 {0x00, 0xFF, 0x00, 0xFF}, /* TERM_VIOLET */
193 {0x00, 0xFF, 0xFF, 0x00}, /* TERM_YELLOW */
194 {0x00, 0xFF, 0x00, 0x00}, /* TERM_L_RED */
195 {0x00, 0x00, 0xFF, 0x00}, /* TERM_L_GREEN */
196 {0x00, 0x00, 0xFF, 0xFF}, /* TERM_L_BLUE */
197 {0x00, 0xC0, 0x80, 0x40} /* TERM_L_UMBER */
202 * Standard sound names
204 const concptr angband_sound_name[SOUND_MAX] =
276 * Standard music names
278 const concptr angband_music_basic_name[MUSIC_BASIC_MAX] =
305 * Number of floor_id used from birth
307 FLOOR_IDX max_floor_id;
310 * Sign for current process used in temporal files.
311 * Actually it is the start time of current process.
313 u32b saved_floor_file_sign;
317 * Keymaps for each "mode" associated with each keypress.
319 concptr keymap_act[KEYMAP_MODES][256];
323 /*** Player information ***/
326 * Static player info record
331 * Pointer to the player info
333 player_type *p_ptr = &p_body;
337 * Here is a "pseudo-hook" used during calls to "get_item()" and
338 * "show_inven()" and "show_equip()", and the choice window routines.
340 OBJECT_TYPE_VALUE item_tester_tval;
344 * Here is a "hook" used during calls to "get_item()" and
345 * "show_inven()" and "show_equip()", and the choice window routines.
347 bool (*item_tester_hook)(object_type*);
353 * Hack -- function hooks to restrict "get_mon_num_prep()" function
355 monsterrace_hook_type get_mon_num_hook;
356 monsterrace_hook_type get_mon_num2_hook;
360 * Hack -- function hook to restrict "get_obj_num_prep()" function
362 bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
365 * Maximum number of vaults in v_info.txt
370 * Maximum number of terrain features in f_info.txt
375 * Maximum number of ego-items in e_info.txt
380 * Maximum number of dungeon in e_info.txt
382 DUNGEON_IDX max_d_idx;
385 * Flags for initialization
391 * The "highscore" file descriptor, if available.
393 int highscore_fd = -1;
395 bool can_save = FALSE; /* Game can be saved */
397 MONRACE_IDX battle_mon[4];
403 MONSTER_IDX pet_t_m_idx;
404 MONSTER_IDX riding_t_m_idx;
406 MONSTER_IDX today_mon;
415 bool generate_encounter;
417 concptr screen_dump = NULL;
425 COMMAND_CODE now_message;
440 bool reset_concent = FALSE; /* Concentration reset flag */
441 bool is_fired = FALSE;