From 6858bd1384348612321c7ec52dd6173358512516 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 3 Dec 2009 08:48:23 +0100 Subject: Reduce minimum message window height to 5. This is FR 2814313. This required adding a new option msg_min_height defaulting to 6 to keep the same default layout. I don't believe anything requires a message window of more than 5 lines (acquirement is fine with that). --- crawl-ref/source/defines.h | 2 +- crawl-ref/source/initfile.cc | 2 ++ crawl-ref/source/options.h | 1 + crawl-ref/source/viewgeom.cc | 3 +-- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 77b453c56e..70cb440334 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -120,7 +120,7 @@ const int LABYRINTH_BORDER = 4; #define VIEW_BASE_WIDTH 33 // FIXME: never used #define VIEW_MIN_WIDTH ENV_SHOW_DIAMETER #define VIEW_MIN_HEIGHT ENV_SHOW_DIAMETER -#define MSG_MIN_HEIGHT 6 +#define MSG_MIN_HEIGHT 5 // max traps per level #define MAX_TRAPS 100 diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 28803b4857..be738cfb0c 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -603,6 +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_min_height = std::max(6, MSG_MIN_HEIGHT); msg_max_height = std::max(10, MSG_MIN_HEIGHT); mlist_allow_alternate_layout = false; messages_at_top = false; @@ -2405,6 +2406,7 @@ void game_options::read_option_line(const std::string &str, bool runscript) 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_min_height, MSG_MIN_HEIGHT, 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); diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h index 2e64f1f680..b8d331c0cf 100644 --- a/crawl-ref/source/options.h +++ b/crawl-ref/source/options.h @@ -58,6 +58,7 @@ public: int view_max_width; int view_max_height; int mlist_min_height; + int msg_min_height; int msg_max_height; bool mlist_allow_alternate_layout; bool messages_at_top; diff --git a/crawl-ref/source/viewgeom.cc b/crawl-ref/source/viewgeom.cc index 784a402bcc..7eb1db1e5e 100644 --- a/crawl-ref/source/viewgeom.cc +++ b/crawl-ref/source/viewgeom.cc @@ -18,7 +18,6 @@ // define VIEW_MAX_WIDTH use Options.view_max_width #define HUD_WIDTH 42 #define HUD_HEIGHT 12 -// #define MSG_MIN_HEIGHT defined elsewhere #define MSG_MAX_HEIGHT Options.msg_max_height #define MLIST_MIN_HEIGHT Options.mlist_min_height #define MLIST_MIN_WIDTH 25 // non-inline layout only @@ -40,7 +39,7 @@ class _layout termp(1,1), termsz(termsz_), viewp(-1,-1), viewsz(VIEW_MIN_WIDTH, VIEW_MIN_HEIGHT), hudp(-1,-1), hudsz(hudsz_), - msgp(-1,-1), msgsz(0, MSG_MIN_HEIGHT), + msgp(-1,-1), msgsz(0, Options.msg_min_height), mlistp(-1,-1), mlistsz(MLIST_MIN_WIDTH, 0), hud_gutter(HUD_MIN_GUTTER), valid(false) {} -- cgit v1.2.3-54-g00ecf