summaryrefslogtreecommitdiffstats
path: root/crawl-ref
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
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')
-rw-r--r--crawl-ref/docs/options_guide.txt8
-rw-r--r--crawl-ref/init.txt2
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/initfile.cc6
-rw-r--r--crawl-ref/source/items.cc14
-rw-r--r--crawl-ref/source/output.cc16
6 files changed, 29 insertions, 19 deletions
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index 70d0b752f6..fa8807ee6c 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -59,7 +59,7 @@ The contents of this text are:
4-j Message and Display Improvements.
hp_warning, mp_warning, hp_colour, mp_colour,
status_caption_colour, delay_message_clear,
- message_colour, show_inventory_weights, show_turns,
+ message_colour, show_inventory_weights, show_gold_turns,
show_beam, item_stack_summary_minimum, list_rotten,
menu_colour, menu_colour_prefix_id,
menu_colour_prefix_class
@@ -1039,9 +1039,9 @@ show_inventory_weights = false
When this is set to true, inventory listings will mention the
weight of each item.
-show_turns = false
- This option controls whether the turn counter (of turns elapsed)
- is displayed in the main view.
+show_gold_turns = false
+ If set to true, this option adds an extra line to the stat area
+ to display the current gold and turn counters.
show_beam = false
When performing actions such as throwing or zapping, you can
diff --git a/crawl-ref/init.txt b/crawl-ref/init.txt
index 5cf5e39d57..7173b183b4 100644
--- a/crawl-ref/init.txt
+++ b/crawl-ref/init.txt
@@ -209,7 +209,7 @@ trapwalk_safe_hp = dart:20,needle:15,arrow:35,bolt:45,spear:40,axe:45,blade:95
# status_caption_colour = yellow
# delay_message_clear = true
# show_inventory_weights = true
-# show_turns = true
+# show_gold_turns = true
# show_beam = true
# item_stack_summary_minimum = 5
# list_rotten = false
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 21cc715d54..6ebfaff787 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1580,7 +1580,7 @@ public:
bool autoprayer_on;
bool show_more_prompt;
- bool show_turns; // Show turns used in HUD.
+ bool show_gold_turns; // Show gold and turns in HUD.
bool show_beam; // Show targeting beam by default.
long autopickups; // items to autopickup
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index c5695b7577..8ce4243eca 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -629,8 +629,8 @@ void game_options::reset_options()
autoprayer_on = false;
show_more_prompt = true;
- show_turns = false;
- show_beam = false;
+ show_gold_turns = false;
+ show_beam = false;
use_old_selection_order = false;
prev_race = 0;
@@ -1973,7 +1973,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
save_dir = field;
}
#endif
- else BOOL_OPTION(show_turns);
+ else BOOL_OPTION(show_gold_turns);
else BOOL_OPTION(show_beam);
#ifndef SAVE_DIR_PATH
else if (key == "morgue_dir")
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 6cc75ce3bd..541b339301 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1475,9 +1475,17 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
if (!quiet)
{
- mprf("You pick up %d gold piece%s, bringing you to a "
- "total of %d gold pieces.",
- quant_got, (quant_got > 1) ? "s" : "", you.gold );
+ if (quant_got == you.gold)
+ {
+ mprf("You pick up %d gold piece%s.",
+ quant_got, (quant_got > 1) ? "s" : "");
+ }
+ else
+ {
+ mprf("You pick up %d gold piece%s, bringing you to a "
+ "total of %d gold pieces.",
+ quant_got, (quant_got > 1) ? "s" : "", you.gold );
+ }
}
you.turn_is_over = true;
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:");