diff options
-rw-r--r-- | crawl-ref/source/initfile.cc | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 23267b635f..28803b4857 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -603,7 +603,7 @@ void game_options::reset_options() view_max_width = std::max(33, VIEW_MIN_WIDTH); view_max_height = std::max(21, VIEW_MIN_HEIGHT); mlist_min_height = 5; - msg_max_height = 10; + msg_max_height = std::max(10, MSG_MIN_HEIGHT); mlist_allow_alternate_layout = false; messages_at_top = false; mlist_targetting = false; @@ -2401,27 +2401,11 @@ void game_options::read_option_line(const std::string &str, bool runscript) else BOOL_OPTION(messaging); #endif else BOOL_OPTION(mouse_input); - else if (key == "view_max_width") - { - view_max_width = atoi(field.c_str()); - if (view_max_width < VIEW_MIN_WIDTH) - view_max_width = VIEW_MIN_WIDTH; - - // Allow the view to be one larger than GXM because the view width - // needs to be odd, and GXM is even. - else if (view_max_width > GXM + 1) - view_max_width = GXM + 1; - } - else if (key == "view_max_height") - { - view_max_height = atoi(field.c_str()); - if (view_max_height < VIEW_MIN_HEIGHT) - view_max_height = VIEW_MIN_HEIGHT; - else if (view_max_height > GYM + 1) - view_max_height = GYM + 1; - } + // These need to be odd, hence allow +1. + else INT_OPTION(view_max_width, VIEW_MIN_WIDTH, GXM + 1); + else INT_OPTION(view_max_height, VIEW_MIN_HEIGHT, GYM + 1); else INT_OPTION(mlist_min_height, 0, INT_MAX); - else INT_OPTION(msg_max_height, 6, INT_MAX); + else INT_OPTION(msg_max_height, MSG_MIN_HEIGHT, INT_MAX); else BOOL_OPTION(mlist_allow_alternate_layout); else BOOL_OPTION(messages_at_top); #ifndef USE_TILE |