From 29b8231d094fc97a59736a2c5c38377a052e9d47 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 20 Mar 2008 18:28:17 +0000 Subject: 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 --- crawl-ref/source/command.cc | 72 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'crawl-ref/source/command.cc') 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, "Movement:\n" @@ -1633,24 +1617,10 @@ void list_commands(bool wizard, int hotkey, bool do_redraw_screen) "form of targeting), Ctrl-F and Ctrl-G." "\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 f or p 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 -- cgit v1.2.3-54-g00ecf