diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-18 14:57:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-18 14:57:33 +0000 |
commit | c74a157f8f99fa7fffa2547c92a76d8cb7eecdb5 (patch) | |
tree | f2cb42fae1ab3a17465e42833ffa91b5d02dbc1c /crawl-ref/source/abl-show.cc | |
parent | f35794fa75f96cf6c8d874581dde6c8bfba7941f (diff) | |
download | crawl-ref-c74a157f8f99fa7fffa2547c92a76d8cb7eecdb5.tar.gz crawl-ref-c74a157f8f99fa7fffa2547c92a76d8cb7eecdb5.zip |
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
Diffstat (limited to 'crawl-ref/source/abl-show.cc')
-rw-r--r-- | crawl-ref/source/abl-show.cc | 21 |
1 files changed, 21 insertions, 0 deletions
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 = "\n<w>a:</w> "; + + 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 ) /***********************************************************************/ |