git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3286 c06c8d41-db1a-0410-9941-cceddc491573
PS2BPOBKMUTQPFSQX4MTQ3A7B6MQGLWKTRAGUZED47KCWF5DPCJAC
if (cx<hx)
textcolor(BLACK + GREEN*16);
else if (oldhp>hp && oldhx>hx && cx<oldhx && cx>=hx)
textcolor(BLACK + RED*16);
if (cx < disp)
textcolor(BLACK + default_colour * 16);
else if (old_val > val && old_disp > disp && cx < old_disp && cx >= val)
textcolor(BLACK + change_colour * 16);
oldhp=hp;
oldhx=hx;
return disp;
}
void draw_mp_bar(int val, int max_val)
{
const int ox = 20;
const int oy = 4;
const unsigned short default_colour = BLUE;
const unsigned short change = LIGHTBLUE;
const unsigned short empty = DARKGRAY;
static int old_val = 0;
static int old_disp = 0;
old_disp = draw_colour_bar(val, max_val, old_val, old_disp, ox, oy,
default_colour, change, empty);
old_val = val;
}
void draw_hp_bar(int val, int max_val)
{
const int ox = 20;
const int oy = 3;
const unsigned short default_colour = GREEN;
const unsigned short change = RED;
const unsigned short empty = DARKGRAY;
static int old_val = 0;
static int old_disp = 0;
old_disp = draw_colour_bar(val, max_val, old_val, old_disp, ox, oy,
default_colour, change, empty);
old_val = val;