summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-22 18:24:51 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-22 18:26:09 +0100
commita50cfa0b55621cde461afcce79527ef3535f6c89 (patch)
tree1b540e2d3503d1710f5701cb8cddc7c7c999f646
parent2734cf27fe02336b6e6f750fe74d631c3508890d (diff)
downloadcrawl-ref-a50cfa0b55621cde461afcce79527ef3535f6c89.tar.gz
crawl-ref-a50cfa0b55621cde461afcce79527ef3535f6c89.zip
Colour experience pool.
Now yellow between 10000 and 15000 and red above 15000. If required, this could be configurable, but I'd prefer not to introduce more options.
-rw-r--r--crawl-ref/source/output.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index f6383d2651..c833723649 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -846,6 +846,16 @@ static bool _need_stats_printed()
}
#endif
+static short _get_exp_pool_colour(int pool)
+{
+ if (pool < MAX_EXP_POOL/2)
+ return (HUD_VALUE_COLOUR);
+ else if (pool < MAX_EXP_POOL*3/4)
+ return (YELLOW);
+ else
+ return (RED);
+}
+
void print_stats(void)
{
textcolor(LIGHTGREY);
@@ -890,12 +900,12 @@ void print_stats(void)
textcolor(Options.status_caption_colour);
#if DEBUG_DIAGNOSTICS
cprintf("XP: ");
- textcolor(HUD_VALUE_COLOUR);
+ textcolor(_get_exp_pool_colour(you.exp_available));
cprintf("%d/%d (%d) ",
you.skill_cost_level, you.exp_available, you.experience);
#else
cprintf("Exp Pool: ");
- textcolor(HUD_VALUE_COLOUR);
+ textcolor(_get_exp_pool_colour(you.exp_available));
cprintf("%-6d", you.exp_available);
#endif
you.redraw_experience = false;