OSDN Git Service

[Refactor] #37353 target_who, target_col, target_row を targeting.c/h へ移動.
[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 s16b command_cmd;               /* Current "Angband Command" */
17
18 COMMAND_ARG command_arg;        /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */
19 COMMAND_NUM command_rep;        /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */
20 DIRECTION command_dir;          /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */
21
22 s16b command_see;               /* See "object1.c" */
23 s16b command_wrk;               /* See "object1.c" */
24
25 TERM_LEN command_gap = 999;         /* See "object1.c" */
26
27 s16b command_new;               /* Command chaining from inven/equip view */
28
29 bool msg_flag;                  /* Used in msg_print() for "buffering" */
30
31 s16b running;                   /* Current counter for running, if any */
32
33 s16b signal_count;              /* Hack -- Count interupts */
34
35 bool get_com_no_macros = FALSE; /* Expand macros in "get_com" or not */
36
37 OBJECT_SUBTYPE_VALUE coin_type; /* Hack -- force coin type */
38
39 bool repair_monsters;   /* Hack -- optimize detect monsters */
40 bool repair_objects;    /* Hack -- optimize detect objects */
41
42 MONSTER_IDX hack_m_idx = 0;     /* Hack -- see "process_monsters()" */
43 MONSTER_IDX hack_m_idx_ii = 0;
44
45 bool multi_rew = FALSE;
46
47 int total_friends = 0;
48
49 bool reinit_wilderness = FALSE;
50
51 /*
52  * Dungeon size info
53  */
54
55 POSITION panel_row_min, panel_row_max;
56 POSITION panel_col_min, panel_col_max;
57 POSITION panel_col_prt, panel_row_prt;
58
59
60 /*
61  * User info
62  */
63 int player_uid;
64 int player_euid;
65 int player_egid;
66
67 /*
68  * Buffer to hold the current savefile name
69  * 'savefile' holds full path name. 'savefile_base' holds only base name.
70  */
71 char savefile[1024];
72 char savefile_base[40];
73
74
75 pos_list tmp_pos;
76
77 /*
78  * The number of quarks
79  */
80 STR_OFFSET quark__num;
81
82 /*
83  * The pointers to the quarks [QUARK_MAX]
84  */
85 concptr *quark__str;
86
87 /*
88  * The array of window pointers
89  */
90 term *angband_term[8];
91
92 /*
93  * Sign for current process used in temporal files.
94  * Actually it is the start time of current process.
95  */
96 u32b saved_floor_file_sign;
97
98
99 /*
100  * Keymaps for each "mode" associated with each keypress.
101  */
102 concptr keymap_act[KEYMAP_MODES][256];
103
104
105
106 /*** Player information ***/
107
108 /*
109  * Static player info record
110  */
111 player_type p_body;
112
113 /*
114  * Pointer to the player info
115  */
116 player_type *p_ptr = &p_body;
117
118 /*
119  * The "highscore" file descriptor, if available.
120  */
121 int highscore_fd = -1;
122
123 bool can_save = FALSE;        /* Game can be saved */
124
125
126 MONSTER_IDX pet_t_m_idx;
127 MONSTER_IDX riding_t_m_idx;
128
129 MONSTER_IDX today_mon;
130
131 u32b start_time;
132
133 bool sukekaku;
134 bool new_mane;
135
136 /*
137  * Which dungeon ?
138  */
139 DEPTH *max_dlv;
140
141 COMMAND_CODE now_message;
142 bool use_menu;
143
144 #ifdef CHUUKEI
145 bool chuukei_server;
146 bool chuukei_client;
147 char *server_name;
148 int server_port;
149 #endif
150
151 /* for movie */
152 bool browsing_movie;
153
154
155 /* for snipers */
156 bool reset_concent = FALSE;   /* Concentration reset flag */
157
158