diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-01-29 11:28:03 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-01-29 11:28:03 +0000 |
commit | 2304d9cd515a6061b14fa28885ea3e15fe0f7a59 (patch) | |
tree | fc7a709a3c639a3c93214804127a09c53ea105d2 /crawl-ref/source/direct.cc | |
parent | 77be5ae4a0b896e42f0169d880582f3842568c83 (diff) | |
download | crawl-ref-2304d9cd515a6061b14fa28885ea3e15fe0f7a59.tar.gz crawl-ref-2304d9cd515a6061b14fa28885ea3e15fe0f7a59.zip |
Moved monster descriptions in targeting from '?' to 'v'. Put targeting
help on '?'.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@903 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r-- | crawl-ref/source/direct.cc | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index 8ec14540df..32c371f375 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -30,6 +30,7 @@ #include "externs.h" +#include "command.h" #include "debug.h" #include "describe.h" #include "itemname.h" @@ -68,8 +69,6 @@ enum LOSSelect LOS_NONE = 0xFFFF }; -static const char *aim_prompt = "Aim (move cursor or -/+, change mode with CTRL-F, select with . or !)"; - static void describe_feature(int mx, int my, bool oos); static void describe_cell(int mx, int my); @@ -107,7 +106,8 @@ static command_type read_direction_key() { case ESCAPE: return CMD_TARGET_CANCEL; - case '?': return CMD_TARGET_DESCRIBE; + case 'v': return CMD_TARGET_DESCRIBE; + case '?': return CMD_TARGET_HELP; case ' ': return CMD_TARGET_CYCLE_BEAM; case ':': return CMD_TARGET_HIDE_BEAM; case '.': return CMD_TARGET_SELECT; @@ -124,8 +124,8 @@ static command_type read_direction_key() case '-': return CMD_TARGET_CYCLE_BACK; case '+': case '=': return CMD_TARGET_CYCLE_FORWARD; - case ';': return CMD_TARGET_OBJ_CYCLE_BACK; - case '/': return CMD_TARGET_OBJ_CYCLE_FORWARD; + case ';': case '/': return CMD_TARGET_OBJ_CYCLE_BACK; + case '*': return CMD_TARGET_OBJ_CYCLE_FORWARD; case 'b': return CMD_TARGET_DOWN_LEFT; case 'h': return CMD_TARGET_LEFT; @@ -282,8 +282,10 @@ void direction(struct dist& moves, targeting_type restricts, } } - // Prompts get scrolled off. Argh - another hack. XXX - mpr(aim_prompt, (skip_iter ? MSGCH_PLAIN : MSGCH_PROMPT)); + // Prompts might get scrolled off if you have too few lines available. + // We'll live with that. + if ( !just_looking ) + mpr("Aim (press '?' for help.)", MSGCH_PROMPT); while (1) { @@ -312,6 +314,7 @@ void direction(struct dist& moves, targeting_type restricts, key_command = read_direction_key(); bool need_beam_redraw = false; + bool force_redraw = false; bool loop_done = false; const int old_tx = moves.tx + (skip_iter ? 500 : 0); // hmmm...hack @@ -507,9 +510,18 @@ void direction(struct dist& moves, targeting_type restricts, break; #endif describe_monsters(menv[mid].type, mid); + force_redraw = true; + redraw_screen(); + mesclr(true); + break; + + case CMD_TARGET_HELP: + show_targeting_help(); + force_redraw = true; redraw_screen(); mesclr(true); break; + default: break; } @@ -566,6 +578,9 @@ void direction(struct dist& moves, targeting_type restricts, show_beam = show_beam && find_ray(you.x_pos, you.y_pos, moves.tx, moves.ty, true, ray); } + + if ( force_redraw ) + have_moved = true; if ( have_moved ) { |