diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-08 13:53:37 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-08 13:53:37 +0000 |
commit | 3377d3cffd27809b4b5a4c2e74537836d734972b (patch) | |
tree | ad4fec067af337bca8a8928094db72c0c42664fc /crawl-ref/source/acr.cc | |
parent | 314b930ce693ec42f3486248b72deb0ebe7d3855 (diff) | |
download | crawl-ref-3377d3cffd27809b4b5a4c2e74537836d734972b.tar.gz crawl-ref-3377d3cffd27809b4b5a4c2e74537836d734972b.zip |
Flush macro input buffer when fire command fails (Erik).
Allow using the special sequence \{!more} in macros to disable -more- prompts
while processing the macro expansion.
Fixed a couple of off-by-one errors in the level-map.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1557 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 716b02ed66..b6baf494ac 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1102,6 +1102,14 @@ void process_command( command_type cmd ) start_running( RDIR_RIGHT, RMODE_START ); break; + case CMD_DISABLE_MORE: + Options.show_more_prompt = false; + break; + + case CMD_ENABLE_MORE: + Options.show_more_prompt = true; + break; + case CMD_TOGGLE_AUTOPICKUP: toggle_flag( &Options.autopickup_on, "Autopickup"); break; @@ -2528,6 +2536,8 @@ command_type keycode_to_command( keycode_type key ) { switch ( key ) { + case KEY_MACRO_DISABLE_MORE: return CMD_DISABLE_MORE; + case KEY_MACRO_ENABLE_MORE: return CMD_ENABLE_MORE; case 'b': return CMD_MOVE_DOWN_LEFT; case 'h': return CMD_MOVE_LEFT; case 'j': return CMD_MOVE_DOWN; @@ -2648,7 +2658,9 @@ keycode_type get_next_keycode() flush_input_buffer( FLUSH_BEFORE_COMMAND ); keyin = unmangle_direction_keys(getch_with_command_macros()); - mesclr(); + + if (!is_synthetic_key(keyin)) + mesclr(); return (keyin); } |