mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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
|
// WANNE: Hide the health text when hovering over a enemy
|
||||||
gGameExternalOptions.fHideEnemyHealthText = iniReader.ReadBoolean("Tactical Interface Settings","HIDE_ENEMY_HEALTH_TEXT", FALSE);
|
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
|
// WANNE: Hide the hit count when enemy gets hit
|
||||||
gGameExternalOptions.ubEnemyHitCount = iniReader.ReadInteger("Tactical Interface Settings","ENEMY_HIT_COUNT", 0, 0, 2);
|
gGameExternalOptions.ubEnemyHitCount = iniReader.ReadInteger("Tactical Interface Settings","ENEMY_HIT_COUNT", 0, 0, 2);
|
||||||
|
|
||||||
|
|||||||
@@ -1146,6 +1146,7 @@ typedef struct
|
|||||||
BOOLEAN fShowCamouflageFaces;
|
BOOLEAN fShowCamouflageFaces;
|
||||||
|
|
||||||
BOOLEAN fHideEnemyHealthText;
|
BOOLEAN fHideEnemyHealthText;
|
||||||
|
BOOLEAN fShowHealthBarsOnHead;
|
||||||
|
|
||||||
UINT8 ubEnemyHitCount;
|
UINT8 ubEnemyHitCount;
|
||||||
|
|
||||||
|
|||||||
+48
-43
@@ -1782,22 +1782,25 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
|||||||
pSoldier->flags.fShowLocator = FALSE;
|
pSoldier->flags.fShowLocator = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render the beastie
|
if ( gGameExternalOptions.fShowHealthBarsOnHead )
|
||||||
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 )
|
|
||||||
{
|
{
|
||||||
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 )
|
if ( !pSoldier->flags.fShowLocator )
|
||||||
@@ -1998,38 +2001,40 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
|||||||
//new profiles by Jazz
|
//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 ))
|
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 )
|
// Add bars
|
||||||
{
|
iBack = RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos + 34 ), (INT16)(sYPos + 11 ) );
|
||||||
sXPos += 28;
|
|
||||||
sYPos += 5;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sXPos += 30;
|
|
||||||
sYPos += 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add bars
|
if ( iBack != -1 )
|
||||||
iBack = RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)(sXPos + 34 ), (INT16)(sYPos + 11 ) );
|
{
|
||||||
|
SetBackgroundRectFilled( iBack );
|
||||||
|
}
|
||||||
|
TileElem = gTileDatabase[ usGraphicToUse ];
|
||||||
|
BltVideoObject( FRAME_BUFFER, TileElem.hTileSurface, TileElem.usRegionIndex, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
if ( iBack != -1 )
|
// Draw life, breath
|
||||||
{
|
// Only do this when we are a vehicle but on our team
|
||||||
SetBackgroundRectFilled( iBack );
|
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||||
}
|
{
|
||||||
TileElem = gTileDatabase[ usGraphicToUse ];
|
DrawBarsInUIBox( pSoldier, (INT16)(sXPos + 1), (INT16)(sYPos + 2), 16, 1 );
|
||||||
BltVideoObject( FRAME_BUFFER, TileElem.hTileSurface, TileElem.usRegionIndex, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
}
|
||||||
|
else
|
||||||
// Draw life, breath
|
{
|
||||||
// Only do this when we are a vehicle but on our team
|
DrawBarsInUIBox( pSoldier, (INT16)(sXPos ), (INT16)(sYPos ), 16, 1 );
|
||||||
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 ||
|
else // ( pSoldier->ubProfile < FIRST_RPC || pSoldier->ubProfile >= GASTON ||
|
||||||
|
|||||||
Reference in New Issue
Block a user