diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-22 18:24:51 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-22 18:26:09 +0100 |
commit | a50cfa0b55621cde461afcce79527ef3535f6c89 (patch) | |
tree | 1b540e2d3503d1710f5701cb8cddc7c7c999f646 /crawl-ref/source/output.cc | |
parent | 2734cf27fe02336b6e6f750fe74d631c3508890d (diff) | |
download | crawl-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.
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r-- | crawl-ref/source/output.cc | 14 |
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; |