From c74a157f8f99fa7fffa2547c92a76d8cb7eecdb5 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 18 Mar 2007 14:57:33 +0000 Subject: Changes to the overview screen (%) - added abilities and made it scrollable. Also, some more clean-up of tutorial.cc. As this involved a lot of spacing changes it was easier to just replace the file as a whole. Sorry about that. There are still some differences between the Linux and Windows versions that I don't really understand but using get_number_of_cols helps a lot. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1055 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'crawl-ref/source/abl-show.cc') diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index ba15074f49..5f6e065112 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -294,6 +294,27 @@ const char * get_ability_name_by_index( char index ) return (abil.name); } +std::string print_abilities() +{ + std::string text = "\na: "; + + bool have_any = false; + if (generate_abilities()) + { + for (int i = 0; i < 52; ++i) + if (Curr_abil[i].which != ABIL_NON_ABILITY) + { + if (have_any) + text += ", "; + text += get_ability_name_by_index(i); + have_any = true; + } + } + if (!have_any) + text += "no special abilities"; + + return text; +} const std::string make_cost_description( const struct ability_def &abil ) /***********************************************************************/ -- cgit v1.2.3-54-g00ecf