3 * @brief Angband(変愚蛮怒)基本関数、グローバル変数ヘッダファイル /
4 * extern declarations (variables and functions)
7 * Copyright (c) 1997 Ben Harrison
9 * This software may be copied and distributed for educational, research,
10 * and not for profit purposes provided that this copyright and statement
11 * are included in all such copies.
12 * Note that some files have their own header files
13 * (z-virt.h, z-util.h, z-form.h, term.h, random.h)
17 #include "floor-save.h"
19 #include "monsterrace.h"
21 #include "player-status.h"
24 * Automatically generated "variable" declarations
26 extern int max_macrotrigger;
27 extern concptr macro_template;
28 extern concptr macro_modifier_chr;
29 extern concptr macro_modifier_name[MAX_MACRO_MOD];
30 extern concptr macro_trigger_name[MAX_MACRO_TRIG];
31 extern concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
37 extern const POSITION ddd[9];
38 extern const POSITION ddx[10];
39 extern const POSITION ddy[10];
40 extern const POSITION ddx_ddd[9];
41 extern const POSITION ddy_ddd[9];
42 extern const POSITION cdd[8];
43 extern const POSITION ddx_cdd[8];
44 extern const POSITION ddy_cdd[8];
45 extern const char hexsym[16];
46 extern const char listsym[];
47 extern const concptr color_char;
48 extern const byte adj_mag_study[];
49 extern const byte adj_mag_mana[];
50 extern const byte adj_mag_fail[];
51 extern const byte adj_mag_stat[];
52 extern const byte adj_chr_gold[];
53 extern const byte adj_int_dev[];
54 extern const byte adj_wis_sav[];
55 extern const byte adj_dex_dis[];
56 extern const byte adj_int_dis[];
57 extern const byte adj_dex_ta[];
58 extern const byte adj_str_td[];
59 extern const byte adj_dex_th[];
60 extern const byte adj_str_th[];
61 extern const byte adj_str_wgt[];
62 extern const byte adj_str_hold[];
63 extern const byte adj_str_dig[];
64 extern const byte adj_dex_safe[];
65 extern const byte adj_con_fix[];
66 extern const byte adj_con_mhp[];
67 extern const byte adj_chr_chm[];
68 extern const byte extract_energy[200];
70 extern const concptr realm_names[];
72 extern const concptr E_realm_names[];
74 extern const concptr spell_names[VALID_REALM][32];
75 extern const concptr color_names[16];
76 extern const concptr stat_names[6];
77 extern const concptr stat_names_reduced[6];
78 extern const concptr window_flag_desc[32];
80 extern const concptr game_inscriptions[];
82 extern const concptr ident_info[];
83 extern const byte feature_action_flags[FF_FLAG_MAX];
86 extern const concptr copyright[5];
87 extern byte h_ver_major;
88 extern byte h_ver_minor;
89 extern byte h_ver_patch;
90 extern byte h_ver_extra;
92 extern u32b sf_system;
99 extern bool arg_fiddle;
100 extern bool arg_wizard;
101 extern bool arg_music;
102 extern bool arg_sound;
103 extern byte arg_graphics;
104 extern bool arg_monochrome;
105 extern bool arg_force_original;
106 extern bool arg_force_roguelike;
107 extern bool arg_bigtile;
108 extern bool character_generated;
109 extern bool character_dungeon;
110 extern bool character_loaded;
111 extern bool character_saved;
112 extern bool character_icky;
113 extern bool character_xtra;
114 extern bool creating_savefile;
115 extern COMMAND_CODE command_cmd;
116 extern COMMAND_ARG command_arg;
117 extern s16b command_rep;
118 extern DIRECTION command_dir;
119 extern s16b command_see;
120 extern TERM_LEN command_gap;
121 extern s16b command_wrk;
122 extern s16b command_new;
123 extern bool msg_flag;
125 extern bool invoking_midnight_curse;
126 extern GAME_TURN old_battle;
127 extern bool use_sound;
128 extern bool use_music;
129 extern bool use_graphics;
130 extern bool use_bigtile;
131 extern s16b signal_count;
132 extern bool inkey_base;
133 extern bool inkey_xtra;
134 extern bool inkey_scan;
135 extern bool inkey_flag;
136 extern bool get_com_no_macros;
137 extern OBJECT_SUBTYPE_VALUE coin_type;
138 extern bool opening_chest;
139 extern bool shimmer_monsters;
140 extern bool shimmer_objects;
141 extern bool repair_monsters;
142 extern bool repair_objects;
143 extern MONSTER_IDX hack_m_idx;
144 extern MONSTER_IDX hack_m_idx_ii;
145 extern int total_friends;
146 extern int leaving_quest;
147 extern bool reinit_wilderness;
148 extern bool multi_rew;
149 extern char summon_kin_type;
150 extern bool is_loading_now;
151 extern bool reset_concent;
152 extern bool is_fired;
157 * Software options (set via the '=' command). See "tables.c"
161 extern char record_o_name[MAX_NLEN];
162 extern GAME_TURN record_turn;
163 extern POSITION panel_row_min, panel_row_max;
164 extern POSITION panel_col_min, panel_col_max;
165 extern POSITION panel_col_prt, panel_row_prt;
166 extern MONSTER_IDX target_who;
167 extern POSITION target_col;
168 extern POSITION target_row;
169 extern int player_uid;
170 extern int player_euid;
171 extern int player_egid;
172 extern char player_base[32];
173 extern char savefile[1024];
174 extern char savefile_base[40];
175 extern pos_list tmp_pos;
176 extern s16b macro__num;
177 extern concptr *macro__pat;
178 extern concptr *macro__act;
179 extern bool *macro__cmd;
180 extern char *macro__buf;
181 extern STR_OFFSET quark__num;
182 extern concptr *quark__str;
184 extern BIT_FLAGS option_flag[8];
185 extern BIT_FLAGS option_mask[8];
186 extern BIT_FLAGS window_flag[8];
187 extern BIT_FLAGS window_mask[8];
188 extern term *angband_term[8];
189 extern const char angband_term_name[8][16];
190 extern byte angband_color_table[256][4];
191 extern const concptr angband_sound_name[SOUND_MAX];
192 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
193 extern FLOOR_IDX max_floor_id;
194 extern u32b saved_floor_file_sign;
195 extern concptr keymap_act[KEYMAP_MODES][256];
196 extern player_type *p_ptr;
200 extern OBJECT_TYPE_VALUE item_tester_tval;
201 extern bool (*item_tester_hook)(object_type *o_ptr);
202 extern monsterrace_hook_type get_mon_num_hook;
203 extern monsterrace_hook_type get_mon_num2_hook;
204 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
207 extern VAULT_IDX max_v_idx;
208 extern FEAT_IDX max_f_idx;
210 extern EGO_IDX max_e_idx;
211 extern DUNGEON_IDX max_d_idx;
212 extern int init_flags;
213 extern int highscore_fd;
214 extern bool can_save;
216 extern int cap_mspeed;
217 extern HIT_POINT cap_hp;
218 extern HIT_POINT cap_maxhp;
219 extern STR_OFFSET cap_nickname;
220 extern MONRACE_IDX battle_mon[4];
221 extern int sel_monster;
222 extern int battle_odds;
223 extern PRICE kakekin;
224 extern u32b mon_odds[4];
225 extern MONSTER_IDX pet_t_m_idx;
226 extern MONSTER_IDX riding_t_m_idx;
227 extern MONRACE_IDX today_mon;
228 extern bool write_level;
229 extern u32b start_time;
230 extern bool sukekaku;
231 extern bool new_mane;
232 extern bool mon_fight;
233 extern bool generate_encounter;
234 extern concptr screen_dump;
237 extern DEPTH *max_dlv;
238 extern COMMAND_CODE now_message;
239 extern bool use_menu;
243 extern errr rd_savefile_new(void);
244 extern bool load_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
247 extern void do_cmd_racial_power(void);
250 extern bool save_player(void);
251 extern bool load_player(void);
252 extern void remove_loc(void);
253 extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
256 extern void handle_stuff(void);
257 extern void update_output(void);
258 extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
259 extern void update_playtime(void);
262 extern void panel_bounds_center(void);
263 extern void verify_panel(void);
264 extern bool target_able(MONSTER_IDX m_idx);
265 extern bool target_okay(void);
266 extern bool target_set(BIT_FLAGS mode);
267 extern void target_set_prepare_look(void);
268 extern bool get_aim_dir(DIRECTION *dp);
269 extern bool get_hack_dir(DIRECTION *dp);
270 extern bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed);
271 extern bool get_rep_dir(DIRECTION *dp, bool under);
272 extern bool tgt_pt(POSITION *x, POSITION *y);
275 * Hack -- conditional (or "bizarre") externs
280 extern void user_name(char *buf, int id);
286 extern int stricmp(concptr a, concptr b);
292 extern int usleep(huge usecs);
297 /* extern void main(void); */
300 #if defined(MAC_MPW) || defined(MACH_O_CARBON)
303 extern u32b _fcreator;
306 #if defined(MAC_MPW) && defined(CARBON)
307 extern void convert_pathname(char *path);
310 #if defined(MACH_O_CARBON)
311 extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype);
316 /* extern int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, ...); */
319 extern bool easy_disarm;
320 extern bool easy_floor;
321 extern bool easy_open;
323 extern bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode);
324 extern void py_pickup_floor(bool pickup);
327 extern void spoil_random_artifact(concptr fname);
330 extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx);
331 extern void cheat_death(player_type *creature_ptr);
336 extern void sindarin_to_kana(char *kana, concptr sindarin);
337 extern void jverb( concptr in , char *out , int flag);
338 extern void sjis2euc(char *str);
339 extern void euc2sjis(char *str);
340 extern byte codeconv(char *str);
341 extern bool iskanji2(concptr s, int x);
342 extern void guess_convert_to_system_encoding(char* strbuf, int buflen);
347 extern errr report_score(void);
348 extern concptr make_screen_dump(void);
352 extern int soc_write(int sd, char *buf, size_t sz);
353 extern int soc_read(int sd, char *buf, size_t sz);
354 extern void set_proxy(char *default_url, int default_port);
355 extern int connect_server(int timeout, concptr host, int port);
356 extern int disconnect_server(int sd);
357 extern concptr soc_err(void);
359 extern void prepare_movie_hooks(void);
360 extern void prepare_browse_movie_aux(concptr filename);
361 extern void prepare_browse_movie(concptr filename);
362 extern void browse_movie(void);
363 extern bool browsing_movie;
365 extern void kamaenaoshi(INVENTORY_IDX item);