@@ -2664,7 +2664,7 @@ void Drawable::draw()
26642664/* * Compute the health bar region based on the health of the object and the
26652665 * zoom level of the camera */
26662666// ------------------------------------------------------------------------------------------------
2667- static Bool computeHealthRegion ( const Drawable *draw, IRegion2D & region )
2667+ static Bool computeHealthRegion ( const Drawable *draw, Region2D & region )
26682668{
26692669
26702670 // sanity
@@ -2740,8 +2740,8 @@ void Drawable::drawIconUI( void )
27402740{
27412741 if ( TheGameLogic->getDrawIconUI () && (TheScriptEngine->getFade ()==ScriptEngine::FADE_NONE) )
27422742 {
2743- IRegion2D healthBarRegionStorage;
2744- const IRegion2D * healthBarRegion = NULL ;
2743+ Region2D healthBarRegionStorage;
2744+ const Region2D * healthBarRegion = NULL ;
27452745 if (computeHealthRegion (this , healthBarRegionStorage))
27462746 healthBarRegion = &healthBarRegionStorage; // both data and a PointerAsFlag for logic in the methods below
27472747
@@ -2824,7 +2824,7 @@ void Drawable::setEmoticon( const AsciiString &name, Int duration )
28242824}
28252825
28262826// ------------------------------------------------------------------------------------------------
2827- void Drawable::drawEmoticon ( const IRegion2D *healthBarRegion )
2827+ void Drawable::drawEmoticon ( const Region2D *healthBarRegion )
28282828{
28292829 if ( hasIconInfo () && getIconInfo ()->m_icon [ ICON_EMOTICON ] )
28302830 {
@@ -2859,7 +2859,7 @@ void Drawable::drawEmoticon( const IRegion2D *healthBarRegion )
28592859
28602860// ------------------------------------------------------------------------------------------------
28612861// ------------------------------------------------------------------------------------------------
2862- void Drawable::drawAmmo ( const IRegion2D *healthBarRegion )
2862+ void Drawable::drawAmmo ( const Region2D *healthBarRegion )
28632863{
28642864 const Object *obj = getObject ();
28652865
@@ -2913,7 +2913,7 @@ void Drawable::drawAmmo( const IRegion2D *healthBarRegion )
29132913
29142914// ------------------------------------------------------------------------------------------------
29152915// ------------------------------------------------------------------------------------------------
2916- void Drawable::drawContained ( const IRegion2D *healthBarRegion )
2916+ void Drawable::drawContained ( const Region2D *healthBarRegion )
29172917{
29182918 const Object *obj = getObject ();
29192919
@@ -2987,7 +2987,7 @@ void Drawable::drawContained( const IRegion2D *healthBarRegion )
29872987}
29882988
29892989// -------------------------------------------------------------------------------------------------
2990- void Drawable::drawBattlePlans ( const IRegion2D *healthBarRegion )
2990+ void Drawable::drawBattlePlans ( const Region2D *healthBarRegion )
29912991{
29922992 Object *obj = getObject ();
29932993 if ( !obj || !healthBarRegion )
@@ -3096,8 +3096,8 @@ void Drawable::drawUIText()
30963096 // GameClient caches a list of us drawables during Drawablepostdraw()
30973097 // then our group numbers get spit out last, so they draw in front
30983098
3099- const IRegion2D * healthBarRegion = NULL ;
3100- IRegion2D healthBarRegionStorage;
3099+ const Region2D * healthBarRegion = NULL ;
3100+ Region2D healthBarRegionStorage;
31013101 if (computeHealthRegion (this , healthBarRegionStorage))
31023102 healthBarRegion = &healthBarRegionStorage; // both data and a PointerAsFlag for logic in the methods below
31033103
@@ -3210,7 +3210,7 @@ void Drawable::drawUIText()
32103210
32113211// ------------------------------------------------------------------------------------------------
32123212// ------------------------------------------------------------------------------------------------
3213- void Drawable::drawHealing (const IRegion2D * healthBarRegion)
3213+ void Drawable::drawHealing (const Region2D * healthBarRegion)
32143214{
32153215
32163216 const Object *obj = getObject ();
@@ -3304,7 +3304,7 @@ void Drawable::drawHealing(const IRegion2D* healthBarRegion)
33043304// ------------------------------------------------------------------------------------------------
33053305/* * This enthusiastic effect is TEMPORARY for the multiplayer test */
33063306// ------------------------------------------------------------------------------------------------
3307- void Drawable::drawEnthusiastic (const IRegion2D * healthBarRegion)
3307+ void Drawable::drawEnthusiastic (const Region2D * healthBarRegion)
33083308{
33093309
33103310 const Object *obj = getObject ();
@@ -3376,7 +3376,7 @@ void Drawable::drawEnthusiastic(const IRegion2D* healthBarRegion)
33763376#ifdef ALLOW_DEMORALIZE
33773377// ------------------------------------------------------------------------------------------------
33783378// ------------------------------------------------------------------------------------------------
3379- void Drawable::drawDemoralized (const IRegion2D * healthBarRegion)
3379+ void Drawable::drawDemoralized (const Region2D * healthBarRegion)
33803380{
33813381
33823382 const Object *obj = getObject ();
@@ -3433,7 +3433,7 @@ enum
34333433};
34343434// ------------------------------------------------------------------------------------------------
34353435// ------------------------------------------------------------------------------------------------
3436- void Drawable::drawBombed (const IRegion2D * healthBarRegion)
3436+ void Drawable::drawBombed (const Region2D * healthBarRegion)
34373437{
34383438
34393439 const Object *obj = getObject ();
@@ -3612,7 +3612,7 @@ void Drawable::drawBombed(const IRegion2D* healthBarRegion)
36123612// ------------------------------------------------------------------------------------------------
36133613/* * Draw any icon information that needs to be drawn */
36143614// ------------------------------------------------------------------------------------------------
3615- void Drawable::drawDisabled (const IRegion2D * healthBarRegion)
3615+ void Drawable::drawDisabled (const Region2D * healthBarRegion)
36163616{
36173617
36183618 const Object *obj = getObject ();
@@ -3670,7 +3670,7 @@ void Drawable::drawDisabled(const IRegion2D* healthBarRegion)
36703670// -------------------------------------------------------------------------------------------------
36713671/* * Draw construction percent for drawables that have objects that are "under construction" */
36723672// -------------------------------------------------------------------------------------------------
3673- void Drawable::drawConstructPercent ( const IRegion2D *healthBarRegion )
3673+ void Drawable::drawConstructPercent ( const Region2D *healthBarRegion )
36743674{
36753675
36763676 // this data is in an attached object
@@ -3735,7 +3735,7 @@ void Drawable::drawConstructPercent( const IRegion2D *healthBarRegion )
37353735// -------------------------------------------------------------------------------------------------
37363736/* * Draw caption */
37373737// -------------------------------------------------------------------------------------------------
3738- void Drawable::drawCaption ( const IRegion2D *healthBarRegion )
3738+ void Drawable::drawCaption ( const Region2D *healthBarRegion )
37393739{
37403740 if (!m_captionDisplayString)
37413741 return ;
@@ -3771,7 +3771,7 @@ void Drawable::drawCaption( const IRegion2D *healthBarRegion )
37713771// ------------------------------------------------------------------------------------------------
37723772/* * Draw any veterency markers that should be displayed */
37733773// ------------------------------------------------------------------------------------------------
3774- void Drawable::drawVeterancy ( const IRegion2D *healthBarRegion )
3774+ void Drawable::drawVeterancy ( const Region2D *healthBarRegion )
37753775{
37763776 // get object from drawble
37773777 Object* obj = getObject ();
@@ -3819,7 +3819,7 @@ void Drawable::drawVeterancy( const IRegion2D *healthBarRegion )
38193819// ------------------------------------------------------------------------------------------------
38203820/* * Draw health bar information for drawable */
38213821// ------------------------------------------------------------------------------------------------
3822- void Drawable::drawHealthBar (const IRegion2D * healthBarRegion)
3822+ void Drawable::drawHealthBar (const Region2D * healthBarRegion)
38233823{
38243824 if (!healthBarRegion)
38253825 return ;
@@ -3918,9 +3918,18 @@ void Drawable::drawHealthBar(const IRegion2D* healthBarRegion)
39183918 }
39193919
39203920 Real healthBoxWidth = healthBarRegion->width ();
3921- Real healthBoxHeight = max ((Int) defaultHealthBoxHeight, healthBarRegion->height ());
3921+ Real healthBoxHeight = max (defaultHealthBoxHeight, healthBarRegion->height ());
39223922 Real healthBoxOutlineSize = floorf (1 .0f * TheInGameUI->getUnitHealthbarScaleFactor ());
39233923
3924+ // TheDisplay->drawFillRect( healthBarRegion->lo.x - 2, healthBarRegion->lo.y - 12,
3925+ // healthBoxWidth + 5, healthBoxHeight + 5,
3926+ // GameMakeColor(255,0,0,255) );
3927+
3928+ // TheDisplay->drawFillRectf( healthBarRegion->lo.x, healthBarRegion->lo.y - 10,
3929+ // healthBoxWidth * healthRatio, 4.6,
3930+ // color );
3931+
3932+
39243933 // draw a filled bar for the health
39253934 // TheSuperHackers @info this takes up the whole size of the health rect area, the border is drawn over the top
39263935 // This simplifies the handling of the health bar
@@ -3930,12 +3939,12 @@ void Drawable::drawHealthBar(const IRegion2D* healthBarRegion)
39303939
39313940 // draw the health blend line but only for intermediate resolutions
39323941 // TheSuperHackers @info we adjust the line down by the thickness of the border to keep it with one line of exposed pixels
3933- if (fmod (healthBoxHeight, defaultHealthBoxHeight) > 0 .0f ) {
3934- Color outlineBlendColor = outlineColor - 0x77000000 ;
3935- TheDisplay->drawLine ( healthBarRegion->lo .x , healthBarRegion->lo .y + healthBoxOutlineSize,
3936- healthBarRegion->lo .x + healthBoxWidth * healthRatio, healthBarRegion->lo .y + healthBoxOutlineSize,
3937- healthBoxOutlineSize + 1 .0f , outlineBlendColor);
3938- }
3942+ // if (fmod(healthBoxHeight, defaultHealthBoxHeight) > 0.0f) {
3943+ // Color outlineBlendColor = outlineColor - 0x77000000;
3944+ // TheDisplay->drawLine( healthBarRegion->lo.x, healthBarRegion->lo.y + healthBoxOutlineSize,
3945+ // healthBarRegion->lo.x + healthBoxWidth * healthRatio, healthBarRegion->lo.y + healthBoxOutlineSize,
3946+ // healthBoxOutlineSize + 1.0f, outlineBlendColor);
3947+ // }
39393948
39403949 // draw the health box outline
39413950 // TheSuperHackers @info when drawing the outline, the underlying function grows the outline towards the center of the region
0 commit comments