-/* autopick.c */
-extern void autopick_load_pref(bool disp_mes);
-extern errr process_autopick_file_command(char *buf);
-extern concptr autopick_line_from_entry(autopick_type *entry);
-extern int is_autopick(object_type *o_ptr);
-extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
-extern void autopick_delayed_alter(void);
-extern void autopick_pickup_items(grid_type *g_ptr);
-extern bool autopick_autoregister(object_type *o_ptr);
-extern void do_cmd_edit_autopick(void);
-
-
-/* grids.c */
-extern void update_local_illumination(POSITION y, POSITION x);
-extern bool player_can_see_bold(POSITION y, POSITION x);
-extern bool cave_valid_bold(POSITION y, POSITION x);
-extern bool no_lite(void);
-extern void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x);
-extern void delayed_visual_update(void);
-extern void forget_flow(void);
-extern void update_flow(void);
-extern void update_smell(void);
-extern void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat);
-
-extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
-extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
-
-/* cmd4.c */
-#ifndef JP
-extern concptr get_ordinal_number_suffix(int num);
-#endif
-extern errr do_cmd_write_nikki(int type, int num, concptr note);
-extern void do_cmd_nikki(void);
-extern void do_cmd_redraw(void);
-extern void do_cmd_change_name(void);
-extern void do_cmd_message_one(void);
-extern void do_cmd_messages(int num_now);
-extern void do_cmd_options_aux(int page, concptr info);
-extern void do_cmd_options(void);
-extern void do_cmd_pref(void);
-extern void do_cmd_reload_autopick(void);
-extern void do_cmd_macros(void);
-extern void do_cmd_visuals(void);
-extern void do_cmd_colors(void);
-extern void do_cmd_note(void);
-extern void do_cmd_version(void);
-extern void do_cmd_feeling(void);
-extern void do_cmd_load_screen(void);
-extern void do_cmd_save_screen_html_aux(char *filename, int message);
-extern void do_cmd_save_screen(void);
-extern void do_cmd_knowledge_quests_completed(FILE *fff, QUEST_IDX quest_num[]);
-extern void do_cmd_knowledge_quests_failed(FILE *fff, QUEST_IDX quest_num[]);
-extern void do_cmd_knowledge(void);
-extern void plural_aux(char * Name);
-extern void do_cmd_checkquest(void);
-extern void do_cmd_time(void);
-extern void do_cmd_suicide(void);
-
-/* dungeon.c */
-extern void extract_option_vars(void);
-extern void determine_bounty_uniques(void);
-extern void determine_today_mon(bool conv_old);
-extern void play_game(bool new_game);
-extern s32b turn_real(s32b hoge);
-extern void prevent_turn_overflow(void);
-extern void close_game(void);
-
-/* load.c */
-extern errr rd_savefile_new(void);
-extern bool load_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
-
-/* monster2.c */
-extern void set_target(monster_type *m_ptr, POSITION y, POSITION x);
-extern void reset_target(monster_type *m_ptr);
-extern monster_race *real_r_ptr(monster_type *m_ptr);
-extern MONRACE_IDX real_r_idx(monster_type *m_ptr);
-extern void delete_monster_idx(MONSTER_IDX i);
-extern void delete_monster(POSITION y, POSITION x);
-extern void compact_monsters(int size);
-extern void wipe_m_list(void);
-extern MONSTER_IDX m_pop(void);
-extern errr get_mon_num_prep(monsterrace_hook_type monster_hook, monsterrace_hook_type monster_hook2);
-extern MONRACE_IDX get_mon_num(DEPTH level);
-extern int lore_do_probe(MONRACE_IDX r_idx);
-extern void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
-extern void update_monster(MONSTER_IDX m_idx, bool full);
-extern void update_monsters(bool full);
-extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
-extern void update_smart_learn(MONSTER_IDX m_idx, int what);
-extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
-extern SPEED get_mspeed(monster_race *r_ptr);
-extern void monster_drop_carried_objects(monster_type *m_ptr);
-
-/* object1.c */
-extern void reset_visuals(void);
-extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
-extern void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
-extern concptr item_activation(object_type *o_ptr);
-extern bool screen_object(object_type *o_ptr, BIT_FLAGS mode);
-extern char index_to_label(int i);
-extern INVENTORY_IDX label_to_inven(int c);
-extern INVENTORY_IDX label_to_equip(int c);
-extern s16b wield_slot(object_type *o_ptr);
-extern concptr mention_use(int i);
-extern concptr describe_use(int i);
-extern bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
-extern bool item_tester_okay(object_type *o_ptr);
-extern void display_inven(void);
-extern void display_equip(void);
-extern COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode);
-extern COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode);
-extern void toggle_inven_equip(void);
-extern bool can_get_item(void);
-extern bool get_item(OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode);
-extern object_type *choose_object(OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option);
-PERCENTAGE breakage_chance(object_type *o_ptr, SPELL_IDX snipe_type);
-
-/* object2.c */
-extern void excise_object_idx(OBJECT_IDX o_idx);
-extern void delete_object_idx(OBJECT_IDX o_idx);
-extern void delete_object(POSITION y, POSITION x);
-extern void compact_objects(int size);
-extern void wipe_o_list(void);
-extern OBJECT_IDX o_pop(void);
-extern OBJECT_IDX get_obj_num(DEPTH level);
-extern void object_known(object_type *o_ptr);
-extern void object_aware(object_type *o_ptr);
-extern void object_tried(object_type *o_ptr);
-extern byte value_check_aux1(object_type *o_ptr);
-extern byte value_check_aux2(object_type *o_ptr);
-extern PRICE object_value(object_type *o_ptr);
-extern PRICE object_value_real(object_type *o_ptr);
-extern void distribute_charges(object_type *o_ptr, object_type *q_ptr, int amt);
-extern void reduce_charges(object_type *o_ptr, int amt);
-extern int object_similar_part(object_type *o_ptr, object_type *j_ptr);
-extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
-extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
-extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval);
-extern void object_wipe(object_type *o_ptr);
-extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
-extern void object_copy(object_type *o_ptr, object_type *j_ptr);
-extern void apply_magic(object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
-extern bool make_object(object_type *j_ptr, BIT_FLAGS mode);
-extern void place_object(POSITION y, POSITION x, BIT_FLAGS mode);
-extern bool make_gold(object_type *j_ptr);
-extern void place_gold(POSITION y, POSITION x);
-extern OBJECT_IDX drop_near(object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
-extern void inven_item_charges(INVENTORY_IDX item);
-extern void inven_item_describe(INVENTORY_IDX item);
-extern void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
-extern void inven_item_optimize(INVENTORY_IDX item);
-extern void floor_item_charges(INVENTORY_IDX item);
-extern void floor_item_describe(INVENTORY_IDX item);
-extern void floor_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
-extern void floor_item_optimize(INVENTORY_IDX item);
-extern bool inven_carry_okay(object_type *o_ptr);
-extern bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr);
-extern s16b inven_carry(object_type *o_ptr);
-extern INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt);
-extern void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt);
-extern void combine_pack(void);
-extern void reorder_pack(void);
-extern void display_koff(KIND_OBJECT_IDX k_idx);
-extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
-extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
-extern void torch_lost_fuel(object_type *o_ptr);
-extern concptr essence_name[];
-
-/* racial.c */
-extern void do_cmd_racial_power(void);
-
-/* save.c */
-extern bool save_player(void);
-extern bool load_player(void);
-extern void remove_loc(void);
-extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
-
-/* spells1.c */
-extern PERCENTAGE beam_chance(void);
-extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-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);
-extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
-extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
-extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
-extern int project_length;
-extern bool binding_field(HIT_POINT dam);
-extern void seal_of_mirror(HIT_POINT dam);
-extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
-
-/* spells2.c */
-extern bool detect_traps(POSITION range, bool known);
-extern bool detect_doors(POSITION range);
-extern bool detect_stairs(POSITION range);
-extern bool detect_treasure(POSITION range);
-extern bool detect_objects_gold(POSITION range);
-extern bool detect_objects_normal(POSITION range);
-extern bool detect_objects_magic(POSITION range);
-extern bool detect_monsters_normal(POSITION range);
-extern bool detect_monsters_invis(POSITION range);
-extern bool detect_monsters_evil(POSITION range);
-extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
-extern bool detect_monsters_string(POSITION range, concptr);
-extern bool detect_monsters_nonliving(POSITION range);
-extern bool detect_monsters_mind(POSITION range);
-extern bool detect_all(POSITION range);
-extern bool wall_stone(void);
-extern bool speed_monsters(void);
-extern bool slow_monsters(int power);
-extern bool sleep_monsters(int power);
-extern void aggravate_monsters(MONSTER_IDX who);
-extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
-extern bool symbol_genocide(int power, bool player_cast);
-extern bool mass_genocide(int power, bool player_cast);
-extern bool mass_genocide_undead(int power, bool player_cast);
-extern bool probing(void);
-extern bool banish_evil(int dist);
-extern bool dispel_evil(HIT_POINT dam);
-extern bool dispel_good(HIT_POINT dam);
-extern bool dispel_undead(HIT_POINT dam);
-extern bool dispel_monsters(HIT_POINT dam);
-extern bool dispel_living(HIT_POINT dam);
-extern bool dispel_demons(HIT_POINT dam);
-extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
-extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
-extern bool crusade(void);
-extern bool turn_undead(void);
-extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
-extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
-extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
-extern void lite_room(POSITION y1, POSITION x1);
-extern bool starlight(bool magic);
-extern void unlite_room(POSITION y1, POSITION x1);
-extern bool lite_area(HIT_POINT dam, POSITION rad);
-extern bool unlite_area(HIT_POINT dam, POSITION rad);
-extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
-extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
-extern void call_chaos(void);
-extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-extern bool lite_line(DIRECTION dir, HIT_POINT dam);
-extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
-extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
-extern bool destroy_door(DIRECTION dir);
-extern bool disarm_trap(DIRECTION dir);
-extern bool wizard_lock(DIRECTION dir);
-extern bool teleport_monster(DIRECTION dir, int distance);
-extern bool door_creation(void);
-extern bool trap_creation(POSITION y, POSITION x);
-extern bool tree_creation(void);
-extern bool glyph_creation(void);
-extern bool destroy_doors_touch(void);
-extern bool disarm_traps_touch(void);
-extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
-extern bool sleep_monsters_touch(void);
-extern bool activate_ty_curse(bool stop_ty, int *count);
-extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
-extern void wall_breaker(void);
-extern bool confuse_monsters(HIT_POINT dam);
-extern bool charm_monsters(HIT_POINT dam);
-extern bool charm_animals(HIT_POINT dam);
-extern bool stun_monsters(HIT_POINT dam);
-extern bool stasis_monsters(HIT_POINT dam);
-extern bool banish_monsters(int dist);
-extern bool turn_monsters(HIT_POINT dam);
-extern bool turn_evil(HIT_POINT dam);
-extern bool deathray_monsters(void);
-extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool mindblast_monsters(HIT_POINT dam);
-extern s32b flag_cost(object_type *o_ptr, int plusses);
-extern bool teleport_swap(DIRECTION dir);
-extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
-extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
-extern bool eat_magic(int power);
-extern void discharge_minion(void);
-extern bool kawarimi(bool success);
-extern bool rush_attack(bool *mdeath);
-extern void remove_all_mirrors(bool explode);
-extern void ring_of_power(DIRECTION dir);
-extern void wild_magic(int spell);
-extern void cast_meteor(HIT_POINT dam, POSITION rad);
-extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
-extern void cast_wonder(DIRECTION dir);
-extern void cast_invoke_spirits(DIRECTION dir);
-extern void cast_shuffle(void);
-extern void stop_mouth(void);
-extern bool_hack vampirism(void);
-extern bool panic_hit(void);
-extern bool psychometry(void);
-extern bool draconian_breath(player_type *creature_ptr);
-extern bool android_inside_weapon(player_type *creature_ptr);
-extern bool create_ration(player_type *crature_ptr);
-extern void hayagake(player_type *creature_ptr);
-extern bool double_attack(player_type *creature_ptr);
-extern bool comvert_hp_to_mp(player_type *creature_ptr);
-extern bool comvert_mp_to_hp(player_type *creature_ptr);
-extern bool demonic_breath(player_type *creature_ptr);
-extern bool mirror_concentration(player_type *creature_ptr);
-extern bool sword_dancing(player_type *creature_ptr);
-extern bool confusing_light(player_type *creature_ptr);
-extern bool rodeo(player_type *creature_ptr);
-extern bool clear_mind(player_type *creature_ptr);
-extern bool concentration(player_type *creature_ptr);
-