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 arena_type arena_info[MAX_ARENA_MONS + 2];
72 extern const byte extract_energy[200];
73 extern const player_sex sex_info[MAX_SEXES];
74 extern const player_race race_info[MAX_RACES];
75 extern const player_class class_info[MAX_CLASS];
76 extern const magic_type technic_info[NUM_TECHNIC][32];
77 extern const player_seikaku seikaku_info[MAX_SEIKAKU];
78 extern const player_race mimic_info[];
79 extern const u32b fake_spell_flags[4];
80 extern const s32b realm_choices1[];
81 extern const s32b realm_choices2[];
82 extern const concptr realm_names[];
84 extern const concptr E_realm_names[];
86 extern const concptr spell_names[VALID_REALM][32];
87 extern const concptr player_title[MAX_CLASS][PY_MAX_LEVEL/5];
88 extern const concptr color_names[16];
89 extern const concptr stat_names[6];
90 extern const concptr stat_names_reduced[6];
91 extern const concptr window_flag_desc[32];
92 extern const martial_arts ma_blows[MAX_MA];
93 extern const int monk_ave_damage[PY_MAX_LEVEL+1][3];
94 extern const concptr game_inscriptions[];
95 extern const kamae kamae_shurui[MAX_KAMAE];
96 extern const kamae kata_shurui[MAX_KATA];
97 extern const concptr exp_level_str[5];
98 extern const concptr silly_attacks[MAX_SILLY_ATTACK];
100 extern const concptr silly_attacks2[MAX_SILLY_ATTACK];
102 extern const monster_power monster_powers[MAX_MONSPELLS];
103 extern const concptr monster_powers_short[MAX_MONSPELLS];
104 extern const concptr ident_info[];
105 extern const mbe_info_type mbe_info[];
106 extern const byte feature_action_flags[FF_FLAG_MAX];
107 extern const dragonbreath_type dragonbreath_info[];
109 extern const option_type option_info[];
110 extern const option_type cheat_info[CHEAT_MAX];
111 extern const option_type autosave_info[2];
114 extern const concptr copyright[5];
115 extern byte h_ver_major;
116 extern byte h_ver_minor;
117 extern byte h_ver_patch;
118 extern byte h_ver_extra;
119 extern byte sf_extra;
120 extern u32b sf_system;
125 extern u16b sf_lives;
126 extern u16b sf_saves;
127 extern bool arg_fiddle;
128 extern bool arg_wizard;
129 extern bool arg_music;
130 extern bool arg_sound;
131 extern byte arg_graphics;
132 extern bool arg_monochrome;
133 extern bool arg_force_original;
134 extern bool arg_force_roguelike;
135 extern bool arg_bigtile;
136 extern bool character_generated;
137 extern bool character_dungeon;
138 extern bool character_loaded;
139 extern bool character_saved;
140 extern bool character_icky;
141 extern bool character_xtra;
142 extern bool creating_savefile;
143 extern u32b seed_flavor;
144 extern u32b seed_town;
145 extern COMMAND_CODE command_cmd;
146 extern COMMAND_ARG command_arg;
147 extern s16b command_rep;
148 extern DIRECTION command_dir;
149 extern s16b command_see;
150 extern TERM_LEN command_gap;
151 extern s16b command_wrk;
152 extern s16b command_new;
153 extern bool msg_flag;
155 extern bool invoking_midnight_curse;
156 extern GAME_TURN old_battle;
157 extern bool use_sound;
158 extern bool use_music;
159 extern bool use_graphics;
160 extern bool use_bigtile;
161 extern s16b signal_count;
162 extern bool inkey_base;
163 extern bool inkey_xtra;
164 extern bool inkey_scan;
165 extern bool inkey_flag;
166 extern bool get_com_no_macros;
167 extern OBJECT_SUBTYPE_VALUE coin_type;
168 extern bool opening_chest;
169 extern bool shimmer_monsters;
170 extern bool shimmer_objects;
171 extern bool repair_monsters;
172 extern bool repair_objects;
173 extern s16b inven_cnt;
174 extern s16b equip_cnt;
175 extern OBJECT_IDX o_max;
176 extern OBJECT_IDX o_cnt;
177 extern MONSTER_IDX m_max;
178 extern MONSTER_IDX m_cnt;
179 extern MONSTER_IDX hack_m_idx;
180 extern MONSTER_IDX hack_m_idx_ii;
181 extern int total_friends;
182 extern int leaving_quest;
183 extern bool reinit_wilderness;
184 extern bool multi_rew;
185 extern char summon_kin_type;
186 extern bool is_loading_now;
187 extern bool hack_mutation;
191 * Software options (set via the '=' command). See "tables.c"
195 extern char record_o_name[MAX_NLEN];
196 extern GAME_TURN record_turn;
197 extern bool closing_flag;
198 extern POSITION panel_row_min, panel_row_max;
199 extern POSITION panel_col_min, panel_col_max;
200 extern POSITION panel_col_prt, panel_row_prt;
201 extern MONSTER_IDX target_who;
202 extern POSITION target_col;
203 extern POSITION target_row;
204 extern int player_uid;
205 extern int player_euid;
206 extern int player_egid;
207 extern char player_base[32];
208 extern char savefile[1024];
209 extern char savefile_base[40];
210 extern pos_list tmp_pos;
211 extern s16b macro__num;
212 extern concptr *macro__pat;
213 extern concptr *macro__act;
214 extern bool *macro__cmd;
215 extern char *macro__buf;
216 extern STR_OFFSET quark__num;
217 extern concptr *quark__str;
218 extern u32b message__next;
219 extern u32b message__last;
220 extern u32b message__head;
221 extern u32b message__tail;
222 extern u32b *message__ptr;
223 extern char *message__buf;
224 extern BIT_FLAGS option_flag[8];
225 extern BIT_FLAGS option_mask[8];
226 extern BIT_FLAGS window_flag[8];
227 extern BIT_FLAGS window_mask[8];
228 extern term *angband_term[8];
229 extern const char angband_term_name[8][16];
230 extern byte angband_color_table[256][4];
231 extern const concptr angband_sound_name[SOUND_MAX];
232 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
233 extern floor_type *current_floor_ptr;
234 extern world_type *current_world_ptr;
235 extern saved_floor_type saved_floors[MAX_SAVED_FLOORS];
236 extern FLOOR_IDX max_floor_id;
237 extern u32b saved_floor_file_sign;
238 extern TOWN_IDX max_towns;
239 extern town_type *town_info;
240 extern object_type *inventory;
241 extern s16b alloc_kind_size;
242 extern alloc_entry *alloc_kind_table;
243 extern s16b alloc_race_size;
244 extern alloc_entry *alloc_race_table;
245 extern TERM_COLOR misc_to_attr[256];
246 extern SYMBOL_CODE misc_to_char[256];
247 extern TERM_COLOR tval_to_attr[128];
248 extern SYMBOL_CODE tval_to_char[128];
249 extern concptr keymap_act[KEYMAP_MODES][256];
250 extern player_type *p_ptr;
251 extern const player_sex *sp_ptr;
252 extern const player_race *rp_ptr;
253 extern const player_class *cp_ptr;
254 extern const player_seikaku *ap_ptr;
255 extern const player_magic *mp_ptr;
256 extern birther previous_char;
257 extern vault_type *v_info;
260 extern skill_table *s_info;
261 extern player_magic *m_info;
262 extern feature_type *f_info;
265 extern object_kind *k_info;
268 extern artifact_type *a_info;
271 extern ego_item_type *e_info;
274 extern monster_race *r_info;
277 extern dungeon_type *d_info;
280 extern concptr ANGBAND_SYS;
281 extern concptr ANGBAND_KEYBOARD;
282 extern concptr ANGBAND_GRAF;
283 extern concptr ANGBAND_DIR;
284 extern concptr ANGBAND_DIR_APEX;
285 extern concptr ANGBAND_DIR_BONE;
286 extern concptr ANGBAND_DIR_DATA;
287 extern concptr ANGBAND_DIR_EDIT;
288 extern concptr ANGBAND_DIR_SCRIPT;
289 extern concptr ANGBAND_DIR_FILE;
290 extern concptr ANGBAND_DIR_HELP;
291 extern concptr ANGBAND_DIR_INFO;
292 extern concptr ANGBAND_DIR_PREF;
293 extern concptr ANGBAND_DIR_SAVE;
294 extern concptr ANGBAND_DIR_USER;
295 extern concptr ANGBAND_DIR_XTRA;
296 extern OBJECT_TYPE_VALUE item_tester_tval;
297 extern bool (*item_tester_hook)(object_type *o_ptr);
298 extern monsterrace_hook_type get_mon_num_hook;
299 extern monsterrace_hook_type get_mon_num2_hook;
300 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
301 extern building_type building[MAX_BLDG];
302 extern QUEST_IDX max_q_idx;
303 extern MONRACE_IDX max_r_idx;
304 extern KIND_OBJECT_IDX max_k_idx;
305 extern VAULT_IDX max_v_idx;
306 extern FEAT_IDX max_f_idx;
307 extern ARTIFACT_IDX max_a_idx;
308 extern EGO_IDX max_e_idx;
309 extern DUNGEON_IDX max_d_idx;
310 extern quest_type *quest;
311 extern char quest_text[10][80];
312 extern int quest_text_line;
313 extern int init_flags;
314 extern int highscore_fd;
315 extern bool can_save;
317 extern int cap_mspeed;
318 extern HIT_POINT cap_hp;
319 extern HIT_POINT cap_maxhp;
320 extern STR_OFFSET cap_nickname;
321 extern MONRACE_IDX battle_mon[4];
322 extern int sel_monster;
323 extern int battle_odds;
324 extern PRICE kakekin;
325 extern u32b mon_odds[4];
326 extern MONSTER_IDX pet_t_m_idx;
327 extern MONSTER_IDX riding_t_m_idx;
328 extern MONRACE_IDX today_mon;
329 extern bool write_level;
330 extern u32b start_time;
331 extern bool sukekaku;
332 extern bool new_mane;
333 extern bool mon_fight;
334 extern bool generate_encounter;
335 extern concptr screen_dump;
337 /*** Terrain feature variables ***/
338 extern FEAT_IDX feat_none;
339 extern FEAT_IDX feat_floor;
340 extern FEAT_IDX feat_glyph;
341 extern FEAT_IDX feat_explosive_rune;
342 extern FEAT_IDX feat_mirror;
343 extern FEAT_IDX feat_up_stair;
344 extern FEAT_IDX feat_down_stair;
345 extern FEAT_IDX feat_entrance;
346 extern FEAT_IDX feat_trap_open;
347 extern FEAT_IDX feat_trap_armageddon;
348 extern FEAT_IDX feat_trap_piranha;
349 extern FEAT_IDX feat_rubble;
350 extern FEAT_IDX feat_magma_vein;
351 extern FEAT_IDX feat_quartz_vein;
352 extern FEAT_IDX feat_granite;
353 extern FEAT_IDX feat_permanent;
354 extern FEAT_IDX feat_glass_floor;
355 extern FEAT_IDX feat_glass_wall;
356 extern FEAT_IDX feat_permanent_glass_wall;
357 extern FEAT_IDX feat_pattern_start;
358 extern FEAT_IDX feat_pattern_1;
359 extern FEAT_IDX feat_pattern_2;
360 extern FEAT_IDX feat_pattern_3;
361 extern FEAT_IDX feat_pattern_4;
362 extern FEAT_IDX feat_pattern_end;
363 extern FEAT_IDX feat_pattern_old;
364 extern FEAT_IDX feat_pattern_exit;
365 extern FEAT_IDX feat_pattern_corrupted;
366 extern FEAT_IDX feat_black_market;
367 extern FEAT_IDX feat_town;
368 extern FEAT_IDX feat_deep_water;
369 extern FEAT_IDX feat_shallow_water;
370 extern FEAT_IDX feat_deep_lava;
371 extern FEAT_IDX feat_shallow_lava;
372 extern FEAT_IDX feat_heavy_cold_zone;
373 extern FEAT_IDX feat_cold_zone;
374 extern FEAT_IDX feat_heavy_electrical_zone;
375 extern FEAT_IDX feat_electrical_zone;
376 extern FEAT_IDX feat_deep_acid_puddle;
377 extern FEAT_IDX feat_shallow_acid_puddle;
378 extern FEAT_IDX feat_deep_poisonous_puddle;
379 extern FEAT_IDX feat_shallow_poisonous_puddle;
380 extern FEAT_IDX feat_dirt;
381 extern FEAT_IDX feat_grass;
382 extern FEAT_IDX feat_flower;
383 extern FEAT_IDX feat_brake;
384 extern FEAT_IDX feat_tree;
385 extern FEAT_IDX feat_mountain;
386 extern FEAT_IDX feat_swamp;
387 extern FEAT_IDX feat_undetected;
389 extern DEPTH *max_dlv;
390 extern FEAT_IDX feat_wall_outer;
391 extern FEAT_IDX feat_wall_inner;
392 extern FEAT_IDX feat_wall_solid;
393 extern FEAT_IDX feat_ground_type[100], feat_wall_type[100];
394 extern COMMAND_CODE now_message;
395 extern bool use_menu;
398 extern void autopick_load_pref(bool disp_mes);
399 extern errr process_autopick_file_command(char *buf);
400 extern concptr autopick_line_from_entry(autopick_type *entry);
401 extern int is_autopick(object_type *o_ptr);
402 extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
403 extern void autopick_delayed_alter(void);
404 extern void autopick_pickup_items(grid_type *g_ptr);
405 extern bool autopick_autoregister(object_type *o_ptr);
406 extern void do_cmd_edit_autopick(void);
409 extern void add_history_from_pref_line(concptr t);
410 extern void player_birth(void);
411 extern void get_max_stats(void);
412 extern void get_height_weight(void);
413 extern void player_outfit(void);
414 extern void dump_yourself(FILE *fff);
418 extern void update_local_illumination(POSITION y, POSITION x);
419 extern bool player_can_see_bold(POSITION y, POSITION x);
420 extern bool cave_valid_bold(POSITION y, POSITION x);
421 extern bool no_lite(void);
422 extern void move_cursor_relative(int row, int col);
423 extern void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x);
424 extern void display_dungeon(void);
425 extern void prt_path(POSITION y, POSITION x);
426 extern void delayed_visual_update(void);
427 extern void forget_flow(void);
428 extern void update_flow(void);
429 extern void update_smell(void);
430 extern void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat);
432 extern void health_track(MONSTER_IDX m_idx);
433 extern void monster_race_track(MONRACE_IDX r_idx);
434 extern void object_kind_track(KIND_OBJECT_IDX k_idx);
435 extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
436 extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
440 extern concptr get_ordinal_number_suffix(int num);
442 extern errr do_cmd_write_nikki(int type, int num, concptr note);
443 extern void do_cmd_nikki(void);
444 extern void do_cmd_redraw(void);
445 extern void do_cmd_change_name(void);
446 extern void do_cmd_message_one(void);
447 extern void do_cmd_messages(int num_now);
448 extern void do_cmd_options_aux(int page, concptr info);
449 extern void do_cmd_options(void);
450 extern void do_cmd_pref(void);
451 extern void do_cmd_reload_autopick(void);
452 extern void do_cmd_macros(void);
453 extern void do_cmd_visuals(void);
454 extern void do_cmd_colors(void);
455 extern void do_cmd_note(void);
456 extern void do_cmd_version(void);
457 extern void do_cmd_feeling(void);
458 extern void do_cmd_load_screen(void);
459 extern void do_cmd_save_screen_html_aux(char *filename, int message);
460 extern void do_cmd_save_screen(void);
461 extern void do_cmd_knowledge_quests_completed(FILE *fff, QUEST_IDX quest_num[]);
462 extern void do_cmd_knowledge_quests_failed(FILE *fff, QUEST_IDX quest_num[]);
463 extern void do_cmd_knowledge(void);
464 extern void plural_aux(char * Name);
465 extern void do_cmd_checkquest(void);
466 extern void do_cmd_time(void);
467 extern void do_cmd_suicide(void);
470 extern bool trump_summoning(int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode);
473 extern void extract_option_vars(void);
474 extern void determine_bounty_uniques(void);
475 extern void determine_today_mon(bool conv_old);
476 extern void play_game(bool new_game);
477 extern s32b turn_real(s32b hoge);
478 extern void prevent_turn_overflow(void);
479 extern void close_game(void);
483 extern void safe_setuid_drop(void);
484 extern void safe_setuid_grab(void);
485 extern s16b tokenize(char *buf, s16b num, char **tokens, BIT_FLAGS mode);
486 extern void display_player(int mode);
487 extern errr make_character_dump(FILE *fff);
488 extern errr file_character(concptr name);
489 extern errr process_pref_file_command(char *buf);
490 extern concptr process_pref_file_expr(char **sp, char *fp);
491 extern errr process_pref_file(concptr name);
492 extern errr process_autopick_file(concptr name);
493 extern errr process_histpref_file(concptr name);
494 extern void print_equippy(void);
495 extern void display_player_equippy(TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);
496 extern errr check_time_init(void);
497 extern errr check_load_init(void);
498 extern errr check_time(void);
499 extern errr check_load(void);
500 extern bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
501 extern void do_cmd_help(void);
502 extern void process_player_name(bool sf);
503 extern void get_name(void);
504 extern void do_cmd_save_game(int is_autosave);
505 extern void do_cmd_save_and_exit(void);
506 extern long total_points(void);
507 extern void exit_game_panic(void);
508 extern void signals_ignore_tstp(void);
509 extern void signals_handle_tstp(void);
510 extern void signals_init(void);
511 extern errr get_rnd_line(concptr file_name, int entry, char *output);
512 extern void print_tomb(void);
513 extern void show_info(void);
514 extern bool check_score(void);
517 extern errr get_rnd_line_jonly(concptr file_name, int entry, char *output, int count);
519 extern errr counts_write(int where, u32b count);
520 extern u32b counts_read(int where);
523 extern void clear_saved_floor_files(void);
524 extern saved_floor_type *get_sf_ptr(FLOOR_IDX floor_id);
525 extern FLOOR_IDX get_new_floor_id(void);
526 extern void prepare_change_floor_mode(BIT_FLAGS mode);
527 extern void precalc_cur_num_of_pet(void);
530 extern TERM_COLOR color_char_to_attr(SYMBOL_CODE c);
531 extern s16b f_tag_to_index(concptr str);
532 extern errr process_dungeon_file(concptr name, int ymin, int xmin, int ymax, int xmax);
535 extern void init_file_paths(char *path);
536 extern concptr err_str[PARSE_ERROR_MAX];
537 extern errr init_v_info(void);
538 extern errr init_buildings(void);
539 extern s16b f_tag_to_index_in_init(concptr str);
540 extern void init_angband(void);
541 extern concptr get_check_sum(void);
544 extern errr rd_savefile_new(void);
545 extern bool load_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
547 /* monster-process.c */
548 extern void process_monsters(void);
549 extern void process_monster(MONSTER_IDX m_idx);
550 extern int get_mproc_idx(MONSTER_IDX m_idx, int mproc_type);
551 extern void mproc_init(void);
552 extern void process_monsters_mtimed(int mtimed_idx);
553 extern void dispel_monster_status(MONSTER_IDX m_idx);
554 extern bool process_the_world(int num, MONSTER_IDX who, bool vs_player);
555 extern void monster_gain_exp(MONSTER_IDX m_idx, MONRACE_IDX s_idx);
559 extern void set_target(monster_type *m_ptr, POSITION y, POSITION x);
560 extern void reset_target(monster_type *m_ptr);
561 extern monster_race *real_r_ptr(monster_type *m_ptr);
562 extern MONRACE_IDX real_r_idx(monster_type *m_ptr);
563 extern void delete_monster_idx(MONSTER_IDX i);
564 extern void delete_monster(POSITION y, POSITION x);
565 extern void compact_monsters(int size);
566 extern void wipe_m_list(void);
567 extern MONSTER_IDX m_pop(void);
568 extern errr get_mon_num_prep(monsterrace_hook_type monster_hook, monsterrace_hook_type monster_hook2);
569 extern MONRACE_IDX get_mon_num(DEPTH level);
570 extern int lore_do_probe(MONRACE_IDX r_idx);
571 extern void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
572 extern void update_monster(MONSTER_IDX m_idx, bool full);
573 extern void update_monsters(bool full);
574 extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
575 extern void update_smart_learn(MONSTER_IDX m_idx, int what);
576 extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
577 extern SPEED get_mspeed(monster_race *r_ptr);
578 extern void monster_drop_carried_objects(monster_type *m_ptr);
581 extern void reset_visuals(void);
582 extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
583 extern void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
584 extern concptr item_activation(object_type *o_ptr);
585 extern bool screen_object(object_type *o_ptr, BIT_FLAGS mode);
586 extern char index_to_label(int i);
587 extern INVENTORY_IDX label_to_inven(int c);
588 extern INVENTORY_IDX label_to_equip(int c);
589 extern s16b wield_slot(object_type *o_ptr);
590 extern concptr mention_use(int i);
591 extern concptr describe_use(int i);
592 extern bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
593 extern bool item_tester_okay(object_type *o_ptr);
594 extern void display_inven(void);
595 extern void display_equip(void);
596 extern COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode);
597 extern COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode);
598 extern void toggle_inven_equip(void);
599 extern bool can_get_item(void);
600 extern bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode);
601 extern object_type *choose_object(OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option);
602 PERCENTAGE breakage_chance(object_type *o_ptr, SPELL_IDX snipe_type);
605 extern void excise_object_idx(OBJECT_IDX o_idx);
606 extern void delete_object_idx(OBJECT_IDX o_idx);
607 extern void delete_object(POSITION y, POSITION x);
608 extern void compact_objects(int size);
609 extern void wipe_o_list(void);
610 extern OBJECT_IDX o_pop(void);
611 extern OBJECT_IDX get_obj_num(DEPTH level);
612 extern void object_known(object_type *o_ptr);
613 extern void object_aware(object_type *o_ptr);
614 extern void object_tried(object_type *o_ptr);
615 extern byte value_check_aux1(object_type *o_ptr);
616 extern byte value_check_aux2(object_type *o_ptr);
617 extern PRICE object_value(object_type *o_ptr);
618 extern PRICE object_value_real(object_type *o_ptr);
619 extern void distribute_charges(object_type *o_ptr, object_type *q_ptr, int amt);
620 extern void reduce_charges(object_type *o_ptr, int amt);
621 extern int object_similar_part(object_type *o_ptr, object_type *j_ptr);
622 extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
623 extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
624 extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval);
625 extern void object_wipe(object_type *o_ptr);
626 extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
627 extern void object_copy(object_type *o_ptr, object_type *j_ptr);
628 extern void apply_magic(object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
629 extern bool make_object(object_type *j_ptr, BIT_FLAGS mode);
630 extern void place_object(POSITION y, POSITION x, BIT_FLAGS mode);
631 extern bool make_gold(object_type *j_ptr);
632 extern void place_gold(POSITION y, POSITION x);
633 extern OBJECT_IDX drop_near(object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
634 extern void inven_item_charges(INVENTORY_IDX item);
635 extern void inven_item_describe(INVENTORY_IDX item);
636 extern void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
637 extern void inven_item_optimize(INVENTORY_IDX item);
638 extern void floor_item_charges(INVENTORY_IDX item);
639 extern void floor_item_describe(INVENTORY_IDX item);
640 extern void floor_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
641 extern void floor_item_optimize(INVENTORY_IDX item);
642 extern bool inven_carry_okay(object_type *o_ptr);
643 extern bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr);
644 extern s16b inven_carry(object_type *o_ptr);
645 extern INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt);
646 extern void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt);
647 extern void combine_pack(void);
648 extern void reorder_pack(void);
649 extern void display_koff(KIND_OBJECT_IDX k_idx);
650 extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
651 extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
652 extern void torch_lost_fuel(object_type *o_ptr);
653 extern concptr essence_name[];
656 extern void do_cmd_racial_power(void);
659 extern bool save_player(void);
660 extern bool load_player(void);
661 extern void remove_loc(void);
662 extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
665 extern PERCENTAGE beam_chance(void);
666 extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
667 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);
668 extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
669 extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
670 extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
671 extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
672 extern int project_length;
673 extern bool binding_field(HIT_POINT dam);
674 extern void seal_of_mirror(HIT_POINT dam);
675 extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
678 extern void message_pain(MONSTER_IDX m_idx, HIT_POINT dam);
679 extern bool detect_traps(POSITION range, bool known);
680 extern bool detect_doors(POSITION range);
681 extern bool detect_stairs(POSITION range);
682 extern bool detect_treasure(POSITION range);
683 extern bool detect_objects_gold(POSITION range);
684 extern bool detect_objects_normal(POSITION range);
685 extern bool detect_objects_magic(POSITION range);
686 extern bool detect_monsters_normal(POSITION range);
687 extern bool detect_monsters_invis(POSITION range);
688 extern bool detect_monsters_evil(POSITION range);
689 extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
690 extern bool detect_monsters_string(POSITION range, concptr);
691 extern bool detect_monsters_nonliving(POSITION range);
692 extern bool detect_monsters_mind(POSITION range);
693 extern bool detect_all(POSITION range);
694 extern bool wall_stone(void);
695 extern bool speed_monsters(void);
696 extern bool slow_monsters(int power);
697 extern bool sleep_monsters(int power);
698 extern void aggravate_monsters(MONSTER_IDX who);
699 extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
700 extern bool symbol_genocide(int power, bool player_cast);
701 extern bool mass_genocide(int power, bool player_cast);
702 extern bool mass_genocide_undead(int power, bool player_cast);
703 extern bool probing(void);
704 extern bool banish_evil(int dist);
705 extern bool dispel_evil(HIT_POINT dam);
706 extern bool dispel_good(HIT_POINT dam);
707 extern bool dispel_undead(HIT_POINT dam);
708 extern bool dispel_monsters(HIT_POINT dam);
709 extern bool dispel_living(HIT_POINT dam);
710 extern bool dispel_demons(HIT_POINT dam);
711 extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
712 extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
713 extern bool crusade(void);
714 extern bool turn_undead(void);
715 extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
716 extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
717 extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
718 extern void lite_room(POSITION y1, POSITION x1);
719 extern bool starlight(bool magic);
720 extern void unlite_room(POSITION y1, POSITION x1);
721 extern bool lite_area(HIT_POINT dam, POSITION rad);
722 extern bool unlite_area(HIT_POINT dam, POSITION rad);
723 extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
724 extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
725 extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
726 extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
727 extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
728 extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
729 extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
730 extern void call_chaos(void);
731 extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
732 extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
733 extern bool lite_line(DIRECTION dir, HIT_POINT dam);
734 extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
735 extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
736 extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
737 extern bool destroy_door(DIRECTION dir);
738 extern bool disarm_trap(DIRECTION dir);
739 extern bool wizard_lock(DIRECTION dir);
740 extern bool teleport_monster(DIRECTION dir, int distance);
741 extern bool door_creation(void);
742 extern bool trap_creation(POSITION y, POSITION x);
743 extern bool tree_creation(void);
744 extern bool glyph_creation(void);
745 extern bool destroy_doors_touch(void);
746 extern bool disarm_traps_touch(void);
747 extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
748 extern bool sleep_monsters_touch(void);
749 extern bool activate_ty_curse(bool stop_ty, int *count);
750 extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
751 extern void wall_breaker(void);
752 extern bool confuse_monsters(HIT_POINT dam);
753 extern bool charm_monsters(HIT_POINT dam);
754 extern bool charm_animals(HIT_POINT dam);
755 extern bool stun_monsters(HIT_POINT dam);
756 extern bool stasis_monsters(HIT_POINT dam);
757 extern bool banish_monsters(int dist);
758 extern bool turn_monsters(HIT_POINT dam);
759 extern bool turn_evil(HIT_POINT dam);
760 extern bool deathray_monsters(void);
761 extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
762 extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
763 extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
764 extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
765 extern bool mindblast_monsters(HIT_POINT dam);
766 extern s32b flag_cost(object_type *o_ptr, int plusses);
767 extern bool teleport_swap(DIRECTION dir);
768 extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
769 extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
770 extern bool eat_magic(int power);
771 extern void discharge_minion(void);
772 extern bool kawarimi(bool success);
773 extern bool rush_attack(bool *mdeath);
774 extern void remove_all_mirrors(bool explode);
775 extern void ring_of_power(DIRECTION dir);
776 extern void wild_magic(int spell);
777 extern void cast_meteor(HIT_POINT dam, POSITION rad);
778 extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
779 extern void cast_wonder(DIRECTION dir);
780 extern void cast_invoke_spirits(DIRECTION dir);
781 extern void cast_shuffle(void);
782 extern void stop_mouth(void);
783 extern bool_hack vampirism(void);
784 extern bool panic_hit(void);
785 extern bool psychometry(void);
786 extern bool draconian_breath(player_type *creature_ptr);
787 extern bool android_inside_weapon(player_type *creature_ptr);
788 extern bool create_ration(player_type *crature_ptr);
789 extern void hayagake(player_type *creature_ptr);
790 extern bool double_attack(player_type *creature_ptr);
791 extern bool comvert_hp_to_mp(player_type *creature_ptr);
792 extern bool comvert_mp_to_hp(player_type *creature_ptr);
793 extern bool demonic_breath(player_type *creature_ptr);
794 extern bool mirror_concentration(player_type *creature_ptr);
795 extern bool sword_dancing(player_type *creature_ptr);
796 extern bool confusing_light(player_type *creature_ptr);
797 extern bool rodeo(player_type *creature_ptr);
798 extern bool clear_mind(player_type *creature_ptr);
799 extern bool concentration(player_type *creature_ptr);
802 extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
803 extern void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode);
804 extern bool teleport_player_aux(POSITION dis, BIT_FLAGS mode);
805 extern void teleport_player(POSITION dis, BIT_FLAGS mode);
806 extern void teleport_player_away(MONSTER_IDX m_idx, POSITION dis);
807 extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode);
808 extern void teleport_away_followable(MONSTER_IDX m_idx);
809 extern bool teleport_level_other(player_type *creature_ptr);
810 extern void teleport_level(MONSTER_IDX m_idx);
811 extern DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x);
812 extern bool recall_player(player_type *creature_ptr, TIME_EFFECT turns);
813 extern bool free_level_recall(player_type *creature_ptr);
814 extern bool reset_recall(void);
815 extern bool apply_disenchant(BIT_FLAGS mode);
816 extern void brand_weapon(int brand_type);
817 extern void call_the_(void);
818 extern void fetch(DIRECTION dir, WEIGHT wgt, bool require_los);
819 extern void alter_reality(void);
820 extern void identify_pack(void);
821 extern int remove_curse(void);
822 extern int remove_all_curse(void);
823 extern bool alchemy(void);
824 extern bool enchant(object_type *o_ptr, int n, int eflag);
825 extern bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac);
826 extern bool artifact_scroll(void);
827 extern bool ident_spell(bool only_equip);
828 extern bool mundane_spell(bool only_equip);
829 extern bool identify_item(object_type *o_ptr);
830 extern bool identify_fully(bool only_equip);
831 extern bool recharge(int power);
832 extern void display_spell_list(void);
833 extern EXP experience_of_spell(SPELL_IDX spell, REALM_IDX use_realm);
834 extern MANA_POINT mod_need_mana(MANA_POINT need_mana, SPELL_IDX spell, REALM_IDX realm);
835 extern PERCENTAGE mod_spell_chance_1(PERCENTAGE chance);
836 extern PERCENTAGE mod_spell_chance_2(PERCENTAGE chance);
837 extern PERCENTAGE spell_chance(SPELL_IDX spell, REALM_IDX realm);
838 extern void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, REALM_IDX realm);
839 extern bool polymorph_monster(POSITION y, POSITION x);
840 extern bool dimension_door(void);
841 extern bool mirror_tunnel(void);
842 extern void massacre(void);
843 extern bool eat_lock(void);
844 extern bool shock_power(void);
845 extern bool booze(player_type *creature_ptr);
846 extern bool detonation(player_type *creature_ptr);
847 extern void blood_curse_to_enemy(MONSTER_IDX m_idx);
848 extern bool fire_crimson(void);
852 extern void update_gambling_monsters(void);
853 extern void do_cmd_bldg(void);
854 extern void do_cmd_quest(void);
855 extern bool tele_town(void);
856 extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow);
857 extern HIT_POINT calc_expect_crit_shot(WEIGHT weight, int plus_ammo,int plus_bow, HIT_POINT dam);
858 extern HIT_POINT calc_expect_crit(WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari);
861 extern errr path_parse(char *buf, int max, concptr file);
862 extern errr path_build(char *buf, int max, concptr path, concptr file);
863 extern FILE *my_fopen(concptr file, concptr mode);
864 extern FILE *my_fopen_temp(char *buf, int max);
865 extern errr my_fgets(FILE *fff, char *buf, huge n);
866 extern errr my_fputs(FILE *fff, concptr buf, huge n);
867 extern errr my_fclose(FILE *fff);
868 extern errr fd_kill(concptr file);
869 extern errr fd_move(concptr file, concptr what);
870 extern errr fd_copy(concptr file, concptr what);
871 extern int fd_make(concptr file, BIT_FLAGS mode);
872 extern int fd_open(concptr file, int flags);
873 extern errr fd_lock(int fd, int what);
874 extern errr fd_seek(int fd, huge n);
875 extern errr fd_chop(int fd, huge n);
876 extern errr fd_read(int fd, char *buf, huge n);
877 extern errr fd_write(int fd, concptr buf, huge n);
878 extern errr fd_close(int fd);
879 extern void flush(void);
880 extern void bell(void);
881 extern errr play_music(int type, int num);
882 extern void select_floor_music(void);
883 extern void sound(int num);
884 extern void move_cursor(int row, int col);
885 extern void text_to_ascii(char *buf, concptr str);
886 extern void ascii_to_text(char *buf, concptr str);
887 extern errr macro_add(concptr pat, concptr act);
888 extern sint macro_find_exact(concptr pat);
889 extern char inkey(void);
890 extern concptr quark_str(STR_OFFSET num);
891 extern void quark_init(void);
892 extern u16b quark_add(concptr str);
893 extern s32b message_num(void);
894 extern concptr message_str(int age);
895 extern void message_add(concptr msg);
896 extern void msg_erase(void);
897 extern void msg_print(concptr msg);
898 extern void msg_print_wizard(int cheat_type, concptr msg);
900 extern void msg_format(concptr fmt, ...);
901 extern void msg_format_wizard(int cheat_type, concptr fmt, ...);
903 extern void screen_save(void);
904 extern void screen_load(void);
905 extern void c_put_str(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col);
906 extern void put_str(concptr str, TERM_LEN row, TERM_LEN col);
907 extern void c_prt(TERM_COLOR attr, concptr str, TERM_LEN row, TERM_LEN col);
908 extern void prt(concptr str, TERM_LEN row, TERM_LEN col);
909 extern void c_roff(TERM_COLOR attr, concptr str);
910 extern void roff(concptr str);
911 extern void clear_from(int row);
912 extern bool askfor_aux(char *buf, int len, bool numpad_cursor);
913 extern bool askfor(char *buf, int len);
914 extern bool get_string(concptr prompt, char *buf, int len);
915 extern bool get_check(concptr prompt);
916 extern bool get_check_strict(concptr prompt, BIT_FLAGS mode);
917 extern bool get_com(concptr prompt, char *command, bool z_escape);
918 extern QUANTITY get_quantity(concptr prompt, QUANTITY max);
919 extern void pause_line(int row);
920 extern void request_command(int shopping);
921 extern bool is_a_vowel(int ch);
922 extern int get_keymap_dir(char ch);
923 extern errr type_string(concptr str, uint len);
924 extern void roff_to_buf(concptr str, int wlen, char *tbuf, size_t bufsize);
927 extern void tag_sort(tag_type elements[], int number);
928 #endif /* SORT_R_INFO */
931 extern byte gamma_table[256];
932 extern void build_gamma_table(int gamma);
933 #endif /* SUPPORT_GAMMA */
935 extern size_t my_strcpy(char *buf, concptr src, size_t bufsize);
936 extern size_t my_strcat(char *buf, concptr src, size_t bufsize);
937 extern char *my_strstr(concptr haystack, concptr needle);
938 extern char *my_strchr(concptr ptr, char ch);
939 extern void str_tolower(char *str);
940 extern int inkey_special(bool numpad_cursor);
944 extern void prt_time(void);
945 extern concptr map_name(void);
946 extern int bow_tval_ammo(object_type *o_ptr);
947 extern void handle_stuff(void);
948 extern void update_output(void);
949 extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
950 extern void update_playtime(void);
954 extern void set_action(ACTION_IDX typ);
955 extern void reset_tim_flags(void);
956 extern void dispel_player(void);
957 extern bool set_mimic(TIME_EFFECT v, IDX p, bool do_dec);
958 extern bool set_blind(TIME_EFFECT v);
959 extern bool set_confused(TIME_EFFECT v);
960 extern bool set_poisoned(TIME_EFFECT v);
961 extern bool set_afraid(TIME_EFFECT v);
962 extern bool set_paralyzed(TIME_EFFECT v);
963 extern bool set_image(TIME_EFFECT v);
964 extern bool set_fast(TIME_EFFECT v, bool do_dec);
965 extern bool set_slow(TIME_EFFECT v, bool do_dec);
966 extern bool set_shield(TIME_EFFECT v, bool do_dec);
967 extern bool set_tsubureru(TIME_EFFECT v, bool do_dec);
968 extern bool set_magicdef(TIME_EFFECT v, bool do_dec);
969 extern bool set_blessed(TIME_EFFECT v, bool do_dec);
970 extern bool set_hero(TIME_EFFECT v, bool do_dec);
971 extern bool set_shero(TIME_EFFECT v, bool do_dec);
972 extern bool set_protevil(TIME_EFFECT v, bool do_dec);
973 extern bool set_invuln(TIME_EFFECT v, bool do_dec);
974 extern bool set_tim_invis(TIME_EFFECT v, bool do_dec);
975 extern bool set_tim_infra(TIME_EFFECT v, bool do_dec);
976 extern bool set_tim_regen(TIME_EFFECT v, bool do_dec);
977 extern bool set_tim_stealth(TIME_EFFECT v, bool do_dec);
978 extern bool set_lightspeed(TIME_EFFECT v, bool do_dec);
979 extern bool set_tim_levitation(TIME_EFFECT v, bool do_dec);
980 extern bool set_tim_sh_touki(TIME_EFFECT v, bool do_dec);
981 extern bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec);
982 extern bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec);
983 extern bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec);
984 extern bool set_resist_magic(TIME_EFFECT v, bool do_dec);
985 extern bool set_tim_reflect(TIME_EFFECT v, bool do_dec);
986 extern bool set_multishadow(TIME_EFFECT v, bool do_dec);
987 extern bool set_dustrobe(TIME_EFFECT v, bool do_dec);
988 extern bool set_kabenuke(TIME_EFFECT v, bool do_dec);
989 extern bool set_tsuyoshi(TIME_EFFECT v, bool do_dec);
990 extern bool set_ele_attack(u32b attack_type, TIME_EFFECT v);
991 extern bool set_ele_immune(u32b immune_type, TIME_EFFECT v);
992 extern bool set_oppose_acid(TIME_EFFECT v, bool do_dec);
993 extern bool set_oppose_elec(TIME_EFFECT v, bool do_dec);
994 extern bool set_oppose_fire(TIME_EFFECT v, bool do_dec);
995 extern bool set_oppose_cold(TIME_EFFECT v, bool do_dec);
996 extern bool set_oppose_pois(TIME_EFFECT v, bool do_dec);
997 extern bool set_stun(TIME_EFFECT v);
998 extern bool set_cut(TIME_EFFECT v);
999 extern bool set_food(TIME_EFFECT v);
1000 extern bool inc_stat(int stat);
1001 extern bool dec_stat(int stat, int amount, int permanent);
1002 extern bool res_stat(int stat);
1003 extern bool hp_player(int num);
1004 extern bool do_dec_stat(int stat);
1005 extern bool do_res_stat(int stat);
1006 extern bool do_inc_stat(int stat);
1007 extern bool restore_level(void);
1008 extern bool lose_all_info(void);
1009 extern void gain_exp_64(s32b amount, u32b amount_frac);
1010 extern void gain_exp(s32b amount);
1011 extern void calc_android_exp(void);
1012 extern void lose_exp(s32b amount);
1013 extern bool drain_exp(s32b drain, s32b slip, int hold_exp_prob);
1014 extern void do_poly_self(void);
1015 extern bool set_ultimate_res(TIME_EFFECT v, bool do_dec);
1016 extern bool set_tim_res_nether(TIME_EFFECT v, bool do_dec);
1017 extern bool set_tim_res_time(TIME_EFFECT v, bool do_dec);
1018 extern bool choose_ele_attack(void);
1019 extern bool choose_ele_immune(TIME_EFFECT turn);
1020 extern bool set_wraith_form(TIME_EFFECT v, bool do_dec);
1021 extern bool set_tim_esp(TIME_EFFECT v, bool do_dec);
1022 extern bool set_superstealth(bool set);
1024 /* view-mainwindow.c */
1025 extern void resize_map(void);
1026 extern void redraw_window(void);
1027 extern bool change_panel(POSITION dy, POSITION dx);
1031 extern void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p);
1032 extern void panel_bounds_center(void);
1033 extern void verify_panel(void);
1034 extern bool target_able(MONSTER_IDX m_idx);
1035 extern bool target_okay(void);
1036 extern bool target_set(BIT_FLAGS mode);
1037 extern void target_set_prepare_look(void);
1038 extern bool get_aim_dir(DIRECTION *dp);
1039 extern bool get_hack_dir(DIRECTION *dp);
1040 extern bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed);
1041 extern bool get_rep_dir(DIRECTION *dp, bool under);
1042 extern bool tgt_pt(POSITION *x, POSITION *y);
1043 extern void do_poly_wounds(void);
1044 extern void change_race(CHARACTER_IDX new_race, concptr effect_msg);
1047 extern void display_scores_aux(int from, int to, int note, high_score *score);
1048 extern void display_scores(int from, int to);
1049 extern void kingly(void);
1050 extern bool send_world_score(bool do_send);
1051 extern errr top_twenty(void);
1052 extern errr predict_score(void);
1053 extern void race_legends(void);
1054 extern void race_score(int race_num);
1055 extern void show_highclass(void);
1058 extern mind_power const mind_powers[5];
1059 extern void mindcraft_info(char *p, int use_mind, int power);
1060 extern void do_cmd_mind(void);
1061 extern void do_cmd_mind_browse(void);
1065 extern bool clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
1066 extern bool summon_possible(POSITION y1, POSITION x1);
1067 extern bool raise_possible(monster_type *m_ptr);
1068 extern bool dispel_check(MONSTER_IDX m_idx);
1069 extern bool spell_is_inate(SPELL_IDX spell);
1070 extern bool make_attack_spell(MONSTER_IDX m_idx);
1071 extern void beam(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type);
1072 extern void bolt(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type);
1073 extern void breath(POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type);
1076 extern void get_project_point(POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
1077 extern bool monst_spell_monst(MONSTER_IDX m_idx);
1080 extern bool do_cmd_cast_learned(void);
1081 extern void learn_spell(int monspell);
1082 extern void set_rf_masks(BIT_FLAGS *f4, BIT_FLAGS *f5, BIT_FLAGS *f6, BIT_FLAGS mode);
1085 extern bool spell_learnable(MONSTER_IDX m_idx);
1086 extern HIT_POINT monspell_to_player(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx);
1087 extern HIT_POINT monspell_to_monster(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
1088 extern HIT_POINT monspell_damage(int SPELL_NUM, MONSTER_IDX m_idx, int TYPE);
1089 extern HIT_POINT monspell_race_damage(int SPELL_NUM, MONRACE_IDX r_idx, int TYPE);
1090 extern HIT_POINT monspell_bluemage_damage(int SPELL_NUM, PLAYER_LEVEL plev, int TYPE);
1094 * Hack -- conditional (or "bizarre") externs
1099 extern void user_name(char *buf, int id);
1105 extern int stricmp(concptr a, concptr b);
1111 extern int usleep(huge usecs);
1116 /* extern void main(void); */
1119 #if defined(MAC_MPW) || defined(MACH_O_CARBON)
1120 /* Globals needed */
1122 extern u32b _fcreator;
1125 #if defined(MAC_MPW) && defined(CARBON)
1126 extern void convert_pathname(char *path);
1129 #if defined(MACH_O_CARBON)
1130 extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype);
1135 /* extern int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, ...); */
1139 extern void repeat_push(COMMAND_CODE what);
1140 extern bool repeat_pull(COMMAND_CODE *what);
1141 extern void repeat_check(void);
1144 extern bool easy_open;
1148 extern bool easy_disarm;
1152 extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
1153 extern COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width);
1154 extern bool get_item_floor(COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode);
1155 extern void py_pickup_floor(bool pickup);
1158 extern bool easy_floor;
1161 extern void spoil_random_artifact(concptr fname);
1164 extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx);
1165 extern void cheat_death(player_type *creature_ptr);
1170 extern void sindarin_to_kana(char *kana, concptr sindarin);
1171 extern void jverb( concptr in , char *out , int flag);
1172 extern void sjis2euc(char *str);
1173 extern void euc2sjis(char *str);
1174 extern byte codeconv(char *str);
1175 extern bool iskanji2(concptr s, int x);
1176 extern void guess_convert_to_system_encoding(char* strbuf, int buflen);
1181 extern errr report_score(void);
1182 extern concptr make_screen_dump(void);
1186 extern int soc_write(int sd, char *buf, size_t sz);
1187 extern int soc_read(int sd, char *buf, size_t sz);
1188 extern void set_proxy(char *default_url, int default_port);
1189 extern int connect_server(int timeout, concptr host, int port);
1190 extern int disconnect_server(int sd);
1191 extern concptr soc_err(void);
1195 extern bool chuukei_server;
1196 extern bool chuukei_client;
1198 extern int connect_chuukei_server(char *server_string);
1199 extern void browse_chuukei(void);
1200 extern void flush_ringbuf(void);
1201 extern void prepare_chuukei_hooks(void);
1204 extern void prepare_movie_hooks(void);
1205 extern void prepare_browse_movie_aux(concptr filename);
1206 extern void prepare_browse_movie(concptr filename);
1207 extern void browse_movie(void);
1208 extern bool browsing_movie;
1212 extern travel_type travel;
1215 /* variable.c (for snipers) */
1216 extern bool reset_concent; /* Concentration reset flag */
1217 extern bool is_fired;
1219 extern void kamaenaoshi(INVENTORY_IDX item);