summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-20 18:28:17 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-20 18:28:17 +0000
commit29b8231d094fc97a59736a2c5c38377a052e9d47 (patch)
treedd8f01c4a9d9070b883aef5d4e8fc4605dc977f2 /crawl-ref/source/command.cc
parentaf7df8b6667210cbfea4cba66a8106fb46d29cc6 (diff)
downloadcrawl-ref-29b8231d094fc97a59736a2c5c38377a052e9d47.tar.gz
crawl-ref-29b8231d094fc97a59736a2c5c38377a052e9d47.zip
FR 1913320: remove shock resistance from a number of (humanoid) monsters
Fix 1916532: rename db entry "simulacrum" -> "large simulacrum" Move tutorial help into the complete hotkey-triggerable help menu. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3758 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc72
1 files changed, 36 insertions, 36 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 404de4b0cc..9861fe001d 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -629,7 +629,7 @@ static void add_file_to_scroller(FILE* fp, formatted_scroller& m,
// XXX FIXME: there must be a better way to identify sections
next_is_hotkey = auto_hotkeys &&
(strstr(buf, "------------------------------------------"
- "------------------------------") == buf);
+ "------------------------------") == buf);
is_first = false;
}
}
@@ -1459,24 +1459,8 @@ void show_stash_search_help()
show_specific_help( getHelpString("stash-search.prompt") );
}
-void list_commands(bool wizard, int hotkey, bool do_redraw_screen)
+static void add_formatted_keyhelp(column_composer &cols)
{
- if (wizard)
- {
- list_wizard_commands();
-
- if (do_redraw_screen)
- redraw_screen();
-
- return;
- }
-
- // 2 columns, split at column 40.
- column_composer cols(2, 41);
-
- // Page size is number of lines - one line for --more-- prompt.
- cols.set_pagesize(get_number_of_lines() - 1);
-
cols.add_formatted(
0,
"<h>Movement:\n"
@@ -1633,24 +1617,10 @@ void list_commands(bool wizard, int hotkey, bool do_redraw_screen)
"form of targeting), <w>Ctrl-F</w> and <w>Ctrl-G</w>."
"\n",
true, true, cmdhelp_textfilter);
-
-
- show_keyhelp_menu(cols.formatted_lines(), true, false, hotkey);
-
- if (do_redraw_screen)
- {
- clrscr();
- redraw_screen();
- }
}
-void list_tutorial_help()
+static void add_formatted_tutorial_help(column_composer &cols)
{
- // 2 columns, split at column 40.
- column_composer cols(2, 41);
- // Page size is number of lines - one line for --more-- prompt.
- cols.set_pagesize(get_number_of_lines());
-
unsigned ch;
unsigned short colour;
@@ -1713,10 +1683,40 @@ void list_tutorial_help()
"and in sight, one of <w>f</w> or <w>p</w> fires at it\n"
"again (without selecting anything).\n",
true, true, cmdhelp_textfilter, 40);
-
- show_keyhelp_menu(cols.formatted_lines(), false);
}
-
+
+void list_commands(bool wizard, int hotkey, bool do_redraw_screen)
+{
+ if (wizard)
+ {
+ list_wizard_commands();
+
+ if (do_redraw_screen)
+ redraw_screen();
+
+ return;
+ }
+
+ // 2 columns, split at column 40.
+ column_composer cols(2, 41);
+
+ // Page size is number of lines - one line for --more-- prompt.
+ cols.set_pagesize(get_number_of_lines() - 1);
+
+ if (Options.tutorial_left)
+ add_formatted_tutorial_help(cols);
+ else
+ add_formatted_keyhelp(cols);
+
+ show_keyhelp_menu(cols.formatted_lines(), true, false, hotkey);
+
+ if (do_redraw_screen)
+ {
+ clrscr();
+ redraw_screen();
+ }
+}
+
static void list_wizard_commands()
{
#ifdef WIZARD