@@ -2656,7 +2656,7 @@ void Drawable::draw()
26562656/* * Compute the health bar region based on the health of the object and the
26572657 * zoom level of the camera */
26582658// ------------------------------------------------------------------------------------------------
2659- static Bool computeHealthRegion ( const Drawable *draw, IRegion2D & region )
2659+ static Bool computeHealthRegion ( const Drawable *draw, Region2D & region )
26602660{
26612661
26622662 // sanity
@@ -2732,8 +2732,8 @@ void Drawable::drawIconUI( void )
27322732{
27332733 if ( TheGameLogic->getDrawIconUI () && (TheScriptEngine->getFade ()==ScriptEngine::FADE_NONE) )
27342734 {
2735- IRegion2D healthBarRegionStorage;
2736- const IRegion2D * healthBarRegion = NULL ;
2735+ Region2D healthBarRegionStorage;
2736+ const Region2D * healthBarRegion = NULL ;
27372737 if (computeHealthRegion (this , healthBarRegionStorage))
27382738 healthBarRegion = &healthBarRegionStorage; // both data and a PointerAsFlag for logic in the methods below
27392739
@@ -2816,7 +2816,7 @@ void Drawable::setEmoticon( const AsciiString &name, Int duration )
28162816}
28172817
28182818// ------------------------------------------------------------------------------------------------
2819- void Drawable::drawEmoticon ( const IRegion2D *healthBarRegion )
2819+ void Drawable::drawEmoticon ( const Region2D *healthBarRegion )
28202820{
28212821 if ( hasIconInfo () && getIconInfo ()->m_icon [ ICON_EMOTICON ] )
28222822 {
@@ -2851,7 +2851,7 @@ void Drawable::drawEmoticon( const IRegion2D *healthBarRegion )
28512851
28522852// ------------------------------------------------------------------------------------------------
28532853// ------------------------------------------------------------------------------------------------
2854- void Drawable::drawAmmo ( const IRegion2D *healthBarRegion )
2854+ void Drawable::drawAmmo ( const Region2D *healthBarRegion )
28552855{
28562856 const Object *obj = getObject ();
28572857
@@ -2905,7 +2905,7 @@ void Drawable::drawAmmo( const IRegion2D *healthBarRegion )
29052905
29062906// ------------------------------------------------------------------------------------------------
29072907// ------------------------------------------------------------------------------------------------
2908- void Drawable::drawContained ( const IRegion2D *healthBarRegion )
2908+ void Drawable::drawContained ( const Region2D *healthBarRegion )
29092909{
29102910 const Object *obj = getObject ();
29112911
@@ -2979,7 +2979,7 @@ void Drawable::drawContained( const IRegion2D *healthBarRegion )
29792979}
29802980
29812981// -------------------------------------------------------------------------------------------------
2982- void Drawable::drawBattlePlans ( const IRegion2D *healthBarRegion )
2982+ void Drawable::drawBattlePlans ( const Region2D *healthBarRegion )
29832983{
29842984 Object *obj = getObject ();
29852985 if ( !obj || !healthBarRegion )
@@ -3088,8 +3088,8 @@ void Drawable::drawUIText()
30883088 // GameClient caches a list of us drawables during Drawablepostdraw()
30893089 // then our group numbers get spit out last, so they draw in front
30903090
3091- const IRegion2D * healthBarRegion = NULL ;
3092- IRegion2D healthBarRegionStorage;
3091+ const Region2D * healthBarRegion = NULL ;
3092+ Region2D healthBarRegionStorage;
30933093 if (computeHealthRegion (this , healthBarRegionStorage))
30943094 healthBarRegion = &healthBarRegionStorage; // both data and a PointerAsFlag for logic in the methods below
30953095
@@ -3202,7 +3202,7 @@ void Drawable::drawUIText()
32023202
32033203// ------------------------------------------------------------------------------------------------
32043204// ------------------------------------------------------------------------------------------------
3205- void Drawable::drawHealing (const IRegion2D * healthBarRegion)
3205+ void Drawable::drawHealing (const Region2D * healthBarRegion)
32063206{
32073207
32083208 const Object *obj = getObject ();
@@ -3296,7 +3296,7 @@ void Drawable::drawHealing(const IRegion2D* healthBarRegion)
32963296// ------------------------------------------------------------------------------------------------
32973297/* * This enthusiastic effect is TEMPORARY for the multiplayer test */
32983298// ------------------------------------------------------------------------------------------------
3299- void Drawable::drawEnthusiastic (const IRegion2D * healthBarRegion)
3299+ void Drawable::drawEnthusiastic (const Region2D * healthBarRegion)
33003300{
33013301
33023302 const Object *obj = getObject ();
@@ -3368,7 +3368,7 @@ void Drawable::drawEnthusiastic(const IRegion2D* healthBarRegion)
33683368#ifdef ALLOW_DEMORALIZE
33693369// ------------------------------------------------------------------------------------------------
33703370// ------------------------------------------------------------------------------------------------
3371- void Drawable::drawDemoralized (const IRegion2D * healthBarRegion)
3371+ void Drawable::drawDemoralized (const Region2D * healthBarRegion)
33723372{
33733373
33743374 const Object *obj = getObject ();
@@ -3425,7 +3425,7 @@ enum
34253425};
34263426// ------------------------------------------------------------------------------------------------
34273427// ------------------------------------------------------------------------------------------------
3428- void Drawable::drawBombed (const IRegion2D * healthBarRegion)
3428+ void Drawable::drawBombed (const Region2D * healthBarRegion)
34293429{
34303430
34313431 const Object *obj = getObject ();
@@ -3604,7 +3604,7 @@ void Drawable::drawBombed(const IRegion2D* healthBarRegion)
36043604// ------------------------------------------------------------------------------------------------
36053605/* * Draw any icon information that needs to be drawn */
36063606// ------------------------------------------------------------------------------------------------
3607- void Drawable::drawDisabled (const IRegion2D * healthBarRegion)
3607+ void Drawable::drawDisabled (const Region2D * healthBarRegion)
36083608{
36093609
36103610 const Object *obj = getObject ();
@@ -3662,7 +3662,7 @@ void Drawable::drawDisabled(const IRegion2D* healthBarRegion)
36623662// -------------------------------------------------------------------------------------------------
36633663/* * Draw construction percent for drawables that have objects that are "under construction" */
36643664// -------------------------------------------------------------------------------------------------
3665- void Drawable::drawConstructPercent ( const IRegion2D *healthBarRegion )
3665+ void Drawable::drawConstructPercent ( const Region2D *healthBarRegion )
36663666{
36673667
36683668 // this data is in an attached object
@@ -3727,7 +3727,7 @@ void Drawable::drawConstructPercent( const IRegion2D *healthBarRegion )
37273727// -------------------------------------------------------------------------------------------------
37283728/* * Draw caption */
37293729// -------------------------------------------------------------------------------------------------
3730- void Drawable::drawCaption ( const IRegion2D *healthBarRegion )
3730+ void Drawable::drawCaption ( const Region2D *healthBarRegion )
37313731{
37323732 if (!m_captionDisplayString)
37333733 return ;
@@ -3763,7 +3763,7 @@ void Drawable::drawCaption( const IRegion2D *healthBarRegion )
37633763// ------------------------------------------------------------------------------------------------
37643764/* * Draw any veterency markers that should be displayed */
37653765// ------------------------------------------------------------------------------------------------
3766- void Drawable::drawVeterancy ( const IRegion2D *healthBarRegion )
3766+ void Drawable::drawVeterancy ( const Region2D *healthBarRegion )
37673767{
37683768 // get object from drawble
37693769 Object* obj = getObject ();
@@ -3811,7 +3811,7 @@ void Drawable::drawVeterancy( const IRegion2D *healthBarRegion )
38113811// ------------------------------------------------------------------------------------------------
38123812/* * Draw health bar information for drawable */
38133813// ------------------------------------------------------------------------------------------------
3814- void Drawable::drawHealthBar (const IRegion2D * healthBarRegion)
3814+ void Drawable::drawHealthBar (const Region2D * healthBarRegion)
38153815{
38163816 if (!healthBarRegion)
38173817 return ;
@@ -3910,9 +3910,18 @@ void Drawable::drawHealthBar(const IRegion2D* healthBarRegion)
39103910 }
39113911
39123912 Real healthBoxWidth = healthBarRegion->width ();
3913- Real healthBoxHeight = max ((Int) defaultHealthBoxHeight, healthBarRegion->height ());
3913+ Real healthBoxHeight = max (defaultHealthBoxHeight, healthBarRegion->height ());
39143914 Real healthBoxOutlineSize = floorf (1 .0f * TheInGameUI->getUnitHealthbarScaleFactor ());
39153915
3916+ // TheDisplay->drawFillRect( healthBarRegion->lo.x - 2, healthBarRegion->lo.y - 12,
3917+ // healthBoxWidth + 5, healthBoxHeight + 5,
3918+ // GameMakeColor(255,0,0,255) );
3919+
3920+ // TheDisplay->drawFillRectf( healthBarRegion->lo.x, healthBarRegion->lo.y - 10,
3921+ // healthBoxWidth * healthRatio, 4.6,
3922+ // color );
3923+
3924+
39163925 // draw a filled bar for the health
39173926 // TheSuperHackers @info this takes up the whole size of the health rect area, the border is drawn over the top
39183927 // This simplifies the handling of the health bar
@@ -3922,12 +3931,12 @@ void Drawable::drawHealthBar(const IRegion2D* healthBarRegion)
39223931
39233932 // draw the health blend line but only for intermediate resolutions
39243933 // TheSuperHackers @info we adjust the line down by the thickness of the border to keep it with one line of exposed pixels
3925- if (fmod (healthBoxHeight, defaultHealthBoxHeight) > 0 .0f ) {
3926- Color outlineBlendColor = outlineColor - 0x77000000 ;
3927- TheDisplay->drawLine ( healthBarRegion->lo .x , healthBarRegion->lo .y + healthBoxOutlineSize,
3928- healthBarRegion->lo .x + healthBoxWidth * healthRatio, healthBarRegion->lo .y + healthBoxOutlineSize,
3929- healthBoxOutlineSize + 1 .0f , outlineBlendColor);
3930- }
3934+ // if (fmod(healthBoxHeight, defaultHealthBoxHeight) > 0.0f) {
3935+ // Color outlineBlendColor = outlineColor - 0x77000000;
3936+ // TheDisplay->drawLine( healthBarRegion->lo.x, healthBarRegion->lo.y + healthBoxOutlineSize,
3937+ // healthBarRegion->lo.x + healthBoxWidth * healthRatio, healthBarRegion->lo.y + healthBoxOutlineSize,
3938+ // healthBoxOutlineSize + 1.0f, outlineBlendColor);
3939+ // }
39313940
39323941 // draw the health box outline
39333942 // TheSuperHackers @info when drawing the outline, the underlying function grows the outline towards the center of the region
0 commit comments