summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-11 15:31:02 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-11 15:31:02 +0000
commit7497ddf538959d8a70c4f18d5c3dc553548cbcff (patch)
tree464849b105aaacb9db6908ab7490681ca9b674ad
parentfa2859ff4460fc2392ac5fec9b74c34850d226c5 (diff)
downloadcrawl-ref-7497ddf538959d8a70c4f18d5c3dc553548cbcff.tar.gz
crawl-ref-7497ddf538959d8a70c4f18d5c3dc553548cbcff.zip
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
-rw-r--r--crawl-ref/source/direct.cc23
1 files 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) )
{