summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-30 07:00:01 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-30 07:00:01 +0000
commitbc21b45fa2e431dab77fe02741769061a6fcb9e4 (patch)
treea37873913323aa264e23fea273cf560e19af13e5 /crawl-ref/source/output.cc
parent9f10a66a73b3fe9ec1e575897acc4c03d90e98fe (diff)
downloadcrawl-ref-bc21b45fa2e431dab77fe02741769061a6fcb9e4.tar.gz
crawl-ref-bc21b45fa2e431dab77fe02741769061a6fcb9e4.zip
[1624529] Added display of turns used in main play screen. Zero-based, which
may seem odd to some players, but I like it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@735 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index a742add6e2..4ab715cfa4 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -58,6 +58,23 @@ static void dur_colour( int colour, bool running_out )
}
}
+void update_turn_count()
+{
+ // Don't update turn counter when running/resting/traveling to
+ // prevent pointless screen updates.
+ if (you.running > 0 || (you.running < 0 && Options.travel_delay == -1))
+ return;
+
+ // FIXME: Create some kind of layout manager class so we can
+ // templatise the heads-up display layout and stop hardcoding
+ // these coords.
+ gotoxy(61, 10);
+ textcolor(LIGHTGREY);
+
+ // Show the turn count starting from 1. You can still quit on turn 0.
+ cprintf("%ld", you.num_turns);
+}
+
void print_stats(void)
{
textcolor(LIGHTGREY);