extern bool hack_mutation;
+/*
+ * Software options (set via the '=' command). See "tables.c"
+ */
+
/*** Input Options ***/
-extern bool rogue_like_commands; /* Rogue-like commands */
-extern bool always_pickup; /* Pick things up by default */
-extern bool carry_query_flag; /* Prompt before picking things up */
-extern bool quick_messages; /* Activate quick messages */
-extern bool auto_more; /* Automatically clear '-more-' prompts */
-extern bool command_menu; /* Enable command selection menu */
-extern bool other_query_flag; /* Prompt for floor item selection */
-extern bool use_old_target; /* Use old target by default */
-extern bool always_repeat; /* Repeat obvious commands */
-extern bool confirm_destroy; /* Prompt for destruction of known worthless items */
-extern bool confirm_wear; /* Confirm to wear/wield known cursed items */
-extern bool confirm_quest; /* Prompt before exiting a quest level */
-extern bool target_pet; /* Allow targetting pets */
+extern bool rogue_like_commands; /* Rogue-like commands */
+extern bool always_pickup; /* Pick things up by default */
+extern bool carry_query_flag; /* Prompt before picking things up */
+extern bool quick_messages; /* Activate quick messages */
+extern bool auto_more; /* Automatically clear '-more-' prompts */
+extern bool command_menu; /* Enable command selection menu */
+extern bool other_query_flag; /* Prompt for floor item selection */
+extern bool use_old_target; /* Use old target by default */
+extern bool always_repeat; /* Repeat obvious commands */
+extern bool confirm_destroy; /* Prompt for destruction of known worthless items */
+extern bool confirm_wear; /* Confirm to wear/wield known cursed items */
+extern bool confirm_quest; /* Prompt before exiting a quest level */
+extern bool target_pet; /* Allow targetting pets */
#ifdef ALLOW_EASY_OPEN
-extern bool easy_open; /* Automatically open doors */
+extern bool easy_open; /* Automatically open doors */
#endif
#ifdef ALLOW_EASY_DISARM
-extern bool easy_disarm; /* Automatically disarm traps */
+extern bool easy_disarm; /* Automatically disarm traps */
#endif
#ifdef ALLOW_EASY_FLOOR
-extern bool easy_floor; /* Display floor stacks in a list */
+extern bool easy_floor; /* Display floor stacks in a list */
#endif
-extern bool use_command; /* Allow unified use command */
-extern bool over_exert; /* Allow casting spells when short of mana */
-extern bool numpad_as_cursorkey; /* Use numpad keys as cursor key in editor mode */
-
-
-/*** Output Options ***/
-
-extern bool depth_in_feet; /* Show dungeon level in feet */
-extern bool show_labels; /* Show labels in object listings */
-extern bool show_weights; /* Show weights in object listings */
-extern bool show_item_graph; /* Show items graphics */
-extern bool plain_pickup; /* Plain pickup messages(japanese only) */
-extern bool equippy_chars; /* Display 'equippy' chars */
-extern bool display_mutations; /* Display mutations in 'C'haracter Display */
-extern bool plain_descriptions; /* Plain object descriptions */
-extern bool center_player; /* Center map while walking (*slow*) */
-extern bool center_running; /* Centering even while running */
-extern bool view_yellow_lite; /* Use special colors for torch-lit grids */
-extern bool view_bright_lite; /* Use special colors for 'viewable' grids */
-extern bool view_granite_lite; /* Use special colors for wall grids (slow) */
-extern bool view_special_lite; /* Use special colors for floor grids (slow) */
-extern bool display_path; /* Display actual path before shooting */
-extern bool always_show_list; /* Always show list at first when select items */
-extern bool abbrev_extra; /* Describe obj's extra resistances by abbreviation */
-extern bool abbrev_all; /* Describe obj's all resistances by abbreviation */
-
-
-/*** Game-Play ***/
-
-extern bool stack_force_notes; /* Merge inscriptions when stacking */
-extern bool stack_force_costs; /* Merge discounts when stacking */
-extern bool expand_list; /* Expand the power of the list commands */
-extern bool view_perma_grids; /* Map remembers all perma-lit grids */
-extern bool view_torch_grids; /* Map remembers all torch-lit grids */
-extern bool view_unsafe_grids; /* Map marked by detect traps */
-extern bool small_levels; /* Allow unusually small dungeon levels */
-extern bool always_small_levels; /* Always create unusually small dungeon levels */
-extern bool empty_levels; /* Allow empty 'arena' levels */
-extern bool bound_walls_perm; /* Boundary walls become 'permanent wall' */
-extern bool last_words; /* Leave last words when your character dies */
+extern bool use_command; /* Allow unified use command */
+extern bool over_exert; /* Allow casting spells when short of mana */
+extern bool numpad_as_cursorkey; /* Use numpad keys as cursor key in editor mode */
+
+
+/*** Map Screen Options ***/
+
+extern bool center_player; /* Center map while walking (*slow*) */
+extern bool center_running; /* Centering even while running */
+extern bool view_yellow_lite; /* Use special colors for torch-lit grids */
+extern bool view_bright_lite; /* Use special colors for 'viewable' grids */
+extern bool view_granite_lite; /* Use special colors for wall grids (slow) */
+extern bool view_special_lite; /* Use special colors for floor grids (slow) */
+extern bool view_reduce_view; /* Reduce view-radius in town */
+extern bool fresh_before; /* Flush output while continuous command */
+extern bool fresh_after; /* Flush output after monster's move */
+extern bool fresh_message; /* Flush output after every message */
+extern bool hilite_player; /* Hilite the player with the cursor */
+extern bool display_path; /* Display actual path before shooting */
+
+
+/*** Text Display Options ***/
+
+extern bool plain_descriptions; /* Plain object descriptions */
+extern bool plain_pickup; /* Plain pickup messages(japanese only) */
+extern bool always_show_list; /* Always show list when choosing items */
+extern bool depth_in_feet; /* Show dungeon level in feet */
+extern bool show_labels; /* Show labels in object listings */
+extern bool show_weights; /* Show weights in object listings */
+extern bool show_item_graph; /* Show items graphics */
+extern bool equippy_chars; /* Display 'equippy' chars */
+extern bool display_mutations; /* Display mutations in 'C'haracter Display */
+extern bool compress_savefile; /* Compress messages in savefiles */
+extern bool abbrev_extra; /* Describe obj's extra resistances by abbreviation */
+extern bool abbrev_all; /* Describe obj's all resistances by abbreviation */
+extern bool exp_need; /* Show the experience needed for next level */
+
+
+/*** Game-Play Options ***/
+
+extern bool stack_force_notes; /* Merge inscriptions when stacking */
+extern bool stack_force_costs; /* Merge discounts when stacking */
+extern bool expand_list; /* Expand the power of the list commands */
+extern bool view_perma_grids; /* Map remembers all perma-lit grids */
+extern bool view_torch_grids; /* Map remembers all torch-lit grids */
+extern bool view_unsafe_grids; /* Map marked by detect traps */
+extern bool small_levels; /* Allow unusually small dungeon levels */
+extern bool always_small_levels; /* Always create unusually small dungeon levels */
+extern bool empty_levels; /* Allow empty 'arena' levels */
+extern bool bound_walls_perm; /* Boundary walls become 'permanent wall' */
+extern bool last_words; /* Leave last words when your character dies */
#ifdef WORLD_SCORE
-extern bool send_score; /* Send score dump to the world score server */
+extern bool send_score; /* Send score dump to the world score server */
#endif
-extern bool allow_debug_opts; /* Allow use of debug/cheat options */
-
-
-/*** Disturbance ***/
-
-extern bool find_ignore_stairs; /* Run past stairs */
-extern bool find_ignore_doors; /* Run through open doors */
-extern bool find_cut; /* Run past known corners */
-extern bool disturb_move; /* Disturb whenever any monster moves */
-extern bool disturb_high; /* Disturb whenever high-level monster moves */
-extern bool disturb_near; /* Disturb whenever viewable monster moves */
-extern bool disturb_pets; /* Disturb when visible pets move */
-extern bool disturb_panel; /* Disturb whenever map panel changes */
-extern bool disturb_state; /* Disturb whenever player state changes */
-extern bool disturb_minor; /* Disturb whenever boring things happen */
-extern bool ring_bell; /* Audible bell (on errors, etc) */
-extern bool disturb_trap_detect; /* Disturb when leaving trap detected area */
-extern bool alert_trap_detect; /* Alert when leaving trap detected area */
+extern bool allow_debug_opts; /* Allow use of debug/cheat options */
-/*** Efficiency ***/
+/*** Disturbance Options ***/
-extern bool view_reduce_view; /* Reduce view-radius in town */
-extern bool check_abort; /* Check for user abort while continuous command */
-extern bool flush_failure; /* Flush input on various failures */
-extern bool flush_disturb; /* Flush input whenever disturbed */
-extern bool fresh_before; /* Flush output while continuous command */
-extern bool fresh_after; /* Flush output after monster's move */
-extern bool fresh_message; /* Flush output after every message */
-extern bool compress_savefile; /* Compress messages in savefiles */
-extern bool hilite_player; /* Hilite the player with the cursor */
+extern bool find_ignore_stairs; /* Run past stairs */
+extern bool find_ignore_doors; /* Run through open doors */
+extern bool find_cut; /* Run past known corners */
+extern bool check_abort; /* Check for user abort while continuous command */
+extern bool flush_failure; /* Flush input on various failures */
+extern bool flush_disturb; /* Flush input whenever disturbed */
+extern bool disturb_move; /* Disturb whenever any monster moves */
+extern bool disturb_high; /* Disturb whenever high-level monster moves */
+extern bool disturb_near; /* Disturb whenever viewable monster moves */
+extern bool disturb_pets; /* Disturb when visible pets move */
+extern bool disturb_panel; /* Disturb whenever map panel changes */
+extern bool disturb_state; /* Disturb whenever player state changes */
+extern bool disturb_minor; /* Disturb whenever boring things happen */
+extern bool ring_bell; /* Audible bell (on errors, etc) */
+extern bool disturb_trap_detect; /* Disturb when leaving trap detected area */
+extern bool alert_trap_detect; /* Alert when leaving trap detected area */
/*** Birth Options ***/
-extern bool manual_haggle; /* Manually haggle in stores */
-extern bool easy_band; /* Easy Mode (*) */
-extern bool smart_learn; /* Monsters learn from their mistakes (*) */
-extern bool smart_cheat; /* Monsters exploit players weaknesses (*) */
-extern bool vanilla_town; /* Use 'vanilla' town without quests and wilderness */
-extern bool lite_town; /* Use 'lite' town without a wilderness */
-extern bool ironman_shops; /* Stores are permanently closed (*) */
-extern bool ironman_small_levels; /* Always create unusually small dungeon levels (*) */
-extern bool ironman_downward; /* Disable recall and use of up stairs (*) */
-extern bool ironman_empty_levels; /* Always create empty 'arena' levels (*) */
-extern bool ironman_rooms; /* Always generate very unusual rooms (*) */
-extern bool ironman_nightmare; /* Nightmare mode(it isn't even remotely fair!)(*) */
-extern bool left_hander; /* Left-Hander */
-extern bool preserve_mode; /* Preserve artifacts (*) */
-extern bool autoroller; /* Allow use of autoroller for stats (*) */
-extern bool autochara; /* Autoroll for weight, height and social status */
-extern bool powerup_home; /* Increase capacity of your home (*) */
+extern bool manual_haggle; /* Manually haggle in stores */
+extern bool easy_band; /* Easy Mode (*) */
+extern bool smart_learn; /* Monsters learn from their mistakes (*) */
+extern bool smart_cheat; /* Monsters exploit players weaknesses (*) */
+extern bool vanilla_town; /* Use 'vanilla' town without quests and wilderness */
+extern bool lite_town; /* Use 'lite' town without a wilderness */
+extern bool ironman_shops; /* Stores are permanently closed (*) */
+extern bool ironman_small_levels; /* Always create unusually small dungeon levels (*) */
+extern bool ironman_downward; /* Disable recall and use of up stairs (*) */
+extern bool ironman_empty_levels; /* Always create empty 'arena' levels (*) */
+extern bool ironman_rooms; /* Always generate very unusual rooms (*) */
+extern bool ironman_nightmare; /* Nightmare mode(it isn't even remotely fair!)(*) */
+extern bool left_hander; /* Left-Hander */
+extern bool preserve_mode; /* Preserve artifacts (*) */
+extern bool autoroller; /* Allow use of autoroller for stats (*) */
+extern bool autochara; /* Autoroll for weight, height and social status */
+extern bool powerup_home; /* Increase capacity of your home (*) */
/*** Easy Object Auto-Destroyer ***/
-extern bool destroy_items; /* Use easy auto-destroyer */
-extern bool destroy_feeling; /* Apply auto-destroy as sense feeling */
-extern bool destroy_identify; /* Apply auto-destroy as identify an item */
-extern bool leave_worth; /* Auto-destroyer leaves known worthy items */
-extern bool leave_equip; /* Auto-destroyer leaves weapons and armour */
-extern bool leave_chest; /* Auto-destroyer leaves closed chests */
-extern bool leave_wanted; /* Auto-destroyer leaves wanted corpses */
-extern bool leave_corpse; /* Auto-destroyer leaves corpses and skeletons */
-extern bool leave_junk; /* Auto-destroyer leaves junk */
-extern bool leave_special; /* Auto-destroyer leaves items your race/class needs */
+extern bool destroy_items; /* Use easy auto-destroyer */
+extern bool destroy_feeling; /* Apply auto-destroy as sense feeling */
+extern bool destroy_identify; /* Apply auto-destroy as identify an item */
+extern bool leave_worth; /* Auto-destroyer leaves known worthy items */
+extern bool leave_equip; /* Auto-destroyer leaves weapons and armour */
+extern bool leave_chest; /* Auto-destroyer leaves closed chests */
+extern bool leave_wanted; /* Auto-destroyer leaves wanted corpses */
+extern bool leave_corpse; /* Auto-destroyer leaves corpses and skeletons */
+extern bool leave_junk; /* Auto-destroyer leaves junk */
+extern bool leave_special; /* Auto-destroyer leaves items your race/class needs */
/*** Play-record Options ***/
-extern bool record_fix_art; /* Record fixed artifacts */
-extern bool record_rand_art; /* Record random artifacts */
-extern bool record_destroy_uniq; /* Record when destroy unique monster */
-extern bool record_fix_quest; /* Record fixed quests */
-extern bool record_rand_quest; /* Record random quests */
-extern bool record_maxdeapth; /* Record movements to deepest level */
-extern bool record_stair; /* Record recall and stair movements */
-extern bool record_buy; /* Record purchased items */
-extern bool record_sell; /* Record sold items */
-extern bool record_danger; /* Record hitpoint warning */
-extern bool record_arena; /* Record arena victories */
-extern bool record_ident; /* Record first identified items */
-extern bool record_named_pet; /* Record informations of named pets */
+extern bool record_fix_art; /* Record fixed artifacts */
+extern bool record_rand_art; /* Record random artifacts */
+extern bool record_destroy_uniq; /* Record when destroy unique monster */
+extern bool record_fix_quest; /* Record fixed quests */
+extern bool record_rand_quest; /* Record random quests */
+extern bool record_maxdepth; /* Record movements to deepest level */
+extern bool record_stair; /* Record recall and stair movements */
+extern bool record_buy; /* Record purchased items */
+extern bool record_sell; /* Record sold items */
+extern bool record_danger; /* Record hitpoint warning */
+extern bool record_arena; /* Record arena victories */
+extern bool record_ident; /* Record first identified items */
+extern bool record_named_pet; /* Record informations of named pets */
extern bool cheat_peek;
extern int init_flags;
extern int highscore_fd;
extern int mutant_regenerate_mod;
-extern bool easy_band;
-extern bool vanilla_town;
-extern bool ironman_shops;
-extern bool ironman_small_levels;
-extern bool ironman_downward;
-extern bool lite_town;
-extern bool ironman_empty_levels;
-extern bool ironman_rooms;
-extern bool ironman_nightmare;
-extern bool left_hander;
-extern bool preserve_mode;
-extern bool autoroller;
-extern bool autochara;
extern bool can_save;
extern s16b world_monster;
extern bool world_player;
extern void wiz_lite(bool ninja);
extern void wiz_dark(void);
extern void cave_set_feat(int y, int x, int feat);
+extern int conv_dungeon_feat(int newfeat);
extern int feat_state(int feat, int action);
extern void cave_alter_feat(int y, int x, int action);
extern void remove_mirror(int y, int x);
extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown);
extern void search(void);
extern void py_pickup_aux(int o_idx);
-extern void carry(int pickup);
+extern void carry(bool pickup);
extern bool py_attack(int y, int x, int mode);
extern bool pattern_seq(int c_y, int c_x, int n_y, int n_x);
extern bool player_can_enter(s16b feature, u16b mode);
-extern void move_player(int dir, int do_pickup, bool break_trap);
+extern bool move_player_effect(int oy, int ox, int ny, int nx, u32b mpe_mode);
+extern void move_player(int dir, bool do_pickup, bool break_trap);
extern void run_step(int dir);
/* cmd2.c */
extern void do_cmd_bash(void);
extern void do_cmd_alter(void);
extern void do_cmd_spike(void);
-extern void do_cmd_walk(int pickup);
-extern void do_cmd_stay(int pickup);
+extern void do_cmd_walk(bool pickup);
+extern void do_cmd_stay(bool pickup);
extern void do_cmd_run(void);
extern void do_cmd_rest(void);
extern void do_cmd_fire(void);
/* spells1.c */
extern bool in_disintegration_range(int y1, int x1, int y2, int x2);
-extern void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, bool disint_ball, bool real_breath);
+extern void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ);
extern int take_hit(int damage_type, int damage, cptr kb_str, int monspell);
extern u16b bolt_pict(int y, int x, int ny, int nx, int typ);
extern sint project_path(u16b *gp, int range, int y1, int x1, int y2, int x2, int flg);
/* spells3.c */
extern bool teleport_away(int m_idx, int dis, bool dec_valour);
extern void teleport_monster_to(int m_idx, int ty, int tx, int power);
-extern bool cave_teleportable_bold(int y, int x, u16b mode);
+extern bool cave_teleportable_bold(int y, int x);
extern void teleport_player(int dis);
extern void teleport_player_to(int ny, int nx, bool no_tele);
extern void teleport_level(int m_idx);
extern void fetch(int dir, int wgt, bool require_los);
extern void alter_reality(void);
extern bool warding_glyph(void);
-extern bool warding_mirror(void);
+extern bool place_mirror(void);
extern bool explosive_rune(void);
extern void identify_pack(void);
extern bool remove_curse(void);
extern bool brand_bolts(void);
extern bool polymorph_monster(int y, int x);
extern bool dimension_door(void);
+extern bool mirror_tunnel(void);
extern bool summon_kin_player(int level, int y, int x, u32b mode);
/* store.c */
extern bool do_inc_stat(int stat);
extern bool restore_level(void);
extern bool lose_all_info(void);
+extern void gain_exp_64(s32b amount, u32b amount_frac);
extern void gain_exp(s32b amount);
extern void calc_android_exp(void);
extern void lose_exp(s32b amount);
extern bool spell_is_inate(u16b spell);
/* mspells2.c */
+extern void get_project_point(int sy, int sx, int *ty, int *tx, int flg);
extern bool monst_spell_monst(int m_idx);
/* artifact.c */
extern int scan_floor(int *items, int y, int x, int mode);
extern int show_floor(int target_item, int y, int x, int *min_width);
extern bool get_item_floor(int *cp, cptr pmt, cptr str, int mode);
-extern void py_pickup_floor(int pickup);
+extern void py_pickup_floor(bool pickup);
/* variable.c */
extern bool easy_floor;