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];
36 * List for auto-picker/destroyer entries
38 extern int max_autopick;
39 extern int max_max_autopick;
40 extern autopick_type *autopick_list;
43 extern const POSITION ddd[9];
44 extern const POSITION ddx[10];
45 extern const POSITION ddy[10];
46 extern const POSITION ddx_ddd[9];
47 extern const POSITION ddy_ddd[9];
48 extern const POSITION cdd[8];
49 extern const POSITION ddx_cdd[8];
50 extern const POSITION ddy_cdd[8];
51 extern const char hexsym[16];
52 extern const char listsym[];
53 extern const concptr color_char;
54 extern const byte adj_mag_study[];
55 extern const byte adj_mag_mana[];
56 extern const byte adj_mag_fail[];
57 extern const byte adj_mag_stat[];
58 extern const byte adj_chr_gold[];
59 extern const byte adj_int_dev[];
60 extern const byte adj_wis_sav[];
61 extern const byte adj_dex_dis[];
62 extern const byte adj_int_dis[];
63 extern const byte adj_dex_ta[];
64 extern const byte adj_str_td[];
65 extern const byte adj_dex_th[];
66 extern const byte adj_str_th[];
67 extern const byte adj_str_wgt[];
68 extern const byte adj_str_hold[];
69 extern const byte adj_str_dig[];
70 extern const byte adj_str_blow[];
71 extern const byte adj_dex_blow[];
72 extern const byte adj_dex_safe[];
73 extern const byte adj_con_fix[];
74 extern const byte adj_con_mhp[];
75 extern const byte adj_chr_chm[];
76 extern const byte blows_table[12][12];
77 extern const byte extract_energy[200];
78 extern const player_sex sex_info[MAX_SEXES];
79 extern const player_race race_info[MAX_RACES];
81 extern const player_seikaku seikaku_info[MAX_SEIKAKU];
82 extern const player_race mimic_info[];
83 extern const u32b fake_spell_flags[4];
84 extern const concptr realm_names[];
86 extern const concptr E_realm_names[];
88 extern const concptr spell_names[VALID_REALM][32];
89 extern const concptr player_title[MAX_CLASS][PY_MAX_LEVEL/5];
90 extern const concptr color_names[16];
91 extern const concptr stat_names[6];
92 extern const concptr stat_names_reduced[6];
93 extern const concptr window_flag_desc[32];
95 extern const concptr game_inscriptions[];
96 extern const kamae kamae_shurui[MAX_KAMAE];
97 extern const kamae kata_shurui[MAX_KATA];
100 extern const concptr ident_info[];
101 extern const mbe_info_type mbe_info[];
102 extern const byte feature_action_flags[FF_FLAG_MAX];
103 extern const dragonbreath_type dragonbreath_info[];
106 extern const concptr copyright[5];
107 extern byte h_ver_major;
108 extern byte h_ver_minor;
109 extern byte h_ver_patch;
110 extern byte h_ver_extra;
111 extern byte sf_extra;
112 extern u32b sf_system;
117 extern u16b sf_lives;
118 extern u16b sf_saves;
119 extern bool arg_fiddle;
120 extern bool arg_wizard;
121 extern bool arg_music;
122 extern bool arg_sound;
123 extern byte arg_graphics;
124 extern bool arg_monochrome;
125 extern bool arg_force_original;
126 extern bool arg_force_roguelike;
127 extern bool arg_bigtile;
128 extern bool character_generated;
129 extern bool character_dungeon;
130 extern bool character_loaded;
131 extern bool character_saved;
132 extern bool character_icky;
133 extern bool character_xtra;
134 extern bool creating_savefile;
135 extern COMMAND_CODE command_cmd;
136 extern COMMAND_ARG command_arg;
137 extern s16b command_rep;
138 extern DIRECTION command_dir;
139 extern s16b command_see;
140 extern TERM_LEN command_gap;
141 extern s16b command_wrk;
142 extern s16b command_new;
143 extern bool msg_flag;
145 extern bool invoking_midnight_curse;
146 extern GAME_TURN old_battle;
147 extern bool use_sound;
148 extern bool use_music;
149 extern bool use_graphics;
150 extern bool use_bigtile;
151 extern s16b signal_count;
152 extern bool inkey_base;
153 extern bool inkey_xtra;
154 extern bool inkey_scan;
155 extern bool inkey_flag;
156 extern bool get_com_no_macros;
157 extern OBJECT_SUBTYPE_VALUE coin_type;
158 extern bool opening_chest;
159 extern bool shimmer_monsters;
160 extern bool shimmer_objects;
161 extern bool repair_monsters;
162 extern bool repair_objects;
163 extern MONSTER_IDX hack_m_idx;
164 extern MONSTER_IDX hack_m_idx_ii;
165 extern int total_friends;
166 extern int leaving_quest;
167 extern bool reinit_wilderness;
168 extern bool multi_rew;
169 extern char summon_kin_type;
170 extern bool is_loading_now;
171 extern bool reset_concent;
172 extern bool is_fired;
177 * Software options (set via the '=' command). See "tables.c"
181 extern char record_o_name[MAX_NLEN];
182 extern GAME_TURN record_turn;
183 extern POSITION panel_row_min, panel_row_max;
184 extern POSITION panel_col_min, panel_col_max;
185 extern POSITION panel_col_prt, panel_row_prt;
186 extern MONSTER_IDX target_who;
187 extern POSITION target_col;
188 extern POSITION target_row;
189 extern int player_uid;
190 extern int player_euid;
191 extern int player_egid;
192 extern char player_base[32];
193 extern char savefile[1024];
194 extern char savefile_base[40];
195 extern pos_list tmp_pos;
196 extern s16b macro__num;
197 extern concptr *macro__pat;
198 extern concptr *macro__act;
199 extern bool *macro__cmd;
200 extern char *macro__buf;
201 extern STR_OFFSET quark__num;
202 extern concptr *quark__str;
203 extern u32b message__next;
204 extern u32b message__last;
205 extern u32b message__head;
206 extern u32b message__tail;
207 extern u32b *message__ptr;
208 extern char *message__buf;
209 extern BIT_FLAGS option_flag[8];
210 extern BIT_FLAGS option_mask[8];
211 extern BIT_FLAGS window_flag[8];
212 extern BIT_FLAGS window_mask[8];
213 extern term *angband_term[8];
214 extern const char angband_term_name[8][16];
215 extern byte angband_color_table[256][4];
216 extern const concptr angband_sound_name[SOUND_MAX];
217 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
218 extern FLOOR_IDX max_floor_id;
219 extern u32b saved_floor_file_sign;
220 extern TOWN_IDX max_towns;
221 extern town_type *town_info;
222 extern s16b alloc_kind_size;
223 extern alloc_entry *alloc_kind_table;
224 extern s16b alloc_race_size;
225 extern alloc_entry *alloc_race_table;
226 extern TERM_COLOR misc_to_attr[256];
227 extern SYMBOL_CODE misc_to_char[256];
228 extern TERM_COLOR tval_to_attr[128];
229 extern SYMBOL_CODE tval_to_char[128];
230 extern concptr keymap_act[KEYMAP_MODES][256];
231 extern player_type *p_ptr;
232 extern const player_sex *sp_ptr;
233 extern const player_race *rp_ptr;
234 extern const player_seikaku *ap_ptr;
235 extern birther previous_char;
239 extern ego_item_type *e_info;
243 extern concptr ANGBAND_SYS;
244 extern concptr ANGBAND_KEYBOARD;
245 extern concptr ANGBAND_GRAF;
246 extern concptr ANGBAND_DIR;
247 extern concptr ANGBAND_DIR_APEX;
248 extern concptr ANGBAND_DIR_BONE;
249 extern concptr ANGBAND_DIR_DATA;
250 extern concptr ANGBAND_DIR_EDIT;
251 extern concptr ANGBAND_DIR_SCRIPT;
252 extern concptr ANGBAND_DIR_FILE;
253 extern concptr ANGBAND_DIR_HELP;
254 extern concptr ANGBAND_DIR_INFO;
255 extern concptr ANGBAND_DIR_PREF;
256 extern concptr ANGBAND_DIR_SAVE;
257 extern concptr ANGBAND_DIR_USER;
258 extern concptr ANGBAND_DIR_XTRA;
259 extern OBJECT_TYPE_VALUE item_tester_tval;
260 extern bool (*item_tester_hook)(object_type *o_ptr);
261 extern monsterrace_hook_type get_mon_num_hook;
262 extern monsterrace_hook_type get_mon_num2_hook;
263 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
265 extern QUEST_IDX max_q_idx;
266 extern MONRACE_IDX max_r_idx;
267 extern KIND_OBJECT_IDX max_k_idx;
268 extern VAULT_IDX max_v_idx;
269 extern FEAT_IDX max_f_idx;
270 extern ARTIFACT_IDX max_a_idx;
271 extern EGO_IDX max_e_idx;
272 extern DUNGEON_IDX max_d_idx;
273 extern char quest_text[10][80];
274 extern int quest_text_line;
275 extern int init_flags;
276 extern int highscore_fd;
277 extern bool can_save;
279 extern int cap_mspeed;
280 extern HIT_POINT cap_hp;
281 extern HIT_POINT cap_maxhp;
282 extern STR_OFFSET cap_nickname;
283 extern MONRACE_IDX battle_mon[4];
284 extern int sel_monster;
285 extern int battle_odds;
286 extern PRICE kakekin;
287 extern u32b mon_odds[4];
288 extern MONSTER_IDX pet_t_m_idx;
289 extern MONSTER_IDX riding_t_m_idx;
290 extern MONRACE_IDX today_mon;
291 extern bool write_level;
292 extern u32b start_time;
293 extern bool sukekaku;
294 extern bool new_mane;
295 extern bool mon_fight;
296 extern bool generate_encounter;
297 extern concptr screen_dump;
300 extern DEPTH *max_dlv;
301 extern FEAT_IDX feat_wall_outer;
302 extern FEAT_IDX feat_wall_inner;
303 extern FEAT_IDX feat_wall_solid;
304 extern FEAT_IDX feat_ground_type[100], feat_wall_type[100];
305 extern COMMAND_CODE now_message;
306 extern bool use_menu;
309 extern void autopick_load_pref(bool disp_mes);
310 extern errr process_autopick_file_command(char *buf);
311 extern concptr autopick_line_from_entry(autopick_type *entry);
312 extern int is_autopick(object_type *o_ptr);
313 extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
314 extern void autopick_delayed_alter(void);
315 extern void autopick_pickup_items(grid_type *g_ptr);
316 extern bool autopick_autoregister(object_type *o_ptr);
317 extern void do_cmd_edit_autopick(void);
321 extern void update_local_illumination(POSITION y, POSITION x);
322 extern bool player_can_see_bold(POSITION y, POSITION x);
323 extern bool cave_valid_bold(POSITION y, POSITION x);
324 extern bool no_lite(void);
325 extern void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x);
326 extern void delayed_visual_update(void);
327 extern void forget_flow(void);
328 extern void update_flow(void);
329 extern void update_smell(void);
330 extern void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat);
332 extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
333 extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
337 extern concptr get_ordinal_number_suffix(int num);
339 extern errr do_cmd_write_nikki(int type, int num, concptr note);
340 extern void do_cmd_nikki(void);
341 extern void do_cmd_redraw(void);
342 extern void do_cmd_change_name(void);
343 extern void do_cmd_message_one(void);
344 extern void do_cmd_messages(int num_now);
345 extern void do_cmd_options_aux(int page, concptr info);
346 extern void do_cmd_options(void);
347 extern void do_cmd_pref(void);
348 extern void do_cmd_reload_autopick(void);
349 extern void do_cmd_macros(void);
350 extern void do_cmd_visuals(void);
351 extern void do_cmd_colors(void);
352 extern void do_cmd_note(void);
353 extern void do_cmd_version(void);
354 extern void do_cmd_feeling(void);
355 extern void do_cmd_load_screen(void);
356 extern void do_cmd_save_screen_html_aux(char *filename, int message);
357 extern void do_cmd_save_screen(void);
358 extern void do_cmd_knowledge_quests_completed(FILE *fff, QUEST_IDX quest_num[]);
359 extern void do_cmd_knowledge_quests_failed(FILE *fff, QUEST_IDX quest_num[]);
360 extern void do_cmd_knowledge(void);
361 extern void plural_aux(char * Name);
362 extern void do_cmd_checkquest(void);
363 extern void do_cmd_time(void);
364 extern void do_cmd_suicide(void);
367 extern void play_game(bool new_game);
368 extern s32b turn_real(s32b hoge);
369 extern void prevent_turn_overflow(void);
370 extern void close_game(void);
373 extern errr rd_savefile_new(void);
374 extern bool load_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
377 extern void set_target(monster_type *m_ptr, POSITION y, POSITION x);
378 extern void reset_target(monster_type *m_ptr);
379 extern monster_race *real_r_ptr(monster_type *m_ptr);
380 extern MONRACE_IDX real_r_idx(monster_type *m_ptr);
381 extern void delete_monster_idx(MONSTER_IDX i);
382 extern void delete_monster(POSITION y, POSITION x);
383 extern void compact_monsters(int size);
384 extern void wipe_m_list(void);
385 extern MONSTER_IDX m_pop(void);
386 extern errr get_mon_num_prep(monsterrace_hook_type monster_hook, monsterrace_hook_type monster_hook2);
387 extern MONRACE_IDX get_mon_num(DEPTH level);
388 extern int lore_do_probe(MONRACE_IDX r_idx);
389 extern void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
390 extern void update_monster(MONSTER_IDX m_idx, bool full);
391 extern void update_monsters(bool full);
392 extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
393 extern void update_smart_learn(MONSTER_IDX m_idx, int what);
394 extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
395 extern SPEED get_mspeed(monster_race *r_ptr);
396 extern void monster_drop_carried_objects(monster_type *m_ptr);
399 extern void reset_visuals(void);
400 extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
401 extern void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
402 extern concptr item_activation(object_type *o_ptr);
403 extern bool screen_object(object_type *o_ptr, BIT_FLAGS mode);
404 extern char index_to_label(int i);
405 extern INVENTORY_IDX label_to_inven(int c);
406 extern INVENTORY_IDX label_to_equip(int c);
407 extern s16b wield_slot(object_type *o_ptr);
408 extern concptr mention_use(int i);
409 extern concptr describe_use(int i);
410 extern bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
411 extern bool item_tester_okay(object_type *o_ptr);
412 extern void display_inven(void);
413 extern void display_equip(void);
414 extern COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode);
415 extern COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode);
416 extern void toggle_inven_equip(void);
417 extern bool can_get_item(void);
418 extern bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode);
419 extern object_type *choose_object(OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option);
420 PERCENTAGE breakage_chance(object_type *o_ptr, SPELL_IDX snipe_type);
423 extern void excise_object_idx(OBJECT_IDX o_idx);
424 extern void delete_object_idx(OBJECT_IDX o_idx);
425 extern void delete_object(POSITION y, POSITION x);
426 extern void compact_objects(int size);
427 extern void wipe_o_list(void);
428 extern OBJECT_IDX o_pop(void);
429 extern OBJECT_IDX get_obj_num(DEPTH level);
430 extern void object_known(object_type *o_ptr);
431 extern void object_aware(object_type *o_ptr);
432 extern void object_tried(object_type *o_ptr);
433 extern byte value_check_aux1(object_type *o_ptr);
434 extern byte value_check_aux2(object_type *o_ptr);
435 extern PRICE object_value(object_type *o_ptr);
436 extern PRICE object_value_real(object_type *o_ptr);
437 extern void distribute_charges(object_type *o_ptr, object_type *q_ptr, int amt);
438 extern void reduce_charges(object_type *o_ptr, int amt);
439 extern int object_similar_part(object_type *o_ptr, object_type *j_ptr);
440 extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
441 extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
442 extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval);
443 extern void object_wipe(object_type *o_ptr);
444 extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
445 extern void object_copy(object_type *o_ptr, object_type *j_ptr);
446 extern void apply_magic(object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
447 extern bool make_object(object_type *j_ptr, BIT_FLAGS mode);
448 extern void place_object(POSITION y, POSITION x, BIT_FLAGS mode);
449 extern bool make_gold(object_type *j_ptr);
450 extern void place_gold(POSITION y, POSITION x);
451 extern OBJECT_IDX drop_near(object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
452 extern void inven_item_charges(INVENTORY_IDX item);
453 extern void inven_item_describe(INVENTORY_IDX item);
454 extern void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
455 extern void inven_item_optimize(INVENTORY_IDX item);
456 extern void floor_item_charges(INVENTORY_IDX item);
457 extern void floor_item_describe(INVENTORY_IDX item);
458 extern void floor_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
459 extern void floor_item_optimize(INVENTORY_IDX item);
460 extern bool inven_carry_okay(object_type *o_ptr);
461 extern bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr);
462 extern s16b inven_carry(object_type *o_ptr);
463 extern INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt);
464 extern void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt);
465 extern void combine_pack(void);
466 extern void reorder_pack(void);
467 extern void display_koff(KIND_OBJECT_IDX k_idx);
468 extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
469 extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
470 extern void torch_lost_fuel(object_type *o_ptr);
471 extern concptr essence_name[];
474 extern void do_cmd_racial_power(void);
477 extern bool save_player(void);
478 extern bool load_player(void);
479 extern void remove_loc(void);
480 extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
483 extern PERCENTAGE beam_chance(void);
484 extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
485 extern void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
486 extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
487 extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
488 extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
489 extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
490 extern int project_length;
491 extern bool binding_field(HIT_POINT dam);
492 extern void seal_of_mirror(HIT_POINT dam);
493 extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
496 extern bool detect_traps(POSITION range, bool known);
497 extern bool detect_doors(POSITION range);
498 extern bool detect_stairs(POSITION range);
499 extern bool detect_treasure(POSITION range);
500 extern bool detect_objects_gold(POSITION range);
501 extern bool detect_objects_normal(POSITION range);
502 extern bool detect_objects_magic(POSITION range);
503 extern bool detect_monsters_normal(POSITION range);
504 extern bool detect_monsters_invis(POSITION range);
505 extern bool detect_monsters_evil(POSITION range);
506 extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
507 extern bool detect_monsters_string(POSITION range, concptr);
508 extern bool detect_monsters_nonliving(POSITION range);
509 extern bool detect_monsters_mind(POSITION range);
510 extern bool detect_all(POSITION range);
511 extern bool wall_stone(void);
512 extern bool speed_monsters(void);
513 extern bool slow_monsters(int power);
514 extern bool sleep_monsters(int power);
515 extern void aggravate_monsters(MONSTER_IDX who);
516 extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
517 extern bool symbol_genocide(int power, bool player_cast);
518 extern bool mass_genocide(int power, bool player_cast);
519 extern bool mass_genocide_undead(int power, bool player_cast);
520 extern bool probing(void);
521 extern bool banish_evil(int dist);
522 extern bool dispel_evil(HIT_POINT dam);
523 extern bool dispel_good(HIT_POINT dam);
524 extern bool dispel_undead(HIT_POINT dam);
525 extern bool dispel_monsters(HIT_POINT dam);
526 extern bool dispel_living(HIT_POINT dam);
527 extern bool dispel_demons(HIT_POINT dam);
528 extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
529 extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
530 extern bool crusade(void);
531 extern bool turn_undead(void);
532 extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
533 extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
534 extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
535 extern void lite_room(POSITION y1, POSITION x1);
536 extern bool starlight(bool magic);
537 extern void unlite_room(POSITION y1, POSITION x1);
538 extern bool lite_area(HIT_POINT dam, POSITION rad);
539 extern bool unlite_area(HIT_POINT dam, POSITION rad);
540 extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
541 extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
542 extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
543 extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
544 extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
545 extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
546 extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
547 extern void call_chaos(void);
548 extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
549 extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
550 extern bool lite_line(DIRECTION dir, HIT_POINT dam);
551 extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
552 extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
553 extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
554 extern bool destroy_door(DIRECTION dir);
555 extern bool disarm_trap(DIRECTION dir);
556 extern bool wizard_lock(DIRECTION dir);
557 extern bool teleport_monster(DIRECTION dir, int distance);
558 extern bool door_creation(void);
559 extern bool trap_creation(POSITION y, POSITION x);
560 extern bool tree_creation(void);
561 extern bool glyph_creation(void);
562 extern bool destroy_doors_touch(void);
563 extern bool disarm_traps_touch(void);
564 extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
565 extern bool sleep_monsters_touch(void);
566 extern bool activate_ty_curse(bool stop_ty, int *count);
567 extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
568 extern void wall_breaker(void);
569 extern bool confuse_monsters(HIT_POINT dam);
570 extern bool charm_monsters(HIT_POINT dam);
571 extern bool charm_animals(HIT_POINT dam);
572 extern bool stun_monsters(HIT_POINT dam);
573 extern bool stasis_monsters(HIT_POINT dam);
574 extern bool banish_monsters(int dist);
575 extern bool turn_monsters(HIT_POINT dam);
576 extern bool turn_evil(HIT_POINT dam);
577 extern bool deathray_monsters(void);
578 extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
579 extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
580 extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
581 extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
582 extern bool mindblast_monsters(HIT_POINT dam);
583 extern s32b flag_cost(object_type *o_ptr, int plusses);
584 extern bool teleport_swap(DIRECTION dir);
585 extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
586 extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
587 extern bool eat_magic(int power);
588 extern void discharge_minion(void);
589 extern bool kawarimi(bool success);
590 extern bool rush_attack(bool *mdeath);
591 extern void remove_all_mirrors(bool explode);
592 extern void ring_of_power(DIRECTION dir);
593 extern void wild_magic(int spell);
594 extern void cast_meteor(HIT_POINT dam, POSITION rad);
595 extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
596 extern void cast_wonder(DIRECTION dir);
597 extern void cast_invoke_spirits(DIRECTION dir);
598 extern void cast_shuffle(void);
599 extern void stop_mouth(void);
600 extern bool_hack vampirism(void);
601 extern bool panic_hit(void);
602 extern bool psychometry(void);
603 extern bool draconian_breath(player_type *creature_ptr);
604 extern bool android_inside_weapon(player_type *creature_ptr);
605 extern bool create_ration(player_type *crature_ptr);
606 extern void hayagake(player_type *creature_ptr);
607 extern bool double_attack(player_type *creature_ptr);
608 extern bool comvert_hp_to_mp(player_type *creature_ptr);
609 extern bool comvert_mp_to_hp(player_type *creature_ptr);
610 extern bool demonic_breath(player_type *creature_ptr);
611 extern bool mirror_concentration(player_type *creature_ptr);
612 extern bool sword_dancing(player_type *creature_ptr);
613 extern bool confusing_light(player_type *creature_ptr);
614 extern bool rodeo(player_type *creature_ptr);
615 extern bool clear_mind(player_type *creature_ptr);
616 extern bool concentration(player_type *creature_ptr);
619 extern void handle_stuff(void);
620 extern void update_output(void);
621 extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
622 extern void update_playtime(void);
625 extern void panel_bounds_center(void);
626 extern void verify_panel(void);
627 extern bool target_able(MONSTER_IDX m_idx);
628 extern bool target_okay(void);
629 extern bool target_set(BIT_FLAGS mode);
630 extern void target_set_prepare_look(void);
631 extern bool get_aim_dir(DIRECTION *dp);
632 extern bool get_hack_dir(DIRECTION *dp);
633 extern bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed);
634 extern bool get_rep_dir(DIRECTION *dp, bool under);
635 extern bool tgt_pt(POSITION *x, POSITION *y);
638 * Hack -- conditional (or "bizarre") externs
643 extern void user_name(char *buf, int id);
649 extern int stricmp(concptr a, concptr b);
655 extern int usleep(huge usecs);
660 /* extern void main(void); */
663 #if defined(MAC_MPW) || defined(MACH_O_CARBON)
666 extern u32b _fcreator;
669 #if defined(MAC_MPW) && defined(CARBON)
670 extern void convert_pathname(char *path);
673 #if defined(MACH_O_CARBON)
674 extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype);
679 /* extern int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, ...); */
683 extern void repeat_push(COMMAND_CODE what);
684 extern bool repeat_pull(COMMAND_CODE *what);
685 extern void repeat_check(void);
687 extern bool easy_disarm;
688 extern bool easy_floor;
689 extern bool easy_open;
693 extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
694 extern COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width);
695 extern bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode);
696 extern void py_pickup_floor(bool pickup);
699 extern void spoil_random_artifact(concptr fname);
702 extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx);
703 extern void cheat_death(player_type *creature_ptr);
708 extern void sindarin_to_kana(char *kana, concptr sindarin);
709 extern void jverb( concptr in , char *out , int flag);
710 extern void sjis2euc(char *str);
711 extern void euc2sjis(char *str);
712 extern byte codeconv(char *str);
713 extern bool iskanji2(concptr s, int x);
714 extern void guess_convert_to_system_encoding(char* strbuf, int buflen);
719 extern errr report_score(void);
720 extern concptr make_screen_dump(void);
724 extern int soc_write(int sd, char *buf, size_t sz);
725 extern int soc_read(int sd, char *buf, size_t sz);
726 extern void set_proxy(char *default_url, int default_port);
727 extern int connect_server(int timeout, concptr host, int port);
728 extern int disconnect_server(int sd);
729 extern concptr soc_err(void);
731 extern void prepare_movie_hooks(void);
732 extern void prepare_browse_movie_aux(concptr filename);
733 extern void prepare_browse_movie(concptr filename);
734 extern void browse_movie(void);
735 extern bool browsing_movie;
737 extern void kamaenaoshi(INVENTORY_IDX item);