diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-14 11:02:13 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-14 11:02:13 +0000 |
commit | 676dc0d1108ddbf60d3f7988be0be93e808d0f9a (patch) | |
tree | 5345783873578a5a43dbdcba994b877b9b9369f9 /crawl-ref/source/initfile.cc | |
parent | b5e038ca7cc358785ad7ca0a9160bffd8a1c2df7 (diff) | |
download | crawl-ref-676dc0d1108ddbf60d3f7988be0be93e808d0f9a.tar.gz crawl-ref-676dc0d1108ddbf60d3f7988be0be93e808d0f9a.zip |
* Make the key press delay in tiles optional (and shorter, by default).
* Fix font name options being lowercased and thus not found.
* Add missing tile options to options_guide.txt.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9976 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index d11c2e974c..beac5fd849 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -895,6 +895,7 @@ void game_options::reset_options() strcpy(tile_show_items, "!?/%=([)x}+\\_."); tile_title_screen = true; tile_menu_icons = true; + // minimap colours tile_player_col = MAP_WHITE; tile_monster_col = MAP_RED; @@ -930,13 +931,15 @@ void game_options::reset_options() tile_font_lbl_size = 0; // window layout - tile_key_repeat = true; - tile_full_screen = SCREENMODE_AUTO; - tile_window_width = 0; - tile_window_height = 0; - tile_map_pixels = 0; - tile_tooltip_ms = 500; - tile_tag_pref = crawl_state.arena ? TAGPREF_NAMED : TAGPREF_ENEMY; + tile_full_screen = SCREENMODE_AUTO; + tile_window_width = 0; + tile_window_height = 0; + tile_map_pixels = 0; + tile_tag_pref = crawl_state.arena ? TAGPREF_NAMED : TAGPREF_ENEMY; + + // delays + tile_key_repeat_delay = 200; + tile_tooltip_ms = 500; #endif // map each colour to itself as default @@ -1591,18 +1594,17 @@ void game_options::fixup_options() static int _str_to_killcategory(const std::string &s) { - static const char *kc[] = { - "you", - "friend", - "other", - }; + static const char *kc[] = { + "you", + "friend", + "other", + }; + + for (unsigned i = 0; i < sizeof(kc) / sizeof(*kc); ++i) + if (s == kc[i]) + return i; - for (unsigned i = 0; i < sizeof(kc) / sizeof(*kc); ++i) - { - if (s == kc[i]) - return i; - } - return -1; + return -1; } void game_options::do_kill_map(const std::string &from, const std::string &to) @@ -2010,7 +2012,8 @@ void game_options::read_option_line(const std::string &str, bool runscript) && key != "menu_colour" && key != "menu_color" && key != "message_colour" && key != "message_color" && key != "levels" && key != "level" && key != "entries" - && key != "include" && key != "bindkey") + && key != "include" && key != "bindkey" + && key.find("font") == std::string::npos) { lowercase( field ); } @@ -3153,7 +3156,7 @@ void game_options::read_option_line(const std::string &str, bool runscript) tile_font_lbl_file = field; } else INT_OPTION(tile_font_lbl_size, 1, INT_MAX); - else BOOL_OPTION(tile_key_repeat); + else INT_OPTION(tile_key_repeat_delay, 0, INT_MAX); else if (key == "tile_full_screen") tile_full_screen = (screen_mode)_read_bool(field, tile_full_screen); else INT_OPTION(tile_window_width, 1, INT_MAX); |