summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-04 08:33:35 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-04 08:45:44 +0100
commit89ff79ab008f440bc9126103fc21ed71aac0526f (patch)
tree99876962ea7952415d4af426a6a1c6bc9afd642b
parentaa8110a9204f7f9a1c50d98f3ada4d8c6e3b405e (diff)
downloadcrawl-ref-89ff79ab008f440bc9126103fc21ed71aac0526f.tar.gz
crawl-ref-89ff79ab008f440bc9126103fc21ed71aac0526f.zip
Split game_options from externs.h into options.h.
-rw-r--r--crawl-ref/source/abl-show.cc1
-rw-r--r--crawl-ref/source/acr.cc1
-rw-r--r--crawl-ref/source/arena.cc1
-rw-r--r--crawl-ref/source/artefact.cc1
-rw-r--r--crawl-ref/source/beam.cc1
-rw-r--r--crawl-ref/source/chardump.cc1
-rw-r--r--crawl-ref/source/cio.cc1
-rw-r--r--crawl-ref/source/command.cc1
-rw-r--r--crawl-ref/source/crash-u.cc1
-rw-r--r--crawl-ref/source/debug.cc1
-rw-r--r--crawl-ref/source/decks.cc1
-rw-r--r--crawl-ref/source/delay.cc1
-rw-r--r--crawl-ref/source/describe.cc1
-rw-r--r--crawl-ref/source/directn.cc1
-rw-r--r--crawl-ref/source/dungeon.cc1
-rw-r--r--crawl-ref/source/effects.cc1
-rw-r--r--crawl-ref/source/exclude.cc1
-rw-r--r--crawl-ref/source/externs.h466
-rw-r--r--crawl-ref/source/fight.cc1
-rw-r--r--crawl-ref/source/files.cc1
-rw-r--r--crawl-ref/source/food.cc1
-rw-r--r--crawl-ref/source/godabil.cc1
-rw-r--r--crawl-ref/source/hiscores.cc1
-rw-r--r--crawl-ref/source/initfile.cc1
-rw-r--r--crawl-ref/source/invent.cc1
-rw-r--r--crawl-ref/source/item_use.cc1
-rw-r--r--crawl-ref/source/itemname.cc1
-rw-r--r--crawl-ref/source/items.cc1
-rw-r--r--crawl-ref/source/jobs.cc2
-rw-r--r--crawl-ref/source/kills.cc1
-rw-r--r--crawl-ref/source/l_crawl.cc1
-rw-r--r--crawl-ref/source/l_option.cc2
-rw-r--r--crawl-ref/source/libunix.cc1
-rw-r--r--crawl-ref/source/macro.cc1
-rw-r--r--crawl-ref/source/makeitem.cc1
-rw-r--r--crawl-ref/source/menu.cc1
-rw-r--r--crawl-ref/source/message.cc1
-rw-r--r--crawl-ref/source/misc.cc1
-rw-r--r--crawl-ref/source/mon-abil.cc1
-rw-r--r--crawl-ref/source/mon-act.cc1
-rw-r--r--crawl-ref/source/mon-behv.cc1
-rw-r--r--crawl-ref/source/mon-info.cc1
-rw-r--r--crawl-ref/source/mon-util.cc1
-rw-r--r--crawl-ref/source/monplace.cc1
-rw-r--r--crawl-ref/source/monstuff.cc1
-rw-r--r--crawl-ref/source/mutation.cc1
-rw-r--r--crawl-ref/source/newgame.cc1
-rw-r--r--crawl-ref/source/ng-input.cc1
-rw-r--r--crawl-ref/source/notes.cc1
-rw-r--r--crawl-ref/source/options.h473
-rw-r--r--crawl-ref/source/ouch.cc1
-rw-r--r--crawl-ref/source/output.cc1
-rw-r--r--crawl-ref/source/player.cc1
-rw-r--r--crawl-ref/source/quiver.cc1
-rw-r--r--crawl-ref/source/religion.cc1
-rw-r--r--crawl-ref/source/shopping.cc1
-rw-r--r--crawl-ref/source/skills2.cc1
-rw-r--r--crawl-ref/source/species.cc1
-rw-r--r--crawl-ref/source/spells1.cc1
-rw-r--r--crawl-ref/source/spl-cast.cc1
-rw-r--r--crawl-ref/source/stash.cc1
-rw-r--r--crawl-ref/source/state.cc1
-rw-r--r--crawl-ref/source/stuff.cc1
-rw-r--r--crawl-ref/source/tilepick.cc1
-rw-r--r--crawl-ref/source/tilereg.cc1
-rw-r--r--crawl-ref/source/tilesdl.cc1
-rw-r--r--crawl-ref/source/travel.cc1
-rw-r--r--crawl-ref/source/tutorial.cc1
-rw-r--r--crawl-ref/source/view.cc1
-rw-r--r--crawl-ref/source/xom.cc1
70 files changed, 543 insertions, 466 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 5dadcc134b..3c3a1f6a85 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -19,6 +19,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "abyss.h"
#include "artefact.h"
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 15809fab90..e6aad2d09b 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -39,6 +39,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "species.h"
#include "abl-show.h"
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index 74d29193d1..0c18e8d33d 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -6,6 +6,7 @@
#include "AppHdr.h"
#include "externs.h"
+#include "options.h"
#include "arena.h"
#include "artefact.h"
#include "cio.h"
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc
index 4653872a55..306b900267 100644
--- a/crawl-ref/source/artefact.cc
+++ b/crawl-ref/source/artefact.cc
@@ -15,6 +15,7 @@
#include <algorithm>
#include "externs.h"
+#include "options.h"
#include "colour.h"
#include "database.h"
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index c876bc8b41..96b139da86 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -23,6 +23,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "cio.h"
#include "cloud.h"
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 4297e442e9..335f0e4386 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -24,6 +24,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "debug.h"
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc
index 8f4fb155e9..59f460b0ec 100644
--- a/crawl-ref/source/cio.cc
+++ b/crawl-ref/source/cio.cc
@@ -8,6 +8,7 @@
#include "cio.h"
#include "externs.h"
+#include "options.h"
#include "macro.h"
#include "message.h"
#include "state.h"
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 94b0487508..d9d94b83ee 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -14,6 +14,7 @@
#include <ctype.h>
#include "externs.h"
+#include "options.h"
#include "abl-show.h"
#include "branch.h"
diff --git a/crawl-ref/source/crash-u.cc b/crawl-ref/source/crash-u.cc
index b63ed3b0b0..2e74fc2f31 100644
--- a/crawl-ref/source/crash-u.cc
+++ b/crawl-ref/source/crash-u.cc
@@ -51,6 +51,7 @@ template <typename TO, typename FROM> TO nasty_cast(FROM f) {
#include "crash.h"
#include "externs.h"
+#include "options.h"
#include "state.h"
#include "initfile.h"
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 99562208ec..cfa01ca783 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -24,6 +24,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "species.h"
#include "artefact.h"
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 038045d191..16594c3e69 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -11,6 +11,7 @@
#include <algorithm>
#include "externs.h"
+#include "options.h"
#include "beam.h"
#include "cio.h"
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 85f38ab8be..9ca25fabf5 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -6,6 +6,7 @@
#include "AppHdr.h"
#include "externs.h"
+#include "options.h"
#include <stdio.h>
#include <string.h>
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index c6727eaf3e..612de87d5b 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -20,6 +20,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "species.h"
#include "abl-show.h"
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 2de07d8688..b80eeb3199 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -21,6 +21,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "cio.h"
#include "cloud.h"
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 5c0021d3e2..85c91ea8fb 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -23,6 +23,7 @@
#include "effects.h"
#include "enum.h"
#include "externs.h"
+#include "options.h"
#include "directn.h"
#include "dungeon.h"
#include "files.h"
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 7b515de2ec..1630dab32a 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -17,6 +17,7 @@
#include <cmath>
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "beam.h"
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index 8647822693..f4ed190336 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -9,6 +9,7 @@
#include "coord.h"
#include "mon-util.h"
+#include "options.h"
#include "overmap.h"
#include "stuff.h"
#include "tags.h"
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 53a4ce2f9d..0c7bc73119 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -758,472 +758,6 @@ struct mon_display
unsigned col = 0) : type(m), glyph(gly), colour(col) { }
};
-class InitLineInput;
-struct game_options
-{
-public:
- game_options();
- void reset_startup_options();
- void reset_options();
-
- void read_option_line(const std::string &s, bool runscripts = false);
- void read_options(InitLineInput &, bool runscripts,
- bool clear_aliases = true);
-
- void include(const std::string &file, bool resolve, bool runscript);
- void report_error(const std::string &error);
-
- std::string resolve_include(const std::string &file,
- const char *type = "");
-
- bool was_included(const std::string &file) const;
-
- static std::string resolve_include(
- std::string including_file,
- std::string included_file,
- const std::vector<std::string> *rcdirs = NULL)
- throw (std::string);
-
-public:
- std::string filename; // The name of the file containing options.
- std::string basefilename; // Base (pathless) file name
- int line_num; // Current line number being processed.
-
- // View options
- std::vector<feature_override> feature_overrides;
- std::vector<mon_display> mon_glyph_overrides;
- unsigned cset_override[NUM_CSET][NUM_DCHAR_TYPES];
-
- std::string save_dir; // Directory where saves and bones go.
- std::string macro_dir; // Directory containing macro.txt
- std::string morgue_dir; // Directory where character dumps and morgue
- // dumps are saved. Overrides crawl_dir.
- std::vector<std::string> additional_macro_files;
-
- std::string player_name;
-
-#ifdef DGL_SIMPLE_MESSAGING
- bool messaging; // Check for messages.
-#endif
-
- bool suppress_startup_errors;
-
- bool mouse_input;
-
- int view_max_width;
- int view_max_height;
- int mlist_min_height;
- int msg_max_height;
- bool mlist_allow_alternate_layout;
- int mlist_targetting; // not actually a real option
- bool classic_hud;
- bool msg_condense_repeats;
-
- // The view lock variables force centering the viewport around the PC @
- // at all times (the default). If view locking is not enabled, the viewport
- // scrolls only when the PC hits the edge of it.
- bool view_lock_x;
- bool view_lock_y;
-
- // For an unlocked viewport, this will center the viewport when scrolling.
- bool center_on_scroll;
-
- // If symmetric_scroll is set, for diagonal moves, if the view
- // scrolls at all, it'll scroll diagonally.
- bool symmetric_scroll;
-
- // How far from the viewport edge is scrolling forced.
- int scroll_margin_x;
- int scroll_margin_y;
-
- bool verbose_monster_pane;
-
- int autopickup_on;
- int default_friendly_pickup;
- bool show_more_prompt;
-
- bool show_gold_turns; // Show gold and turns in HUD.
- bool show_beam; // Show targetting beam by default.
-
- long autopickups; // items to autopickup
- bool show_inventory_weights; // show weights in inventory listings
- bool colour_map; // add colour to the map
- bool clean_map; // remove unseen clouds/monsters
- bool show_uncursed; // label known uncursed items as "uncursed"
- bool easy_open; // open doors with movement
- bool easy_unequip; // allow auto-removing of armour / jewellery
- bool equip_unequip; // Make 'W' = 'T', and 'P' = 'R'.
- bool easy_butcher; // autoswap to butchering tool
- bool always_confirm_butcher; // even if only one corpse
- bool chunks_autopickup; // Autopickup chunks after butchering
- bool prompt_for_swap; // Prompt to switch back from butchering
- // tool if hostile monsters are around.
- bool list_rotten; // list slots for rotting corpses/chunks
- bool prefer_safe_chunks; // prefer clean chunks to contaminated ones
- bool easy_eat_chunks; // make 'e' auto-eat the oldest safe chunk
- bool easy_eat_gourmand; // with easy_eat_chunks, and wearing a
- // "OfGourmand, auto-eat contaminated
- // chunks if no safe ones are present
- bool easy_eat_contaminated; // like easy_eat_gourmand, but
- // always active.
- bool default_target; // start targetting on a real target
- bool autopickup_no_burden; // don't autopickup if it changes burden
-
- bool note_all_skill_levels; // take note for all skill levels (1-27)
- bool note_skill_max; // take note when skills reach new max
- bool note_all_spells; // take note when learning any spell
- std::string user_note_prefix; // Prefix for user notes
- int note_hp_percent; // percentage hp for notetaking
- bool note_xom_effects; // take note of all Xom effects
- int ood_interesting; // how many levels OOD is noteworthy?
- int rare_interesting; // what monster rarity is noteworthy?
- confirm_level_type easy_confirm; // make yesno() confirming easier
- bool easy_quit_item_prompts; // make item prompts quitable on space
- confirm_prompt_type allow_self_target; // yes, no, prompt
-
- int colour[16]; // macro fg colours to other colours
- int background; // select default background colour
- int channels[NUM_MESSAGE_CHANNELS]; // msg channel colouring
- int target_range; // for whether targetting is out of range
-
- bool use_old_selection_order; // use old order of species/classes in
- // selection screen
- int weapon; // auto-choose weapon for character
- int book; // auto-choose book for character
- int wand; // auto-choose wand for character
- int chaos_knight; // choice of god for Chaos Knights (Xom/Makleb)
- int death_knight; // choice of god/necromancy for Death Knights
- god_type priest; // choice of god for priests (Zin/Yred)
- bool random_pick; // randomly generate character
- bool good_random; // when chosing randomly only choose
- // unrestricted combinations
- int hp_warning; // percentage hp for danger warning
- int magic_point_warning; // percentage mp for danger warning
- char race; // preselected race
- char cls; // preselected class
- bool delay_message_clear; // avoid clearing messages each turn
- unsigned friend_brand; // Attribute for branding friendly monsters
- unsigned neutral_brand; // Attribute for branding neutral monsters
- bool no_dark_brand; // Attribute for branding friendly monsters
- bool macro_meta_entry; // Allow user to use numeric sequences when
- // creating macros
-
- int fire_items_start; // index of first item for fire command
- std::vector<unsigned> fire_order; // missile search order for 'f' command
-
- bool auto_list; // automatically jump to appropriate item lists
-
- bool flush_input[NUM_FLUSH_REASONS]; // when to flush input buff
-
- char_set_type char_set;
- FixedVector<unsigned, NUM_DCHAR_TYPES> char_table;
-
- int num_colours; // used for setting up curses colour table (8 or 16)
-
- std::string pizza;
-
-#ifdef WIZARD
- int wiz_mode; // yes, no, never in wiz mode to start
-#endif
-
- // internal use only:
- int sc_entries; // # of score entries
- int sc_format; // Format for score entries
-
- std::vector<std::pair<int, int> > hp_colour;
- std::vector<std::pair<int, int> > mp_colour;
- std::vector<std::pair<int, int> > stat_colour;
-
- std::string map_file_name; // name of mapping file to use
- std::vector<std::pair<text_pattern, bool> > force_autopickup;
- std::vector<text_pattern> note_monsters; // Interesting monsters
- std::vector<text_pattern> note_messages; // Interesting messages
- std::vector<std::pair<text_pattern, std::string> > autoinscriptions;
- std::vector<text_pattern> note_items; // Objects to note
- std::vector<int> note_skill_levels; // Skill levels to note
-
- bool autoinscribe_artefacts; // Auto-inscribe identified artefacts.
-
- bool pickup_thrown; // Pickup thrown missiles
- bool pickup_dropped; // Pickup dropped objects
- int travel_delay; // How long to pause between travel moves
- int explore_delay; // How long to pause between explore moves
-
- int arena_delay;
- bool arena_dump_msgs;
- bool arena_dump_msgs_all;
- bool arena_list_eq;
- bool arena_force_ai;
-
- // Messages that stop travel
- std::vector<message_filter> travel_stop_message;
- std::vector<message_filter> force_more_message;
-
- int stash_tracking; // How stashes are tracked
-
- int tc_reachable; // Colour for squares that are reachable
- int tc_excluded; // Colour for excluded squares.
- int tc_exclude_circle; // Colour for squares in the exclusion radius
- int tc_dangerous; // Colour for trapped squares, deep water, lava.
- int tc_disconnected;// Areas that are completely disconnected.
- std::vector<text_pattern> auto_exclude; // Automatically set an exclusion
- // around certain monsters.
-
- int travel_stair_cost;
-
- bool show_waypoints;
-
- bool classic_item_colours; // Use old-style item colours
- bool item_colour; // Colour items on level map
-
- unsigned evil_colour; // Colour for things player's god dissapproves
-
- unsigned detected_monster_colour; // Colour of detected monsters
- unsigned detected_item_colour; // Colour of detected items
- unsigned status_caption_colour; // Colour of captions in HUD.
-
- unsigned heap_brand; // Highlight heaps of items
- unsigned stab_brand; // Highlight monsters that are stabbable
- unsigned may_stab_brand; // Highlight potential stab candidates
- unsigned feature_item_brand; // Highlight features covered by items.
- unsigned trap_item_brand; // Highlight traps covered by items.
-
- bool trap_prompt; // Prompt when stepping on mechnical traps
- // without enough hp (using trapwalk.lua)
-
- // What is the minimum number of items in a stack for which
- // you show summary (one-line) information
- int item_stack_summary_minimum;
-
- int explore_stop; // Stop exploring if a previously unseen
- // item comes into view
-
- int explore_stop_prompt;
-
- bool explore_greedy; // Explore goes after items as well.
-
- // How much more eager greedy-explore is for items than to explore.
- int explore_item_greed;
-
- // Some experimental improvements to explore
- bool explore_improved;
-
- std::vector<sound_mapping> sound_mappings;
- std::vector<colour_mapping> menu_colour_mappings;
- std::vector<message_colour_mapping> message_colour_mappings;
-
- bool menu_colour_prefix_class; // Prefix item class to string
- bool menu_colour_shops; // Use menu colours in shops?
-
- std::vector<menu_sort_condition> sort_menus;
-
- int dump_kill_places; // How to dump place information for kills.
- int dump_message_count; // How many old messages to dump
-
- int dump_item_origins; // Show where items came from?
- int dump_item_origin_price;
- bool dump_book_spells;
-
- // Order of sections in the character dump.
- std::vector<std::string> dump_order;
-
- bool level_map_title; // Show title in level map
- bool target_zero_exp; // If true, targetting targets zero-exp
- // monsters.
- bool target_wrap; // Wrap around from last to first target
- bool target_oos; // 'x' look around can target out-of-LOS
- bool target_los_first; // 'x' look around first goes to visible
- // objects/features, then goes to stuff
- // outside LOS.
- bool target_unshifted_dirs; // Unshifted keys target if cursor is
- // on player.
-
- int drop_mode; // Controls whether single or multidrop
- // is the default.
- int pickup_mode; // -1 for single, 0 for menu,
- // X for 'if at least X items present'
-
- bool easy_exit_menu; // Menus are easier to get out of
-
- int assign_item_slot; // How free slots are assigned
-
- std::vector<text_pattern> drop_filter;
-
- FixedArray<bool, NUM_DELAYS, NUM_AINTERRUPTS> activity_interrupts;
-
- // Previous startup options
- bool remember_name; // Remember and reprompt with last name
-
- bool dos_use_background_intensity;
-
- bool use_fake_cursor; // Draw a fake cursor instead of relying
- // on the term's own cursor.
-
- int level_map_cursor_step; // The cursor increment in the level
- // map.
-
- // If the player prefers to merge kill records, this option can do that.
- int kill_map[KC_NCATEGORIES];
-
- bool rest_wait_both; // Stop resting only when both HP and MP are
- // fully restored.
-
-#ifdef WIZARD
- // Parameters for fight simulations.
- long fsim_rounds;
- int fsim_str, fsim_int, fsim_dex;
- int fsim_xl;
- std::string fsim_mons;
- std::vector<std::string> fsim_kit;
-#endif // WIZARD
-
-#ifdef USE_TILE
- char tile_show_items[20]; // show which item types in tile inventory
- bool tile_title_screen; // display title screen?
- bool tile_menu_icons; // display icons in menus?
- // minimap colours
- char tile_player_col;
- char tile_monster_col;
- char tile_neutral_col;
- char tile_friendly_col;
- char tile_plant_col;
- char tile_item_col;
- char tile_unseen_col;
- char tile_floor_col;
- char tile_wall_col;
- char tile_mapped_wall_col;
- char tile_door_col;
- char tile_downstairs_col;
- char tile_upstairs_col;
- char tile_feature_col;
- char tile_trap_col;
- char tile_water_col;
- char tile_lava_col;
- char tile_excluded_col;
- char tile_excl_centre_col;
- char tile_window_col;
- // font settings
- std::string tile_font_crt_file;
- int tile_font_crt_size;
- std::string tile_font_msg_file;
- int tile_font_msg_size;
- std::string tile_font_stat_file;
- int tile_font_stat_size;
- std::string tile_font_lbl_file;
- int tile_font_lbl_size;
- std::string tile_font_tip_file;
- int tile_font_tip_size;
- // window settings
- screen_mode tile_full_screen;
- int tile_window_width;
- int tile_window_height;
- int tile_map_pixels;
- // display settings
- int tile_update_rate;
- int tile_key_repeat_delay;
- int tile_tooltip_ms;
- tag_pref tile_tag_pref;
- tile_display_type tile_display;
-#endif
-
- typedef std::map<std::string, std::string> opt_map;
- opt_map named_options; // All options not caught above are
- // recorded here.
-
- ///////////////////////////////////////////////////////////////////////
- // These options cannot be directly set by the user. Instead they're
- // set indirectly to the choices the user made for the last character
- // created. XXX: Isn't there a better place for these?
- std::string prev_name;
- char prev_race;
- char prev_cls;
- int prev_ck, prev_dk;
- god_type prev_pr;
- int prev_weapon;
- int prev_book;
- int prev_wand;
- bool prev_randpick;
-
- ///////////////////////////////////////////////////////////////////////
- // tutorial
- FixedVector<bool, 85> tutorial_events;
- bool tut_explored;
- bool tut_stashes;
- bool tut_travel;
- unsigned int tut_spell_counter;
- unsigned int tut_throw_counter;
- unsigned int tut_berserk_counter;
- unsigned int tut_melee_counter;
- unsigned int tut_last_healed;
- unsigned int tut_seen_invisible;
-
- bool tut_just_triggered;
- unsigned int tutorial_type;
- unsigned int tutorial_left;
-
-private:
- typedef std::map<std::string, std::string> string_map;
- string_map aliases;
- string_map variables;
- std::set<std::string> constants; // Variables that can't be changed
- std::set<std::string> included; // Files we've included already.
-
-public:
- // Convenience accessors for the second-class options in named_options.
- int o_int(const char *name, int def = 0) const;
- long o_long(const char *name, long def = 0L) const;
- bool o_bool(const char *name, bool def = false) const;
- std::string o_str(const char *name, const char *def = NULL) const;
- int o_colour(const char *name, int def = LIGHTGREY) const;
-
- // Fix option values if necessary, specifically file paths.
- void fixup_options();
-
-private:
- std::string unalias(const std::string &key) const;
- std::string expand_vars(const std::string &field) const;
- void add_alias(const std::string &alias, const std::string &name);
-
- void clear_feature_overrides();
- void clear_cset_overrides();
- void add_cset_override(char_set_type set, const std::string &overrides);
- void add_cset_override(char_set_type set, dungeon_char_type dc,
- unsigned symbol);
- void add_feature_override(const std::string &);
-
- void add_message_colour_mappings(const std::string &);
- void add_message_colour_mapping(const std::string &);
- message_filter parse_message_filter(const std::string &s);
-
- void set_default_activity_interrupts();
- void clear_activity_interrupts(FixedVector<bool, NUM_AINTERRUPTS> &eints);
- void set_activity_interrupt(
- FixedVector<bool, NUM_AINTERRUPTS> &eints,
- const std::string &interrupt);
- void set_activity_interrupt(const std::string &activity_name,
- const std::string &interrupt_names,
- bool append_interrupts,
- bool remove_interrupts);
- void set_fire_order(const std::string &full, bool add);
- void add_fire_order_slot(const std::string &s);
- void set_menu_sort(std::string field);
- void new_dump_fields(const std::string &text, bool add = true);
- void do_kill_map(const std::string &from, const std::string &to);
- int read_explore_stop_conditions(const std::string &) const;
-
- void split_parse(const std::string &s, const std::string &separator,
- void (game_options::*add)(const std::string &));
- void add_mon_glyph_override(monster_type mtype, mon_display &mdisp);
- void add_mon_glyph_overrides(const std::string &mons, mon_display &mdisp);
- void add_mon_glyph_override(const std::string &);
- mon_display parse_mon_glyph(const std::string &s) const;
- void set_option_fragment(const std::string &s);
-
- static const std::string interrupt_prefix;
-};
-
-extern game_options Options;
-
#include "msvc.h"
#endif // EXTERNS_H
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index e0bba5daf3..e15100a12e 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -18,6 +18,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "beam.h"
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index a4e2588b75..4dbcefceb9 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -64,6 +64,7 @@
#include "mtransit.h"
#include "newgame.h"
#include "notes.h"
+#include "options.h"
#include "output.h"
#include "overmap.h"
#include "place.h"
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 4560d9fc23..588fa57441 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -19,6 +19,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "cio.h"
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index 7432ec5f72..84c527dd7b 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -23,6 +23,7 @@
#include "monstuff.h"
#include "mon-util.h"
#include "mutation.h"
+#include "options.h"
#include "random.h"
#include "religion.h"
#include "shopping.h"
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 88bfe3b760..fa4c4c4b4a 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -46,6 +46,7 @@
#include "mon-util.h"
#include "newgame.h"
#include "jobs.h"
+#include "options.h"
#include "ouch.h"
#include "place.h"
#include "player.h"
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 34a9b0fc3a..63416e0fc6 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -7,6 +7,7 @@
#include "AppHdr.h"
#include "initfile.h"
+#include "options.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 4579ad699f..8c685327a7 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -19,6 +19,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "clua.h"
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 5f3cd14ac3..52ef8bbba3 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -14,6 +14,7 @@
#include <stdio.h>
#include "externs.h"
+#include "options.h"
#include "abl-show.h"
#include "artefact.h"
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index a76a45e6ba..008baf629b 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -19,6 +19,7 @@
#include "clua.h"
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "colour.h"
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 2bcb48b407..34245418e8 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -20,6 +20,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "arena.h"
#include "artefact.h"
diff --git a/crawl-ref/source/jobs.cc b/crawl-ref/source/jobs.cc
index 5daaaada78..9d037ea3bd 100644
--- a/crawl-ref/source/jobs.cc
+++ b/crawl-ref/source/jobs.cc
@@ -2,6 +2,8 @@
#include "jobs.h"
+#include "options.h"
+
// Listed in two columns to match the selection screen output.
// Take care to list all valid classes here, or they cannot be directly chosen.
// The old and new lists are expected to have the same length.
diff --git a/crawl-ref/source/kills.cc b/crawl-ref/source/kills.cc
index 0b47e49ae4..07a7d127e4 100644
--- a/crawl-ref/source/kills.cc
+++ b/crawl-ref/source/kills.cc
@@ -18,6 +18,7 @@
#include "tags.h"
#include "kills.h"
#include "clua.h"
+#include "options.h"
#define KILLS_MAJOR_VERSION 4
#define KILLS_MINOR_VERSION 1
diff --git a/crawl-ref/source/l_crawl.cc b/crawl-ref/source/l_crawl.cc
index a1682c59b3..7496a2f1c6 100644
--- a/crawl-ref/source/l_crawl.cc
+++ b/crawl-ref/source/l_crawl.cc
@@ -19,6 +19,7 @@
#include "macro.h"
#include "message.h"
#include "notes.h"
+#include "options.h"
#include "player.h"
#include "random.h"
#include "stuff.h"
diff --git a/crawl-ref/source/l_option.cc b/crawl-ref/source/l_option.cc
index 610f5ebe4c..a5e177eafa 100644
--- a/crawl-ref/source/l_option.cc
+++ b/crawl-ref/source/l_option.cc
@@ -3,6 +3,8 @@
#include "clua.h"
#include "l_libs.h"
+#include "options.h"
+
////////////////////////////////////////////////////////////////
// Option handling
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 95d5ce0b91..84597617fb 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -30,6 +30,7 @@
#include "delay.h"
#include "enum.h"
#include "externs.h"
+#include "options.h"
#include "files.h"
#include "state.h"
#include "stuff.h"
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index d52814bd80..427e1ca4ce 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -39,6 +39,7 @@
#include "cio.h"
#include "externs.h"
+#include "options.h"
#include "message.h"
#include "state.h"
#include "stuff.h"
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 0becd114a3..3c58ff34e5 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -10,6 +10,7 @@
#include "enum.h"
#include "externs.h"
+#include "options.h"
#include "makeitem.h"
#include "artefact.h"
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index b5dd4e3146..30647206a7 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -12,6 +12,7 @@
#include "menu.h"
#include "macro.h"
#include "message.h"
+#include "options.h"
#include "player.h"
#include "tutorial.h"
#include "view.h"
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index c336b5e24e..5ee5792081 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -18,6 +18,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "cio.h"
#include "colour.h"
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 49b1baeaf7..94566c96e4 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -29,6 +29,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "misc.h"
#include "abyss.h"
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 1d85607668..761290efc8 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -8,6 +8,7 @@
#include "mon-abil.h"
#include "externs.h"
+#include "options.h"
#ifdef TARGET_OS_DOS
#include <conio.h>
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 49af0eacbe..d6ed4632a8 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -31,6 +31,7 @@
#include "monstuff.h"
#include "mutation.h"
#include "notes.h"
+#include "options.h"
#include "player.h"
#include "random.h"
#include "religion.h"
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
index 1644b57c8a..f7be683b9b 100644
--- a/crawl-ref/source/mon-behv.cc
+++ b/crawl-ref/source/mon-behv.cc
@@ -8,6 +8,7 @@
#include "mon-behv.h"
#include "externs.h"
+#include "options.h"
#include "coord.h"
#include "coordit.h"
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index eda429d0f8..8391d64c2e 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -13,6 +13,7 @@
#include "misc.h"
#include "mon-util.h"
#include "monster.h"
+#include "options.h"
#include "religion.h"
#include "view.h"
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index a389cd6c16..d87a74fed9 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -24,6 +24,7 @@
#include "mon-behv.h"
#include "monplace.h"
#include "monstuff.h"
+#include "options.h"
#include "random.h"
#include "religion.h"
#include "spl-util.h"
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 4bee6dcc8f..4e520decf3 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -14,6 +14,7 @@
#include "branch.h"
#include "directn.h" // for the Compass
#include "externs.h"
+#include "options.h"
#include "ghost.h"
#include "lev-pand.h"
#include "los.h"
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 0503db420d..e7f5ff2c9e 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -32,6 +32,7 @@
#include "monplace.h"
#include "monspeak.h"
#include "notes.h"
+#include "options.h"
#include "player.h"
#include "random.h"
#include "religion.h"
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index dce229b194..40d90203cd 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -22,6 +22,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "abl-show.h"
#include "cio.h"
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index fc71df9283..7920b6ddda 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -31,6 +31,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "species.h"
#include "abl-show.h"
diff --git a/crawl-ref/source/ng-input.cc b/crawl-ref/source/ng-input.cc
index 43e4b46e7f..4453ffe1e7 100644
--- a/crawl-ref/source/ng-input.cc
+++ b/crawl-ref/source/ng-input.cc
@@ -6,6 +6,7 @@
#include "cio.h"
#include "files.h"
#include "menu.h"
+#include "options.h"
#include "stuff.h"
extern std::string init_file_error; // defined in acr.cc
diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc
index 6de85e0ff4..dd3db2b2c8 100644
--- a/crawl-ref/source/notes.cc
+++ b/crawl-ref/source/notes.cc
@@ -19,6 +19,7 @@
#include "kills.h"
#include "hiscores.h"
#include "mutation.h"
+#include "options.h"
#include "place.h"
#include "religion.h"
#include "skills2.h"
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
new file mode 100644
index 0000000000..612a45816a
--- /dev/null
+++ b/crawl-ref/source/options.h
@@ -0,0 +1,473 @@
+#ifndef OPTIONS_H
+#define OPTIONS_H
+
+#include "feature.h"
+
+class InitLineInput;
+struct game_options
+{
+public:
+ game_options();
+ void reset_startup_options();
+ void reset_options();
+
+ void read_option_line(const std::string &s, bool runscripts = false);
+ void read_options(InitLineInput &, bool runscripts,
+ bool clear_aliases = true);
+
+ void include(const std::string &file, bool resolve, bool runscript);
+ void report_error(const std::string &error);
+
+ std::string resolve_include(const std::string &file,
+ const char *type = "");
+
+ bool was_included(const std::string &file) const;
+
+ static std::string resolve_include(
+ std::string including_file,
+ std::string included_file,
+ const std::vector<std::string> *rcdirs = NULL)
+ throw (std::string);
+
+public:
+ std::string filename; // The name of the file containing options.
+ std::string basefilename; // Base (pathless) file name
+ int line_num; // Current line number being processed.
+
+ // View options
+ std::vector<feature_override> feature_overrides;
+ std::vector<mon_display> mon_glyph_overrides;
+ unsigned cset_override[NUM_CSET][NUM_DCHAR_TYPES];
+
+ std::string save_dir; // Directory where saves and bones go.
+ std::string macro_dir; // Directory containing macro.txt
+ std::string morgue_dir; // Directory where character dumps and morgue
+ // dumps are saved. Overrides crawl_dir.
+ std::vector<std::string> additional_macro_files;
+
+ std::string player_name;
+
+#ifdef DGL_SIMPLE_MESSAGING
+ bool messaging; // Check for messages.
+#endif
+
+ bool suppress_startup_errors;
+
+ bool mouse_input;
+
+ int view_max_width;
+ int view_max_height;
+ int mlist_min_height;
+ int msg_max_height;
+ bool mlist_allow_alternate_layout;
+ int mlist_targetting; // not actually a real option
+ bool classic_hud;
+ bool msg_condense_repeats;
+
+ // The view lock variables force centering the viewport around the PC @
+ // at all times (the default). If view locking is not enabled, the viewport
+ // scrolls only when the PC hits the edge of it.
+ bool view_lock_x;
+ bool view_lock_y;
+
+ // For an unlocked viewport, this will center the viewport when scrolling.
+ bool center_on_scroll;
+
+ // If symmetric_scroll is set, for diagonal moves, if the view
+ // scrolls at all, it'll scroll diagonally.
+ bool symmetric_scroll;
+
+ // How far from the viewport edge is scrolling forced.
+ int scroll_margin_x;
+ int scroll_margin_y;
+
+ bool verbose_monster_pane;
+
+ int autopickup_on;
+ int default_friendly_pickup;
+ bool show_more_prompt;
+
+ bool show_gold_turns; // Show gold and turns in HUD.
+ bool show_beam; // Show targetting beam by default.
+
+ long autopickups; // items to autopickup
+ bool show_inventory_weights; // show weights in inventory listings
+ bool colour_map; // add colour to the map
+ bool clean_map; // remove unseen clouds/monsters
+ bool show_uncursed; // label known uncursed items as "uncursed"
+ bool easy_open; // open doors with movement
+ bool easy_unequip; // allow auto-removing of armour / jewellery
+ bool equip_unequip; // Make 'W' = 'T', and 'P' = 'R'.
+ bool easy_butcher; // autoswap to butchering tool
+ bool always_confirm_butcher; // even if only one corpse
+ bool chunks_autopickup; // Autopickup chunks after butchering
+ bool prompt_for_swap; // Prompt to switch back from butchering
+ // tool if hostile monsters are around.
+ bool list_rotten; // list slots for rotting corpses/chunks
+ bool prefer_safe_chunks; // prefer clean chunks to contaminated ones
+ bool easy_eat_chunks; // make 'e' auto-eat the oldest safe chunk
+ bool easy_eat_gourmand; // with easy_eat_chunks, and wearing a
+ // "OfGourmand, auto-eat contaminated
+ // chunks if no safe ones are present
+ bool easy_eat_contaminated; // like easy_eat_gourmand, but
+ // always active.
+ bool default_target; // start targetting on a real target
+ bool autopickup_no_burden; // don't autopickup if it changes burden
+
+ bool note_all_skill_levels; // take note for all skill levels (1-27)
+ bool note_skill_max; // take note when skills reach new max
+ bool note_all_spells; // take note when learning any spell
+ std::string user_note_prefix; // Prefix for user notes
+ int note_hp_percent; // percentage hp for notetaking
+ bool note_xom_effects; // take note of all Xom effects
+ int ood_interesting; // how many levels OOD is noteworthy?
+ int rare_interesting; // what monster rarity is noteworthy?
+ confirm_level_type easy_confirm; // make yesno() confirming easier
+ bool easy_quit_item_prompts; // make item prompts quitable on space
+ confirm_prompt_type allow_self_target; // yes, no, prompt
+
+ int colour[16]; // macro fg colours to other colours
+ int background; // select default background colour
+ int channels[NUM_MESSAGE_CHANNELS]; // msg channel colouring
+ int target_range; // for whether targetting is out of range
+
+ bool use_old_selection_order; // use old order of species/classes in
+ // selection screen
+ int weapon; // auto-choose weapon for character
+ int book; // auto-choose book for character
+ int wand; // auto-choose wand for character
+ int chaos_knight; // choice of god for Chaos Knights (Xom/Makleb)
+ int death_knight; // choice of god/necromancy for Death Knights
+ god_type priest; // choice of god for priests (Zin/Yred)
+ bool random_pick; // randomly generate character
+ bool good_random; // when chosing randomly only choose
+ // unrestricted combinations
+ int hp_warning; // percentage hp for danger warning
+ int magic_point_warning; // percentage mp for danger warning
+ char race; // preselected race
+ char cls; // preselected class
+ bool delay_message_clear; // avoid clearing messages each turn
+ unsigned friend_brand; // Attribute for branding friendly monsters
+ unsigned neutral_brand; // Attribute for branding neutral monsters
+ bool no_dark_brand; // Attribute for branding friendly monsters
+ bool macro_meta_entry; // Allow user to use numeric sequences when
+ // creating macros
+
+ int fire_items_start; // index of first item for fire command
+ std::vector<unsigned> fire_order; // missile search order for 'f' command
+
+ bool auto_list; // automatically jump to appropriate item lists
+
+ bool flush_input[NUM_FLUSH_REASONS]; // when to flush input buff
+
+ char_set_type char_set;
+ FixedVector<unsigned, NUM_DCHAR_TYPES> char_table;
+
+ int num_colours; // used for setting up curses colour table (8 or 16)
+
+ std::string pizza;
+
+#ifdef WIZARD
+ int wiz_mode; // yes, no, never in wiz mode to start
+#endif
+
+ // internal use only:
+ int sc_entries; // # of score entries
+ int sc_format; // Format for score entries
+
+ std::vector<std::pair<int, int> > hp_colour;
+ std::vector<std::pair<int, int> > mp_colour;
+ std::vector<std::pair<int, int> > stat_colour;
+
+ std::string map_file_name; // name of mapping file to use
+ std::vector<std::pair<text_pattern, bool> > force_autopickup;
+ std::vector<text_pattern> note_monsters; // Interesting monsters
+ std::vector<text_pattern> note_messages; // Interesting messages
+ std::vector<std::pair<text_pattern, std::string> > autoinscriptions;
+ std::vector<text_pattern> note_items; // Objects to note
+ std::vector<int> note_skill_levels; // Skill levels to note
+
+ bool autoinscribe_artefacts; // Auto-inscribe identified artefacts.
+
+ bool pickup_thrown; // Pickup thrown missiles
+ bool pickup_dropped; // Pickup dropped objects
+ int travel_delay; // How long to pause between travel moves
+ int explore_delay; // How long to pause between explore moves
+
+ int arena_delay;
+ bool arena_dump_msgs;
+ bool arena_dump_msgs_all;
+ bool arena_list_eq;
+ bool arena_force_ai;
+
+ // Messages that stop travel
+ std::vector<message_filter> travel_stop_message;
+ std::vector<message_filter> force_more_message;
+
+ int stash_tracking; // How stashes are tracked
+
+ int tc_reachable; // Colour for squares that are reachable
+ int tc_excluded; // Colour for excluded squares.
+ int tc_exclude_circle; // Colour for squares in the exclusion radius
+ int tc_dangerous; // Colour for trapped squares, deep water, lava.
+ int tc_disconnected;// Areas that are completely disconnected.
+ std::vector<text_pattern> auto_exclude; // Automatically set an exclusion
+ // around certain monsters.
+
+ int travel_stair_cost;
+
+ bool show_waypoints;
+
+ bool classic_item_colours; // Use old-style item colours
+ bool item_colour; // Colour items on level map
+
+ unsigned evil_colour; // Colour for things player's god dissapproves
+
+ unsigned detected_monster_colour; // Colour of detected monsters
+ unsigned detected_item_colour; // Colour of detected items
+ unsigned status_caption_colour; // Colour of captions in HUD.
+
+ unsigned heap_brand; // Highlight heaps of items
+ unsigned stab_brand; // Highlight monsters that are stabbable
+ unsigned may_stab_brand; // Highlight potential stab candidates
+ unsigned feature_item_brand; // Highlight features covered by items.
+ unsigned trap_item_brand; // Highlight traps covered by items.
+
+ bool trap_prompt; // Prompt when stepping on mechnical traps
+ // without enough hp (using trapwalk.lua)
+
+ // What is the minimum number of items in a stack for which
+ // you show summary (one-line) information
+ int item_stack_summary_minimum;
+
+ int explore_stop; // Stop exploring if a previously unseen
+ // item comes into view
+
+ int explore_stop_prompt;
+
+ bool explore_greedy; // Explore goes after items as well.
+
+ // How much more eager greedy-explore is for items than to explore.
+ int explore_item_greed;
+
+ // Some experimental improvements to explore
+ bool explore_improved;
+
+ std::vector<sound_mapping> sound_mappings;
+ std::vector<colour_mapping> menu_colour_mappings;
+ std::vector<message_colour_mapping> message_colour_mappings;
+
+ bool menu_colour_prefix_class; // Prefix item class to string
+ bool menu_colour_shops; // Use menu colours in shops?
+
+ std::vector<menu_sort_condition> sort_menus;
+
+ int dump_kill_places; // How to dump place information for kills.
+ int dump_message_count; // How many old messages to dump
+
+ int dump_item_origins; // Show where items came from?
+ int dump_item_origin_price;
+ bool dump_book_spells;
+
+ // Order of sections in the character dump.
+ std::vector<std::string> dump_order;
+
+ bool level_map_title; // Show title in level map
+ bool target_zero_exp; // If true, targetting targets zero-exp
+ // monsters.
+ bool target_wrap; // Wrap around from last to first target
+ bool target_oos; // 'x' look around can target out-of-LOS
+ bool target_los_first; // 'x' look around first goes to visible
+ // objects/features, then goes to stuff
+ // outside LOS.
+ bool target_unshifted_dirs; // Unshifted keys target if cursor is
+ // on player.
+
+ int drop_mode; // Controls whether single or multidrop
+ // is the default.
+ int pickup_mode; // -1 for single, 0 for menu,
+ // X for 'if at least X items present'
+
+ bool easy_exit_menu; // Menus are easier to get out of
+
+ int assign_item_slot; // How free slots are assigned
+
+ std::vector<text_pattern> drop_filter;
+
+ FixedArray<bool, NUM_DELAYS, NUM_AINTERRUPTS> activity_interrupts;
+
+ // Previous startup options
+ bool remember_name; // Remember and reprompt with last name
+
+ bool dos_use_background_intensity;
+
+ bool use_fake_cursor; // Draw a fake cursor instead of relying
+ // on the term's own cursor.
+
+ int level_map_cursor_step; // The cursor increment in the level
+ // map.
+
+ // If the player prefers to merge kill records, this option can do that.
+ int kill_map[KC_NCATEGORIES];
+
+ bool rest_wait_both; // Stop resting only when both HP and MP are
+ // fully restored.
+
+#ifdef WIZARD
+ // Parameters for fight simulations.
+ long fsim_rounds;
+ int fsim_str, fsim_int, fsim_dex;
+ int fsim_xl;
+ std::string fsim_mons;
+ std::vector<std::string> fsim_kit;
+#endif // WIZARD
+
+#ifdef USE_TILE
+ char tile_show_items[20]; // show which item types in tile inventory
+ bool tile_title_screen; // display title screen?
+ bool tile_menu_icons; // display icons in menus?
+ // minimap colours
+ char tile_player_col;
+ char tile_monster_col;
+ char tile_neutral_col;
+ char tile_friendly_col;
+ char tile_plant_col;
+ char tile_item_col;
+ char tile_unseen_col;
+ char tile_floor_col;
+ char tile_wall_col;
+ char tile_mapped_wall_col;
+ char tile_door_col;
+ char tile_downstairs_col;
+ char tile_upstairs_col;
+ char tile_feature_col;
+ char tile_trap_col;
+ char tile_water_col;
+ char tile_lava_col;
+ char tile_excluded_col;
+ char tile_excl_centre_col;
+ char tile_window_col;
+ // font settings
+ std::string tile_font_crt_file;
+ int tile_font_crt_size;
+ std::string tile_font_msg_file;
+ int tile_font_msg_size;
+ std::string tile_font_stat_file;
+ int tile_font_stat_size;
+ std::string tile_font_lbl_file;
+ int tile_font_lbl_size;
+ std::string tile_font_tip_file;
+ int tile_font_tip_size;
+ // window settings
+ screen_mode tile_full_screen;
+ int tile_window_width;
+ int tile_window_height;
+ int tile_map_pixels;
+ // display settings
+ int tile_update_rate;
+ int tile_key_repeat_delay;
+ int tile_tooltip_ms;
+ tag_pref tile_tag_pref;
+ tile_display_type tile_display;
+#endif
+
+ typedef std::map<std::string, std::string> opt_map;
+ opt_map named_options; // All options not caught above are
+ // recorded here.
+
+ ///////////////////////////////////////////////////////////////////////
+ // These options cannot be directly set by the user. Instead they're
+ // set indirectly to the choices the user made for the last character
+ // created. XXX: Isn't there a better place for these?
+ std::string prev_name;
+ char prev_race;
+ char prev_cls;
+ int prev_ck, prev_dk;
+ god_type prev_pr;
+ int prev_weapon;
+ int prev_book;
+ int prev_wand;
+ bool prev_randpick;
+
+ ///////////////////////////////////////////////////////////////////////
+ // tutorial
+ FixedVector<bool, 85> tutorial_events;
+ bool tut_explored;
+ bool tut_stashes;
+ bool tut_travel;
+ unsigned int tut_spell_counter;
+ unsigned int tut_throw_counter;
+ unsigned int tut_berserk_counter;
+ unsigned int tut_melee_counter;
+ unsigned int tut_last_healed;
+ unsigned int tut_seen_invisible;
+
+ bool tut_just_triggered;
+ unsigned int tutorial_type;
+ unsigned int tutorial_left;
+
+private:
+ typedef std::map<std::string, std::string> string_map;
+ string_map aliases;
+ string_map variables;
+ std::set<std::string> constants; // Variables that can't be changed
+ std::set<std::string> included; // Files we've included already.
+
+public:
+ // Convenience accessors for the second-class options in named_options.
+ int o_int(const char *name, int def = 0) const;
+ long o_long(const char *name, long def = 0L) const;
+ bool o_bool(const char *name, bool def = false) const;
+ std::string o_str(const char *name, const char *def = NULL) const;
+ int o_colour(const char *name, int def = LIGHTGREY) const;
+
+ // Fix option values if necessary, specifically file paths.
+ void fixup_options();
+
+private:
+ std::string unalias(const std::string &key) const;
+ std::string expand_vars(const std::string &field) const;
+ void add_alias(const std::string &alias, const std::string &name);
+
+ void clear_feature_overrides();
+ void clear_cset_overrides();
+ void add_cset_override(char_set_type set, const std::string &overrides);
+ void add_cset_override(char_set_type set, dungeon_char_type dc,
+ unsigned symbol);
+ void add_feature_override(const std::string &);
+
+ void add_message_colour_mappings(const std::string &);
+ void add_message_colour_mapping(const std::string &);
+ message_filter parse_message_filter(const std::string &s);
+
+ void set_default_activity_interrupts();
+ void clear_activity_interrupts(FixedVector<bool, NUM_AINTERRUPTS> &eints);
+ void set_activity_interrupt(
+ FixedVector<bool, NUM_AINTERRUPTS> &eints,
+ const std::string &interrupt);
+ void set_activity_interrupt(const std::string &activity_name,
+ const std::string &interrupt_names,
+ bool append_interrupts,
+ bool remove_interrupts);
+ void set_fire_order(const std::string &full, bool add);
+ void add_fire_order_slot(const std::string &s);
+ void set_menu_sort(std::string field);
+ void new_dump_fields(const std::string &text, bool add = true);
+ void do_kill_map(const std::string &from, const std::string &to);
+ int read_explore_stop_conditions(const std::string &) const;
+
+ void split_parse(const std::string &s, const std::string &separator,
+ void (game_options::*add)(const std::string &));
+ void add_mon_glyph_override(monster_type mtype, mon_display &mdisp);
+ void add_mon_glyph_overrides(const std::string &mons, mon_display &mdisp);
+ void add_mon_glyph_override(const std::string &);
+ mon_display parse_mon_glyph(const std::string &s) const;
+ void set_option_fragment(const std::string &s);
+
+ static const std::string interrupt_prefix;
+};
+
+extern game_options Options;
+
+#endif
+
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index e5ae609ed7..604c2b971a 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -32,6 +32,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "beam.h"
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 179abf506c..276e14edd6 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -16,6 +16,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "species.h"
#include "abl-show.h"
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 36eac16777..0ec66b2678 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -46,6 +46,7 @@
#include "monstuff.h"
#include "mutation.h"
#include "notes.h"
+#include "options.h"
#include "ouch.h"
#include "output.h"
#include "quiver.h"
diff --git a/crawl-ref/source/quiver.cc b/crawl-ref/source/quiver.cc
index 6c14b7c5bc..8d772647e9 100644
--- a/crawl-ref/source/quiver.cc
+++ b/crawl-ref/source/quiver.cc
@@ -15,6 +15,7 @@
#include "item_use.h"
#include "itemprop.h"
#include "items.h"
+#include "options.h"
#include "stuff.h"
#include "tags.h"
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index c117a22f26..7ac3e27811 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -20,6 +20,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "abl-show.h"
#include "artefact.h"
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index bc20b7efad..389fbe375c 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -18,6 +18,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "artefact.h"
#include "cio.h"
#include "describe.h"
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index 30f0c2dbc6..213dcf20c2 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -24,6 +24,7 @@
#include "cio.h"
#include "describe.h"
#include "externs.h"
+#include "options.h"
#include "fight.h"
#include "itemprop.h"
#include "menu.h"
diff --git a/crawl-ref/source/species.cc b/crawl-ref/source/species.cc
index 4481ae4669..1aae71bf48 100644
--- a/crawl-ref/source/species.cc
+++ b/crawl-ref/source/species.cc
@@ -2,6 +2,7 @@
#include "species.h"
+#include "options.h"
#include "random.h"
// March 2008: change order of species and jobs on character selection
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 0a304bc908..e56b9c763a 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -15,6 +15,7 @@
#include <iostream>
#include "externs.h"
+#include "options.h"
#include "abyss.h"
#include "artefact.h"
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 333c15ed39..468ac4cfb1 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -12,6 +12,7 @@
#include "spl-cast.h"
#include "externs.h"
+#include "options.h"
#include "beam.h"
#include "coord.h"
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index 52398ad871..22a021e0fc 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -29,6 +29,7 @@
#include "mon-util.h"
#include "monstuff.h"
#include "notes.h"
+#include "options.h"
#include "place.h"
#include "shopping.h"
#include "spl-book.h"
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index 2c994cd094..59a3061920 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -7,6 +7,7 @@
#include "AppHdr.h"
#include "externs.h"
+#include "options.h"
#include "delay.h"
#include "directn.h"
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index ed29feb547..ba3fd80765 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -46,6 +46,7 @@
#include "branch.h"
#include "delay.h"
#include "externs.h"
+#include "options.h"
#include "itemprop.h"
#include "items.h"
#include "macro.h"
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 9394bbd88c..9e43162d58 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -14,6 +14,7 @@
#include "coordit.h"
#include "directn.h"
#include "externs.h"
+#include "options.h"
#include "food.h"
#include "itemname.h"
#include "items.h"
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 18426ca0d7..4d988e4dc5 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -26,6 +26,7 @@
#include "menu.h"
#include "newgame.h"
#include "mon-util.h"
+#include "options.h"
#include "player.h"
#include "religion.h"
#include "species.h"
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 90d3ac4ef1..376f1dc620 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -12,6 +12,7 @@
#include "macro.h"
#include "message.h"
#include "mon-util.h"
+#include "options.h"
#include "player.h"
#include "spl-book.h"
#include "spl-util.h"
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 499f2561df..967ef627d5 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -32,6 +32,7 @@
#include "misc.h"
#include "mon-util.h"
#include "monstuff.h"
+#include "options.h"
#ifdef USE_TILE
#include "output.h"
#endif
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 32010e4dfa..1e037c9832 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -40,6 +40,7 @@
#include "mon-util.h"
#include "mutation.h"
#include "newgame.h"
+#include "options.h"
#include "jobs.h"
#include "player.h"
#include "random.h"
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 07a1e0eb1e..358db488bb 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -20,6 +20,7 @@
#endif
#include "externs.h"
+#include "options.h"
#include "branch.h"
#include "command.h"
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index efcf159b6f..6cc4cc214e 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -29,6 +29,7 @@
#include "monstuff.h"
#include "mutation.h"
#include "notes.h"
+#include "options.h"
#include "ouch.h"
#include "item_use.h" // for safe_to_remove_or_wear()
#include "output.h" // for the monster list