diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-17 10:53:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-17 10:53:10 +0000 |
commit | 8f24be21b7874bda7d4df564a19ea9b2ee0dc1f3 (patch) | |
tree | 00667deb9cb911062aebdfe6413d50c35843e01d /crawl-ref/source/shopping.cc | |
parent | a1c989cf73a5995231dab2ab283efa77e3a66f0a (diff) | |
download | crawl-ref-8f24be21b7874bda7d4df564a19ea9b2ee0dc1f3.tar.gz crawl-ref-8f24be21b7874bda7d4df564a19ea9b2ee0dc1f3.zip |
Merge Haran's changes into 0.1.6:
* Shopping display cleanup
* {empty} inscription removal.
* Rod fear fix.
* Allow reading scorefile from stdin with -.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.1.6@653 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r-- | crawl-ref/source/shopping.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 6f80839df1..441be694c0 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -38,6 +38,7 @@ #include "spl-book.h" #include "stash.h" #include "stuff.h" +#include "view.h" static char in_a_shop(char shoppy, id_arr id); static char more3(void); @@ -86,7 +87,8 @@ static std::string purchase_keys(const std::string &s) static void list_shop_keys(const std::string &purchasable) { char buf[200]; - gotoxy(1, 23); + const int numlines = get_number_of_lines(); + gotoxy(1, numlines - 1); std::string pkeys = purchase_keys(purchasable); if (pkeys.length()) @@ -97,14 +99,14 @@ static void list_shop_keys(const std::string &purchasable) pkeys.c_str()); formatted_string fs = formatted_string::parse_string(buf); - fs.cprintf("%*s", get_number_of_cols() - fs.length(), ""); + fs.cprintf("%*s", get_number_of_cols() - fs.length() - 1, ""); fs.display(); - gotoxy(1, 24); + gotoxy(1, numlines); fs = formatted_string::parse_string( "[<w>?</w>/<w>*</w>] Inventory " "[<w>\\</w>] Known Items"); - fs.cprintf("%*s", get_number_of_cols() - fs.length(), ""); + fs.cprintf("%*s", get_number_of_cols() - fs.length() - 1, ""); fs.display(); } |