From bc21b45fa2e431dab77fe02741769061a6fcb9e4 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 30 Dec 2006 07:00:01 +0000 Subject: [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 --- crawl-ref/source/output.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crawl-ref/source/output.cc') 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); -- cgit v1.2.3-54-g00ecf