mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
SHOW_HEALTHBARSOVERHEAD allows hiding the health and fatigue bars over your selected mercs
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6098 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -999,6 +999,9 @@ void LoadGameExternalOptions()
|
||||
// WANNE: Hide the health text when hovering over a enemy
|
||||
gGameExternalOptions.fHideEnemyHealthText = iniReader.ReadBoolean("Tactical Interface Settings","HIDE_ENEMY_HEALTH_TEXT", FALSE);
|
||||
|
||||
// Flugente: show health an fatigue bars over currently selected mercs and those we hover our mouse over
|
||||
gGameExternalOptions.fShowHealthBarsOnHead = iniReader.ReadBoolean("Tactical Interface Settings","SHOW_HEALTHBARSOVERHEAD", TRUE);
|
||||
|
||||
// WANNE: Hide the hit count when enemy gets hit
|
||||
gGameExternalOptions.ubEnemyHitCount = iniReader.ReadInteger("Tactical Interface Settings","ENEMY_HIT_COUNT", 0, 0, 2);
|
||||
|
||||
|
||||
@@ -1146,6 +1146,7 @@ typedef struct
|
||||
BOOLEAN fShowCamouflageFaces;
|
||||
|
||||
BOOLEAN fHideEnemyHealthText;
|
||||
BOOLEAN fShowHealthBarsOnHead;
|
||||
|
||||
UINT8 ubEnemyHitCount;
|
||||
|
||||
|
||||
+48
-43
@@ -1782,22 +1782,25 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
pSoldier->flags.fShowLocator = FALSE;
|
||||
}
|
||||
|
||||
// Render the beastie
|
||||
GetSoldierAboveGuyPositions( pSoldier, &sXPos, &sYPos, TRUE );
|
||||
|
||||
// Adjust for bars!
|
||||
sXPos += 25;
|
||||
sYPos += 25;
|
||||
|
||||
// Add bars
|
||||
iBack = RegisterBackgroundRect( BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos +40 ), (INT16)(sYPos + 40 ) );
|
||||
|
||||
if ( iBack != -1 )
|
||||
if ( gGameExternalOptions.fShowHealthBarsOnHead )
|
||||
{
|
||||
SetBackgroundRectFilled( iBack );
|
||||
}
|
||||
// Render the beastie
|
||||
GetSoldierAboveGuyPositions( pSoldier, &sXPos, &sYPos, TRUE );
|
||||
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiUNDERWATER, pSoldier->sLocatorFrame, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
// Adjust for bars!
|
||||
sXPos += 25;
|
||||
sYPos += 25;
|
||||
|
||||
// Add bars
|
||||
iBack = RegisterBackgroundRect( BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos +40 ), (INT16)(sYPos + 40 ) );
|
||||
|
||||
if ( iBack != -1 )
|
||||
{
|
||||
SetBackgroundRectFilled( iBack );
|
||||
}
|
||||
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiUNDERWATER, pSoldier->sLocatorFrame, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !pSoldier->flags.fShowLocator )
|
||||
@@ -1998,38 +2001,40 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
//new profiles by Jazz
|
||||
if ( gProfilesIMP[pSoldier->ubProfile].ProfilId == pSoldier->ubProfile || gProfilesAIM[pSoldier->ubProfile].ProfilId == pSoldier->ubProfile || gProfilesMERC[pSoldier->ubProfile].ProfilId == pSoldier->ubProfile || RPC_RECRUITED( pSoldier ) || AM_AN_EPC( pSoldier ) || ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ))
|
||||
{
|
||||
// Adjust for bars!
|
||||
if ( gGameExternalOptions.fShowHealthBarsOnHead )
|
||||
{
|
||||
// Adjust for bars!
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
{
|
||||
sXPos += 28;
|
||||
sYPos += 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
sXPos += 30;
|
||||
sYPos += 7;
|
||||
}
|
||||
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
{
|
||||
sXPos += 28;
|
||||
sYPos += 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
sXPos += 30;
|
||||
sYPos += 7;
|
||||
}
|
||||
// Add bars
|
||||
iBack = RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos + 34 ), (INT16)(sYPos + 11 ) );
|
||||
|
||||
// Add bars
|
||||
iBack = RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos + 34 ), (INT16)(sYPos + 11 ) );
|
||||
if ( iBack != -1 )
|
||||
{
|
||||
SetBackgroundRectFilled( iBack );
|
||||
}
|
||||
TileElem = gTileDatabase[ usGraphicToUse ];
|
||||
BltVideoObject( FRAME_BUFFER, TileElem.hTileSurface, TileElem.usRegionIndex, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
|
||||
if ( iBack != -1 )
|
||||
{
|
||||
SetBackgroundRectFilled( iBack );
|
||||
}
|
||||
TileElem = gTileDatabase[ usGraphicToUse ];
|
||||
BltVideoObject( FRAME_BUFFER, TileElem.hTileSurface, TileElem.usRegionIndex, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
|
||||
// Draw life, breath
|
||||
// Only do this when we are a vehicle but on our team
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
{
|
||||
DrawBarsInUIBox( pSoldier, (INT16)(sXPos + 1), (INT16)(sYPos + 2), 16, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawBarsInUIBox( pSoldier, (INT16)(sXPos ), (INT16)(sYPos ), 16, 1 );
|
||||
// Draw life, breath
|
||||
// Only do this when we are a vehicle but on our team
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
{
|
||||
DrawBarsInUIBox( pSoldier, (INT16)(sXPos + 1), (INT16)(sYPos + 2), 16, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawBarsInUIBox( pSoldier, (INT16)(sXPos ), (INT16)(sYPos ), 16, 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else // ( pSoldier->ubProfile < FIRST_RPC || pSoldier->ubProfile >= GASTON ||
|
||||
|
||||
Reference in New Issue
Block a user