summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-29 10:13:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-29 10:13:35 +0000
commitf945c65280cfb899a523faa5a510a897e2758ea0 (patch)
tree918b84bc6050de932360cdb63f588f13475eedf9 /crawl-ref/source/output.cc
parenta0fe746d9733dec01dc27f120042b76ed1c658f6 (diff)
downloadcrawl-ref-f945c65280cfb899a523faa5a510a897e2758ea0.tar.gz
crawl-ref-f945c65280cfb899a523faa5a510a897e2758ea0.zip
Fix 2030729: + and * not working when examining (targetting?)
Merge r6641 into branch: skip direction keys when targetting via monster list. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6713 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 1f3568775c..f33225686d 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1365,6 +1365,24 @@ void monster_pane_info::to_string( int count, std::string& desc,
desc = out.str();
}
+static char _mlist_index_to_letter(int index)
+{
+ index += 'a';
+
+ if (index >= 'b')
+ index++;
+ if (index >= 'h')
+ index++;
+ if (index >= 'j')
+ index++;
+ if (index >= 'k')
+ index++;
+ if (index >= 'l')
+ index++;
+
+ return (index);
+}
+
static void _print_next_monster_desc(const std::vector<monster_pane_info>& mons,
int& start, bool zombified = false,
int idx = -1)
@@ -1387,7 +1405,7 @@ static void _print_next_monster_desc(const std::vector<monster_pane_info>& mons,
if (idx >= 0)
{
textcolor(WHITE);
- cprintf( stringize_glyph('a' + idx).c_str() );
+ cprintf( stringize_glyph(_mlist_index_to_letter(idx)).c_str() );
cprintf(" - ");
printed += 4;
}