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-04-19 11:19:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 11:19:35 +0000
commit811db79a78d57a056981f56879af1dcc5e3c6eea (patch)
treeb4f524f47017155c22e2899c956ea80f68b221cb /crawl-ref/source/output.cc
parentbea5c32865b925d7c2e994554cfb66853242d63a (diff)
downloadcrawl-ref-811db79a78d57a056981f56879af1dcc5e3c6eea.tar.gz
crawl-ref-811db79a78d57a056981f56879af1dcc5e3c6eea.zip
Rename show_turns to show_gold_turns, and modify the documentation
accordingly. Also, don't print that "bringing you to a total of ..." message if you previously had no gold, and change some ints to unsigned to quiet some compiler warnings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4361 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 87d35de6df..abf7887a6c 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -220,7 +220,7 @@ void update_turn_count()
{
// Don't update turn counter when running/resting/traveling to
// prevent pointless screen updates.
- if (!Options.show_turns
+ if (!Options.show_gold_turns
|| you.running > 0
|| (you.running < 0 && Options.travel_delay == -1))
{
@@ -859,9 +859,9 @@ void print_stats(void)
you.redraw_experience = false;
}
- // If Options.show_turns, line 9 is Gold and Turns
+ // If Options.show_gold_turns, line 9 is Gold and Turns
int yhack = 0;
- if (Options.show_turns)
+ if (Options.show_gold_turns)
{
yhack = 1;
cgotoxy(1+6, 9, GOTO_STAT); cprintf("%d", you.gold);
@@ -944,19 +944,21 @@ void redraw_skill(const std::string &your_name, const std::string &class_name)
{
std::string title = your_name + " the " + class_name;
- int in_len = title.length();
- const int WIDTH = crawl_view.hudsz.x;
+ unsigned int in_len = title.length();
+ const unsigned int WIDTH = crawl_view.hudsz.x;
if (in_len > WIDTH)
{
in_len -= 3; // what we're getting back from removing "the"
- const int name_len = your_name.length();
+ const unsigned int name_len = your_name.length();
std::string trimmed_name = your_name;
// squeeze name if required, the "- 8" is to not squeeze too much
if (in_len > WIDTH && (name_len - 8) > (in_len - WIDTH))
+ {
trimmed_name =
trimmed_name.substr(0, name_len - (in_len - WIDTH) - 1);
+ }
title = trimmed_name + ", " + class_name;
}
@@ -1006,7 +1008,7 @@ void draw_border(void)
cgotoxy(19, 7, GOTO_STAT); cprintf("Ev:");
// Line 8 is exp pool, Level
- if (Options.show_turns)
+ if (Options.show_gold_turns)
{
cgotoxy( 1, 9, GOTO_STAT); cprintf("Gold:");
cgotoxy(19, 9, GOTO_STAT); cprintf("Turn:");