From a50cfa0b55621cde461afcce79527ef3535f6c89 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 22 Nov 2009 18:24:51 +0100 Subject: 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. --- crawl-ref/source/output.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/output.cc') 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; -- cgit v1.2.3-54-g00ecf