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)
18 * Automatically generated "variable" declarations
20 extern int max_macrotrigger;
21 extern concptr macro_template;
22 extern concptr macro_modifier_chr;
23 extern concptr macro_modifier_name[MAX_MACRO_MOD];
24 extern concptr macro_trigger_name[MAX_MACRO_TRIG];
25 extern concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
30 * List for auto-picker/destroyer entries
32 extern int max_autopick;
33 extern int max_max_autopick;
34 extern autopick_type *autopick_list;
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_str_blow[];
65 extern const byte adj_dex_blow[];
66 extern const byte adj_dex_safe[];
67 extern const byte adj_con_fix[];
68 extern const byte adj_con_mhp[];
69 extern const byte adj_chr_chm[];
70 extern const byte blows_table[12][12];
71 extern const byte extract_energy[200];
72 extern const player_sex sex_info[MAX_SEXES];
73 extern const player_race race_info[MAX_RACES];
74 extern const player_class class_info[MAX_CLASS];
75 extern const magic_type technic_info[NUM_TECHNIC][32];
76 extern const player_seikaku seikaku_info[MAX_SEIKAKU];
77 extern const player_race mimic_info[];
78 extern const u32b fake_spell_flags[4];
79 extern const s32b realm_choices1[];
80 extern const s32b realm_choices2[];
81 extern const concptr realm_names[];
83 extern const concptr E_realm_names[];
85 extern const concptr spell_names[VALID_REALM][32];
86 extern const concptr player_title[MAX_CLASS][PY_MAX_LEVEL/5];
87 extern const concptr color_names[16];
88 extern const concptr stat_names[6];
89 extern const concptr stat_names_reduced[6];
90 extern const concptr window_flag_desc[32];
91 extern const martial_arts ma_blows[MAX_MA];
92 extern const int monk_ave_damage[PY_MAX_LEVEL+1][3];
93 extern const concptr game_inscriptions[];
94 extern const kamae kamae_shurui[MAX_KAMAE];
95 extern const kamae kata_shurui[MAX_KATA];
98 extern const concptr ident_info[];
99 extern const mbe_info_type mbe_info[];
100 extern const byte feature_action_flags[FF_FLAG_MAX];
101 extern const dragonbreath_type dragonbreath_info[];
104 extern const concptr copyright[5];
105 extern byte h_ver_major;
106 extern byte h_ver_minor;
107 extern byte h_ver_patch;
108 extern byte h_ver_extra;
109 extern byte sf_extra;
110 extern u32b sf_system;
115 extern u16b sf_lives;
116 extern u16b sf_saves;
117 extern bool arg_fiddle;
118 extern bool arg_wizard;
119 extern bool arg_music;
120 extern bool arg_sound;
121 extern byte arg_graphics;
122 extern bool arg_monochrome;
123 extern bool arg_force_original;
124 extern bool arg_force_roguelike;
125 extern bool arg_bigtile;
126 extern bool character_generated;
127 extern bool character_dungeon;
128 extern bool character_loaded;
129 extern bool character_saved;
130 extern bool character_icky;
131 extern bool character_xtra;
132 extern bool creating_savefile;
133 extern u32b seed_flavor;
134 extern u32b seed_town;
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 s16b inven_cnt;
164 extern s16b equip_cnt;
165 extern OBJECT_IDX o_max;
166 extern OBJECT_IDX o_cnt;
167 extern MONSTER_IDX m_max;
168 extern MONSTER_IDX m_cnt;
169 extern MONSTER_IDX hack_m_idx;
170 extern MONSTER_IDX hack_m_idx_ii;
171 extern int total_friends;
172 extern int leaving_quest;
173 extern bool reinit_wilderness;
174 extern bool multi_rew;
175 extern char summon_kin_type;
176 extern bool is_loading_now;
177 extern bool hack_mutation;
178 extern bool reset_concent;
179 extern bool is_fired;
184 * Software options (set via the '=' command). See "tables.c"
188 extern char record_o_name[MAX_NLEN];
189 extern GAME_TURN record_turn;
190 extern bool closing_flag;
191 extern POSITION panel_row_min, panel_row_max;
192 extern POSITION panel_col_min, panel_col_max;
193 extern POSITION panel_col_prt, panel_row_prt;
194 extern MONSTER_IDX target_who;
195 extern POSITION target_col;
196 extern POSITION target_row;
197 extern int player_uid;
198 extern int player_euid;
199 extern int player_egid;
200 extern char player_base[32];
201 extern char savefile[1024];
202 extern char savefile_base[40];
203 extern pos_list tmp_pos;
204 extern s16b macro__num;
205 extern concptr *macro__pat;
206 extern concptr *macro__act;
207 extern bool *macro__cmd;
208 extern char *macro__buf;
209 extern STR_OFFSET quark__num;
210 extern concptr *quark__str;
211 extern u32b message__next;
212 extern u32b message__last;
213 extern u32b message__head;
214 extern u32b message__tail;
215 extern u32b *message__ptr;
216 extern char *message__buf;
217 extern BIT_FLAGS option_flag[8];
218 extern BIT_FLAGS option_mask[8];
219 extern BIT_FLAGS window_flag[8];
220 extern BIT_FLAGS window_mask[8];
221 extern term *angband_term[8];
222 extern const char angband_term_name[8][16];
223 extern byte angband_color_table[256][4];
224 extern const concptr angband_sound_name[SOUND_MAX];
225 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
226 extern FLOOR_IDX max_floor_id;
227 extern u32b saved_floor_file_sign;
228 extern TOWN_IDX max_towns;
229 extern town_type *town_info;
230 extern object_type *inventory;
231 extern s16b alloc_kind_size;
232 extern alloc_entry *alloc_kind_table;
233 extern s16b alloc_race_size;
234 extern alloc_entry *alloc_race_table;
235 extern TERM_COLOR misc_to_attr[256];
236 extern SYMBOL_CODE misc_to_char[256];
237 extern TERM_COLOR tval_to_attr[128];
238 extern SYMBOL_CODE tval_to_char[128];
239 extern concptr keymap_act[KEYMAP_MODES][256];
240 extern player_type *p_ptr;
241 extern const player_sex *sp_ptr;
242 extern const player_race *rp_ptr;
243 extern const player_class *cp_ptr;
244 extern const player_seikaku *ap_ptr;
245 extern const player_magic *mp_ptr;
246 extern birther previous_char;
247 extern vault_type *v_info;
250 extern skill_table *s_info;
251 extern player_magic *m_info;
254 extern object_kind *k_info;
257 extern ego_item_type *e_info;
260 extern monster_race *r_info;
264 extern concptr ANGBAND_SYS;
265 extern concptr ANGBAND_KEYBOARD;
266 extern concptr ANGBAND_GRAF;
267 extern concptr ANGBAND_DIR;
268 extern concptr ANGBAND_DIR_APEX;
269 extern concptr ANGBAND_DIR_BONE;
270 extern concptr ANGBAND_DIR_DATA;
271 extern concptr ANGBAND_DIR_EDIT;
272 extern concptr ANGBAND_DIR_SCRIPT;
273 extern concptr ANGBAND_DIR_FILE;
274 extern concptr ANGBAND_DIR_HELP;
275 extern concptr ANGBAND_DIR_INFO;
276 extern concptr ANGBAND_DIR_PREF;
277 extern concptr ANGBAND_DIR_SAVE;
278 extern concptr ANGBAND_DIR_USER;
279 extern concptr ANGBAND_DIR_XTRA;
280 extern OBJECT_TYPE_VALUE item_tester_tval;
281 extern bool (*item_tester_hook)(object_type *o_ptr);
282 extern monsterrace_hook_type get_mon_num_hook;
283 extern monsterrace_hook_type get_mon_num2_hook;
284 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
286 extern QUEST_IDX max_q_idx;
287 extern MONRACE_IDX max_r_idx;
288 extern KIND_OBJECT_IDX max_k_idx;
289 extern VAULT_IDX max_v_idx;
290 extern FEAT_IDX max_f_idx;
291 extern ARTIFACT_IDX max_a_idx;
292 extern EGO_IDX max_e_idx;
293 extern DUNGEON_IDX max_d_idx;
294 extern char quest_text[10][80];
295 extern int quest_text_line;
296 extern int init_flags;
297 extern int highscore_fd;
298 extern bool can_save;
300 extern int cap_mspeed;
301 extern HIT_POINT cap_hp;
302 extern HIT_POINT cap_maxhp;
303 extern STR_OFFSET cap_nickname;
304 extern MONRACE_IDX battle_mon[4];
305 extern int sel_monster;
306 extern int battle_odds;
307 extern PRICE kakekin;
308 extern u32b mon_odds[4];
309 extern MONSTER_IDX pet_t_m_idx;
310 extern MONSTER_IDX riding_t_m_idx;
311 extern MONRACE_IDX today_mon;
312 extern bool write_level;
313 extern u32b start_time;
314 extern bool sukekaku;
315 extern bool new_mane;
316 extern bool mon_fight;
317 extern bool generate_encounter;
318 extern concptr screen_dump;
321 extern DEPTH *max_dlv;
322 extern FEAT_IDX feat_wall_outer;
323 extern FEAT_IDX feat_wall_inner;
324 extern FEAT_IDX feat_wall_solid;
325 extern FEAT_IDX feat_ground_type[100], feat_wall_type[100];
326 extern COMMAND_CODE now_message;
327 extern bool use_menu;
330 extern void autopick_load_pref(bool disp_mes);
331 extern errr process_autopick_file_command(char *buf);
332 extern concptr autopick_line_from_entry(autopick_type *entry);
333 extern int is_autopick(object_type *o_ptr);
334 extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
335 extern void autopick_delayed_alter(void);
336 extern void autopick_pickup_items(grid_type *g_ptr);
337 extern bool autopick_autoregister(object_type *o_ptr);
338 extern void do_cmd_edit_autopick(void);
342 extern void update_local_illumination(POSITION y, POSITION x);
343 extern bool player_can_see_bold(POSITION y, POSITION x);
344 extern bool cave_valid_bold(POSITION y, POSITION x);
345 extern bool no_lite(void);
346 extern void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x);
347 extern void delayed_visual_update(void);
348 extern void forget_flow(void);
349 extern void update_flow(void);
350 extern void update_smell(void);
351 extern void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat);
353 extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
354 extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
358 extern concptr get_ordinal_number_suffix(int num);
360 extern errr do_cmd_write_nikki(int type, int num, concptr note);
361 extern void do_cmd_nikki(void);
362 extern void do_cmd_redraw(void);
363 extern void do_cmd_change_name(void);
364 extern void do_cmd_message_one(void);
365 extern void do_cmd_messages(int num_now);
366 extern void do_cmd_options_aux(int page, concptr info);
367 extern void do_cmd_options(void);
368 extern void do_cmd_pref(void);
369 extern void do_cmd_reload_autopick(void);
370 extern void do_cmd_macros(void);
371 extern void do_cmd_visuals(void);
372 extern void do_cmd_colors(void);
373 extern void do_cmd_note(void);
374 extern void do_cmd_version(void);
375 extern void do_cmd_feeling(void);
376 extern void do_cmd_load_screen(void);
377 extern void do_cmd_save_screen_html_aux(char *filename, int message);
378 extern void do_cmd_save_screen(void);
379 extern void do_cmd_knowledge_quests_completed(FILE *fff, QUEST_IDX quest_num[]);
380 extern void do_cmd_knowledge_quests_failed(FILE *fff, QUEST_IDX quest_num[]);
381 extern void do_cmd_knowledge(void);
382 extern void plural_aux(char * Name);
383 extern void do_cmd_checkquest(void);
384 extern void do_cmd_time(void);
385 extern void do_cmd_suicide(void);
388 extern void extract_option_vars(void);
389 extern void determine_bounty_uniques(void);
390 extern void determine_today_mon(bool conv_old);
391 extern void play_game(bool new_game);
392 extern s32b turn_real(s32b hoge);
393 extern void prevent_turn_overflow(void);
394 extern void close_game(void);
397 extern errr rd_savefile_new(void);
398 extern bool load_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
401 extern void set_target(monster_type *m_ptr, POSITION y, POSITION x);
402 extern void reset_target(monster_type *m_ptr);
403 extern monster_race *real_r_ptr(monster_type *m_ptr);
404 extern MONRACE_IDX real_r_idx(monster_type *m_ptr);
405 extern void delete_monster_idx(MONSTER_IDX i);
406 extern void delete_monster(POSITION y, POSITION x);
407 extern void compact_monsters(int size);
408 extern void wipe_m_list(void);
409 extern MONSTER_IDX m_pop(void);
410 extern errr get_mon_num_prep(monsterrace_hook_type monster_hook, monsterrace_hook_type monster_hook2);
411 extern MONRACE_IDX get_mon_num(DEPTH level);
412 extern int lore_do_probe(MONRACE_IDX r_idx);
413 extern void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
414 extern void update_monster(MONSTER_IDX m_idx, bool full);
415 extern void update_monsters(bool full);
416 extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
417 extern void update_smart_learn(MONSTER_IDX m_idx, int what);
418 extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
419 extern SPEED get_mspeed(monster_race *r_ptr);
420 extern void monster_drop_carried_objects(monster_type *m_ptr);
423 extern void reset_visuals(void);
424 extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
425 extern void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
426 extern concptr item_activation(object_type *o_ptr);
427 extern bool screen_object(object_type *o_ptr, BIT_FLAGS mode);
428 extern char index_to_label(int i);
429 extern INVENTORY_IDX label_to_inven(int c);
430 extern INVENTORY_IDX label_to_equip(int c);
431 extern s16b wield_slot(object_type *o_ptr);
432 extern concptr mention_use(int i);
433 extern concptr describe_use(int i);
434 extern bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
435 extern bool item_tester_okay(object_type *o_ptr);
436 extern void display_inven(void);
437 extern void display_equip(void);
438 extern COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode);
439 extern COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode);
440 extern void toggle_inven_equip(void);
441 extern bool can_get_item(void);
442 extern bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode);
443 extern object_type *choose_object(OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option);
444 PERCENTAGE breakage_chance(object_type *o_ptr, SPELL_IDX snipe_type);
447 extern void excise_object_idx(OBJECT_IDX o_idx);
448 extern void delete_object_idx(OBJECT_IDX o_idx);
449 extern void delete_object(POSITION y, POSITION x);
450 extern void compact_objects(int size);
451 extern void wipe_o_list(void);
452 extern OBJECT_IDX o_pop(void);
453 extern OBJECT_IDX get_obj_num(DEPTH level);
454 extern void object_known(object_type *o_ptr);
455 extern void object_aware(object_type *o_ptr);
456 extern void object_tried(object_type *o_ptr);
457 extern byte value_check_aux1(object_type *o_ptr);
458 extern byte value_check_aux2(object_type *o_ptr);
459 extern PRICE object_value(object_type *o_ptr);
460 extern PRICE object_value_real(object_type *o_ptr);
461 extern void distribute_charges(object_type *o_ptr, object_type *q_ptr, int amt);
462 extern void reduce_charges(object_type *o_ptr, int amt);
463 extern int object_similar_part(object_type *o_ptr, object_type *j_ptr);
464 extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
465 extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
466 extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval);
467 extern void object_wipe(object_type *o_ptr);
468 extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
469 extern void object_copy(object_type *o_ptr, object_type *j_ptr);
470 extern void apply_magic(object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
471 extern bool make_object(object_type *j_ptr, BIT_FLAGS mode);
472 extern void place_object(POSITION y, POSITION x, BIT_FLAGS mode);
473 extern bool make_gold(object_type *j_ptr);
474 extern void place_gold(POSITION y, POSITION x);
475 extern OBJECT_IDX drop_near(object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
476 extern void inven_item_charges(INVENTORY_IDX item);
477 extern void inven_item_describe(INVENTORY_IDX item);
478 extern void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
479 extern void inven_item_optimize(INVENTORY_IDX item);
480 extern void floor_item_charges(INVENTORY_IDX item);
481 extern void floor_item_describe(INVENTORY_IDX item);
482 extern void floor_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
483 extern void floor_item_optimize(INVENTORY_IDX item);
484 extern bool inven_carry_okay(object_type *o_ptr);
485 extern bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr);
486 extern s16b inven_carry(object_type *o_ptr);
487 extern INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt);
488 extern void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt);
489 extern void combine_pack(void);
490 extern void reorder_pack(void);
491 extern void display_koff(KIND_OBJECT_IDX k_idx);
492 extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
493 extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
494 extern void torch_lost_fuel(object_type *o_ptr);
495 extern concptr essence_name[];
498 extern void do_cmd_racial_power(void);
501 extern bool save_player(void);
502 extern bool load_player(void);
503 extern void remove_loc(void);
504 extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
507 extern PERCENTAGE beam_chance(void);
508 extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
509 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);
510 extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
511 extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
512 extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
513 extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
514 extern int project_length;
515 extern bool binding_field(HIT_POINT dam);
516 extern void seal_of_mirror(HIT_POINT dam);
517 extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
520 extern bool detect_traps(POSITION range, bool known);
521 extern bool detect_doors(POSITION range);
522 extern bool detect_stairs(POSITION range);
523 extern bool detect_treasure(POSITION range);
524 extern bool detect_objects_gold(POSITION range);
525 extern bool detect_objects_normal(POSITION range);
526 extern bool detect_objects_magic(POSITION range);
527 extern bool detect_monsters_normal(POSITION range);
528 extern bool detect_monsters_invis(POSITION range);
529 extern bool detect_monsters_evil(POSITION range);
530 extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
531 extern bool detect_monsters_string(POSITION range, concptr);
532 extern bool detect_monsters_nonliving(POSITION range);
533 extern bool detect_monsters_mind(POSITION range);
534 extern bool detect_all(POSITION range);
535 extern bool wall_stone(void);
536 extern bool speed_monsters(void);
537 extern bool slow_monsters(int power);
538 extern bool sleep_monsters(int power);
539 extern void aggravate_monsters(MONSTER_IDX who);
540 extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
541 extern bool symbol_genocide(int power, bool player_cast);
542 extern bool mass_genocide(int power, bool player_cast);
543 extern bool mass_genocide_undead(int power, bool player_cast);
544 extern bool probing(void);
545 extern bool banish_evil(int dist);
546 extern bool dispel_evil(HIT_POINT dam);
547 extern bool dispel_good(HIT_POINT dam);
548 extern bool dispel_undead(HIT_POINT dam);
549 extern bool dispel_monsters(HIT_POINT dam);
550 extern bool dispel_living(HIT_POINT dam);
551 extern bool dispel_demons(HIT_POINT dam);
552 extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
553 extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
554 extern bool crusade(void);
555 extern bool turn_undead(void);
556 extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
557 extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
558 extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
559 extern void lite_room(POSITION y1, POSITION x1);
560 extern bool starlight(bool magic);
561 extern void unlite_room(POSITION y1, POSITION x1);
562 extern bool lite_area(HIT_POINT dam, POSITION rad);
563 extern bool unlite_area(HIT_POINT dam, POSITION rad);
564 extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
565 extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
566 extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
567 extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
568 extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
569 extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
570 extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
571 extern void call_chaos(void);
572 extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
573 extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
574 extern bool lite_line(DIRECTION dir, HIT_POINT dam);
575 extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
576 extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
577 extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
578 extern bool destroy_door(DIRECTION dir);
579 extern bool disarm_trap(DIRECTION dir);
580 extern bool wizard_lock(DIRECTION dir);
581 extern bool teleport_monster(DIRECTION dir, int distance);
582 extern bool door_creation(void);
583 extern bool trap_creation(POSITION y, POSITION x);
584 extern bool tree_creation(void);
585 extern bool glyph_creation(void);
586 extern bool destroy_doors_touch(void);
587 extern bool disarm_traps_touch(void);
588 extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
589 extern bool sleep_monsters_touch(void);
590 extern bool activate_ty_curse(bool stop_ty, int *count);
591 extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
592 extern void wall_breaker(void);
593 extern bool confuse_monsters(HIT_POINT dam);
594 extern bool charm_monsters(HIT_POINT dam);
595 extern bool charm_animals(HIT_POINT dam);
596 extern bool stun_monsters(HIT_POINT dam);
597 extern bool stasis_monsters(HIT_POINT dam);
598 extern bool banish_monsters(int dist);
599 extern bool turn_monsters(HIT_POINT dam);
600 extern bool turn_evil(HIT_POINT dam);
601 extern bool deathray_monsters(void);
602 extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
603 extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
604 extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
605 extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
606 extern bool mindblast_monsters(HIT_POINT dam);
607 extern s32b flag_cost(object_type *o_ptr, int plusses);
608 extern bool teleport_swap(DIRECTION dir);
609 extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
610 extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
611 extern bool eat_magic(int power);
612 extern void discharge_minion(void);
613 extern bool kawarimi(bool success);
614 extern bool rush_attack(bool *mdeath);
615 extern void remove_all_mirrors(bool explode);
616 extern void ring_of_power(DIRECTION dir);
617 extern void wild_magic(int spell);
618 extern void cast_meteor(HIT_POINT dam, POSITION rad);
619 extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
620 extern void cast_wonder(DIRECTION dir);
621 extern void cast_invoke_spirits(DIRECTION dir);
622 extern void cast_shuffle(void);
623 extern void stop_mouth(void);
624 extern bool_hack vampirism(void);
625 extern bool panic_hit(void);
626 extern bool psychometry(void);
627 extern bool draconian_breath(player_type *creature_ptr);
628 extern bool android_inside_weapon(player_type *creature_ptr);
629 extern bool create_ration(player_type *crature_ptr);
630 extern void hayagake(player_type *creature_ptr);
631 extern bool double_attack(player_type *creature_ptr);
632 extern bool comvert_hp_to_mp(player_type *creature_ptr);
633 extern bool comvert_mp_to_hp(player_type *creature_ptr);
634 extern bool demonic_breath(player_type *creature_ptr);
635 extern bool mirror_concentration(player_type *creature_ptr);
636 extern bool sword_dancing(player_type *creature_ptr);
637 extern bool confusing_light(player_type *creature_ptr);
638 extern bool rodeo(player_type *creature_ptr);
639 extern bool clear_mind(player_type *creature_ptr);
640 extern bool concentration(player_type *creature_ptr);
643 extern void handle_stuff(void);
644 extern void update_output(void);
645 extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
646 extern void update_playtime(void);
649 extern void panel_bounds_center(void);
650 extern void verify_panel(void);
651 extern bool target_able(MONSTER_IDX m_idx);
652 extern bool target_okay(void);
653 extern bool target_set(BIT_FLAGS mode);
654 extern void target_set_prepare_look(void);
655 extern bool get_aim_dir(DIRECTION *dp);
656 extern bool get_hack_dir(DIRECTION *dp);
657 extern bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed);
658 extern bool get_rep_dir(DIRECTION *dp, bool under);
659 extern bool tgt_pt(POSITION *x, POSITION *y);
662 * Hack -- conditional (or "bizarre") externs
667 extern void user_name(char *buf, int id);
673 extern int stricmp(concptr a, concptr b);
679 extern int usleep(huge usecs);
684 /* extern void main(void); */
687 #if defined(MAC_MPW) || defined(MACH_O_CARBON)
690 extern u32b _fcreator;
693 #if defined(MAC_MPW) && defined(CARBON)
694 extern void convert_pathname(char *path);
697 #if defined(MACH_O_CARBON)
698 extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype);
703 /* extern int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, ...); */
707 extern void repeat_push(COMMAND_CODE what);
708 extern bool repeat_pull(COMMAND_CODE *what);
709 extern void repeat_check(void);
711 extern bool easy_disarm;
712 extern bool easy_floor;
713 extern bool easy_open;
717 extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
718 extern COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width);
719 extern bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode);
720 extern void py_pickup_floor(bool pickup);
723 extern void spoil_random_artifact(concptr fname);
726 extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx);
727 extern void cheat_death(player_type *creature_ptr);
732 extern void sindarin_to_kana(char *kana, concptr sindarin);
733 extern void jverb( concptr in , char *out , int flag);
734 extern void sjis2euc(char *str);
735 extern void euc2sjis(char *str);
736 extern byte codeconv(char *str);
737 extern bool iskanji2(concptr s, int x);
738 extern void guess_convert_to_system_encoding(char* strbuf, int buflen);
743 extern errr report_score(void);
744 extern concptr make_screen_dump(void);
748 extern int soc_write(int sd, char *buf, size_t sz);
749 extern int soc_read(int sd, char *buf, size_t sz);
750 extern void set_proxy(char *default_url, int default_port);
751 extern int connect_server(int timeout, concptr host, int port);
752 extern int disconnect_server(int sd);
753 extern concptr soc_err(void);
755 extern void prepare_movie_hooks(void);
756 extern void prepare_browse_movie_aux(concptr filename);
757 extern void prepare_browse_movie(concptr filename);
758 extern void browse_movie(void);
759 extern bool browsing_movie;
763 extern travel_type travel;
766 extern void kamaenaoshi(INVENTORY_IDX item);