Make build progress bar look nicer - some guy on the forums was complaining about it.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9158 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2010-01-12 20:05:32 +00:00 committed by Git SVN Gateway
parent c9c8b1dbe4
commit 6762bad5ca
1 changed files with 2 additions and 3 deletions

View File

@ -2988,7 +2988,6 @@ static void drawStructureHealth(STRUCTURE *psStruct)
static void drawStructureBuildProgress(STRUCTURE *psStruct)
{
SDWORD scrX,scrY,scrR;
PIELIGHT powerCol = WZCOL_BLACK;
UDWORD health,width;
UDWORD scale;
@ -2998,11 +2997,11 @@ static void drawStructureBuildProgress(STRUCTURE *psStruct)
scrY = psStruct->sDisplay.screenY + (scale*10);
scrR = width;
health = PERCENT(psStruct->currentBuildPts , psStruct->pStructureType->buildPoints);
powerCol = WZCOL_YELLOW;
health = (((width*10000)/100)*health)/10000;
health*=2;
pie_BoxFill(scrX - scrR - 1, scrY - 1 + 5, scrX + scrR + 1, scrY + 3 + 5, WZCOL_RELOAD_BACKGROUND);
pie_BoxFill(scrX - scrR, scrY + 5, scrX - scrR + health, scrY + 2 + 5, powerCol);
pie_BoxFill(scrX - scrR, scrY + 5, scrX - scrR + health, scrY + 1+5, WZCOL_HEALTH_MEDIUM_SHADOW);
pie_BoxFill(scrX - scrR, scrY + 1+5, scrX - scrR + health, scrY + 2+5, WZCOL_HEALTH_MEDIUM);
}
/// Draw the health of structures and show enemy structures being targetted