From 7497ddf538959d8a70c4f18d5c3dc553548cbcff Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 11 May 2007 15:31:02 +0000 Subject: Merged trunk (1457:1460] to 0.2 (targeting prompt changes). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.2@1461 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/direct.cc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index 133a59e4b5..84d2010f3c 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -259,7 +259,8 @@ static const char *target_mode_help_text(int mode) switch (mode) { case DIR_NONE: - return "? - help, Shift-Dir - shoot in a straight line"; + return Options.target_unshifted_dirs? "? - help" : + "? - help, Shift-Dir - shoot in a straight line"; case DIR_TARGET: return "? - help, Dir - move target cursor"; default: @@ -333,14 +334,18 @@ void direction(struct dist& moves, targeting_type restricts, } } - // Prompts might get scrolled off if you have too few lines available. - // We'll live with that. - if ( !just_looking ) - mprf(MSGCH_PROMPT, "%s (%s)", prompt? prompt : "Aim", - target_mode_help_text(restricts)); - + bool show_prompt = true; while (1) { + // Prompts might get scrolled off if you have too few lines available. + // We'll live with that. + if ( !just_looking && show_prompt ) + { + mprf(MSGCH_PROMPT, "%s (%s)", prompt? prompt : "Aim", + target_mode_help_text(restricts)); + show_prompt = false; + } + // Reinit...this needs to be done every loop iteration // because moves is more persistent than loop_done. moves.isValid = false; @@ -611,6 +616,7 @@ void direction(struct dist& moves, targeting_type restricts, force_redraw = true; redraw_screen(); mesclr(true); + show_prompt = true; break; default: @@ -635,8 +641,7 @@ void direction(struct dist& moves, targeting_type restricts, !yesno("Really target yourself?")) { mesclr(); - mprf(MSGCH_PROMPT, "%s (%s)", prompt? prompt : "Aim", - target_mode_help_text(restricts)); + show_prompt = true; } else if ( moves.isTarget && !see_grid(moves.tx, moves.ty) ) { -- cgit v1.2.3-54-g00ecf