mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New options in ja2_options.ini (by Sevenfm)
1) PLAYER_HIT_COUNT = 0 This works as ENEMY_HIT_COUNT option, but for player mercs. Possible values: 0 - 4 2) SOLDIER_TOOLTIP_DISPLAY_SUPPRESSION_INFO = TRUE Show additional info in tactical tooltip: - APs lost due to suppression - Suppression Tolerance - Effective Shock Level ( Shock level modified by traits and backgrounds. This value is compared with current suppression tolerance to determine "cowering" effect ) - AI morale level 3) SHOW_ENEMY_WEAPON = TRUE Show enemy weapon name above soldier - after health, name and rank. You can see exact weapon name only on short distances, range calculation is similar to dynamic tooltips and based on soldiers actual viewing range and experience. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6691 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+170
-217
@@ -738,210 +738,9 @@ void RenderTopmostTacticalInterface( )
|
||||
DrawSelectedUIAboveGuy((UINT16)pSoldier->ubID);
|
||||
}
|
||||
|
||||
// Use world coordinates!
|
||||
INT16 sMercScreenX, sMercScreenY, sOffsetX, sOffsetY, sDamageX, sDamageY;
|
||||
|
||||
// sevenfm: added for suppression counters
|
||||
INT16 sSuppressionX, sSuppressionY;
|
||||
UINT16 widthDamage = 0;
|
||||
UINT16 widthSuppression = 0;
|
||||
UINT16 height = 0;
|
||||
BOOLEAN printDamage = FALSE; // determines if any value is printed after standart moving damage counter
|
||||
BOOLEAN printSuppression = FALSE; // determines if any value is printed above soldier (only for new suppression counters)
|
||||
|
||||
if ( gGameExternalOptions.ubShowSuppressionCount == 1 ||
|
||||
gGameExternalOptions.ubShowShockCount == 1 ||
|
||||
gGameExternalOptions.ubShowAPCount == 1 ||
|
||||
gGameExternalOptions.ubShowMoraleCount == 1 )
|
||||
printDamage = TRUE;
|
||||
if ( gGameExternalOptions.ubShowSuppressionCountAlt ||
|
||||
gGameExternalOptions.ubShowSuppressionCount == 2 ||
|
||||
gGameExternalOptions.ubShowShockCount == 2 ||
|
||||
gGameExternalOptions.ubShowAPCount == 2 ||
|
||||
gGameExternalOptions.ubShowMoraleCount == 2 )
|
||||
printSuppression = TRUE;
|
||||
|
||||
if (!TileIsOutOfBounds(pSoldier->sGridNo) && pSoldier->bVisible != -1 )
|
||||
{
|
||||
// coordinates for suppression counter
|
||||
GetSoldierScreenPos( pSoldier, &sMercScreenX, &sMercScreenY );
|
||||
GetSoldierAnimOffsets( pSoldier, &sOffsetX, &sOffsetY );
|
||||
if ( pSoldier->ubBodyType == QUEENMONSTER )
|
||||
{
|
||||
sSuppressionX = sMercScreenX - pSoldier->sBoundingBoxOffsetX;
|
||||
sSuppressionY = sMercScreenY - pSoldier->sBoundingBoxOffsetY;
|
||||
sSuppressionX += 25;
|
||||
sSuppressionY += 10;
|
||||
DrawCounters( pSoldier );
|
||||
}
|
||||
else
|
||||
{
|
||||
sSuppressionX = sOffsetX + (INT16)(sMercScreenX + ( 2 * 30 / 3 ) );
|
||||
sSuppressionY = sOffsetY + (INT16)(sMercScreenY - 5 );
|
||||
sSuppressionX -= sOffsetX;
|
||||
sSuppressionY -= sOffsetY;
|
||||
if ( sSuppressionY < gsVIEWPORT_WINDOW_START_Y )
|
||||
{
|
||||
sSuppressionY = ( sMercScreenY - sOffsetY );
|
||||
}
|
||||
}
|
||||
// if showing suppression - move damage counter higher on screen
|
||||
//if( printSuppression)
|
||||
// height = WFGetFontHeight ( TINYFONT1 );
|
||||
|
||||
// print current ubSuppressionPoints counter
|
||||
if( gGameExternalOptions.ubShowSuppressionCountAlt && pSoldier->stats.bLife >= OKLIFE )
|
||||
{
|
||||
if( pSoldier->ubSuppressionPoints >0 )
|
||||
{
|
||||
UINT8 scale = PRINT_SCALE_PLAIN_NUMBER;
|
||||
if( gGameExternalOptions.ubShowSuppressionUseAsterisks )
|
||||
{
|
||||
// print multi asterisk only if no other suppression counter will be printed
|
||||
/*if ( gGameExternalOptions.ubShowShockCount <2 &&
|
||||
gGameExternalOptions.ubShowAPCount <2 &&
|
||||
gGameExternalOptions.ubShowMoraleCount <2 )
|
||||
scale = PRINT_SCALE_ASTERISK_SUPPRESSION;
|
||||
else
|
||||
scale = PRINT_SCALE_ASTERISK;*/
|
||||
scale = PRINT_SCALE_ASTERISK_SUPPRESSION;
|
||||
}
|
||||
PrintSuppressionCounter( sSuppressionX, sSuppressionY, pSoldier->ubSuppressionPoints, widthSuppression, FONT_MCOLOR_LTGRAY, scale );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.fDisplayDamage )
|
||||
{
|
||||
// Display damage
|
||||
if (!TileIsOutOfBounds(pSoldier->sGridNo) && pSoldier->bVisible != -1 )
|
||||
{
|
||||
GetSoldierScreenPos( pSoldier, &sMercScreenX, &sMercScreenY );
|
||||
GetSoldierAnimOffsets( pSoldier, &sOffsetX, &sOffsetY );
|
||||
|
||||
if ( pSoldier->ubBodyType == QUEENMONSTER )
|
||||
{
|
||||
sDamageX = sMercScreenX + pSoldier->sDamageX - pSoldier->sBoundingBoxOffsetX;
|
||||
sDamageY = sMercScreenY + pSoldier->sDamageY - pSoldier->sBoundingBoxOffsetY;
|
||||
|
||||
sDamageX += 25;
|
||||
sDamageY += 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
sDamageX = pSoldier->sDamageX + (INT16)(sMercScreenX + ( 2 * 30 / 3 ) );
|
||||
sDamageY = pSoldier->sDamageY + (INT16)(sMercScreenY - 5 );
|
||||
|
||||
sDamageX -= sOffsetX;
|
||||
sDamageY -= sOffsetY;
|
||||
|
||||
if ( sDamageY < gsVIEWPORT_WINDOW_START_Y )
|
||||
{
|
||||
sDamageY = ( sMercScreenY - sOffsetY );
|
||||
}
|
||||
}
|
||||
// if showing suppression - move damage counter higher on screen
|
||||
if( printSuppression)
|
||||
sDamageY -= WFGetFontHeight ( TINYFONT1 );
|
||||
|
||||
SetFont( TINYFONT1 );
|
||||
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
|
||||
bool showDamage = true;
|
||||
if (gGameExternalOptions.ubEnemyHitCount > 0 && ( pSoldier->bTeam == ENEMY_TEAM || pSoldier->bTeam == CREATURE_TEAM) )
|
||||
showDamage = false;
|
||||
|
||||
if (showDamage)
|
||||
{
|
||||
if ( pSoldier->sDamage >= 0 )
|
||||
{
|
||||
// print moving damage counter
|
||||
if( pSoldier->sDamage > 0 )
|
||||
{
|
||||
if ( printDamage )
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->sDamage, widthDamage, FONT_MCOLOR_WHITE, PRINT_SCALE_PLAIN_NUMBER );
|
||||
else // original code
|
||||
{
|
||||
gprintfdirty( sDamageX, sDamageY, L"-%d", pSoldier->sDamage );
|
||||
mprintf( sDamageX, sDamageY, L"-%d", pSoldier->sDamage );
|
||||
}
|
||||
}
|
||||
}
|
||||
else // Flugente: it is possible that someone might regain negative damage as zombies can regenerate health through bleeding
|
||||
{
|
||||
if( printDamage )
|
||||
{
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, -pSoldier->sDamage, widthDamage, FONT_MCOLOR_LTGREEN, PRINT_SCALE_PLAIN_NUMBER );
|
||||
}
|
||||
else // original code
|
||||
{
|
||||
SetFontForeground( FONT_MCOLOR_LTGREEN );
|
||||
gprintfdirty( sDamageX, sDamageY, L"+%d", -pSoldier->sDamage );
|
||||
mprintf( sDamageX, sDamageY, L"+%d", -pSoldier->sDamage );
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gGameExternalOptions.ubEnemyHitCount == 1)
|
||||
{
|
||||
gprintfdirty( sDamageX, sDamageY, L"%s", gzHiddenHitCountStr[0]);
|
||||
mprintf( sDamageX, sDamageY, L"%s", gzHiddenHitCountStr[0]);
|
||||
}
|
||||
else if (gGameExternalOptions.ubEnemyHitCount == 3) // print white asterisks
|
||||
{
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->sDamage, widthDamage, FONT_MCOLOR_WHITE, PRINT_SCALE_ASTERISK_DAMAGE );
|
||||
}
|
||||
else if (gGameExternalOptions.ubEnemyHitCount == 4) // print red asterisks
|
||||
{
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->sDamage, widthDamage, FONT_MCOLOR_DKRED, PRINT_SCALE_ASTERISK_DAMAGE );
|
||||
}
|
||||
else
|
||||
{
|
||||
gprintfdirty( sDamageX, sDamageY, L"");
|
||||
mprintf( sDamageX, sDamageY, L"");
|
||||
}
|
||||
}
|
||||
if ( pSoldier->stats.bLife >= OKLIFE )
|
||||
{
|
||||
// replace ubLastSuppression count on screen
|
||||
if( gGameExternalOptions.ubShowSuppressionCountAlt && gGameExternalOptions.ubShowSuppressionCount == 2 && pSoldier->ubLastSuppression > 0 )
|
||||
widthSuppression = 0;
|
||||
// display suppression from last attack
|
||||
if( gGameExternalOptions.ubShowSuppressionCount == 1 ) // show after damage counter
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->ubLastSuppression, widthDamage, FONT_MCOLOR_LTGRAY,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_SUPPRESSION : PRINT_SCALE_PLAIN_NUMBER );
|
||||
if( gGameExternalOptions.ubShowSuppressionCount == 2 ) // show after suppression counter
|
||||
PrintSuppressionCounter( sSuppressionX, sSuppressionY, pSoldier->ubLastSuppression, widthSuppression, FONT_MCOLOR_LTGRAY,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_SUPPRESSION : PRINT_SCALE_PLAIN_NUMBER );
|
||||
// display shock from last attack
|
||||
if( gGameExternalOptions.ubShowShockCount == 1 ) // show after damage counter
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->ubLastShock + pSoldier->ubLastShockFromHit, widthDamage, FONT_MCOLOR_LTYELLOW,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_SHOCK : PRINT_SCALE_PLAIN_NUMBER );
|
||||
if( gGameExternalOptions.ubShowShockCount == 2 ) // show after suppression counter
|
||||
PrintSuppressionCounter( sSuppressionX, sSuppressionY, pSoldier->ubLastShock + pSoldier->ubLastShockFromHit, widthSuppression, FONT_MCOLOR_LTYELLOW,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_SHOCK : PRINT_SCALE_PLAIN_NUMBER );
|
||||
// display morale hit from last attack
|
||||
if( gGameExternalOptions.ubShowMoraleCount == 1 ) // show after damage counter
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->ubLastMorale + pSoldier->ubLastMoraleFromHit, widthDamage, FONT_MCOLOR_LTGREEN,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_MORALE : PRINT_SCALE_PLAIN_NUMBER );
|
||||
if( gGameExternalOptions.ubShowMoraleCount == 2 ) // show after suppression counter
|
||||
PrintSuppressionCounter( sSuppressionX, sSuppressionY, pSoldier->ubLastMorale + pSoldier->ubLastMoraleFromHit, widthSuppression, FONT_MCOLOR_LTGREEN,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_MORALE : PRINT_SCALE_PLAIN_NUMBER );
|
||||
// display AP loss from last attack
|
||||
if( gGameExternalOptions.ubShowAPCount == 1 ) // show after damage counter
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, pSoldier->ubLastAP + pSoldier->ubLastAPFromHit, widthDamage, FONT_MCOLOR_LTBLUE,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_AP : PRINT_SCALE_PLAIN_NUMBER );
|
||||
if( gGameExternalOptions.ubShowAPCount == 2 ) // show after suppression counter
|
||||
PrintSuppressionCounter( sSuppressionX, sSuppressionY, pSoldier->ubLastAP + pSoldier->ubLastAPFromHit, widthSuppression, FONT_MCOLOR_LTBLUE,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_AP : PRINT_SCALE_PLAIN_NUMBER );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{
|
||||
@@ -1251,7 +1050,7 @@ BOOLEAN InterfaceOKForMeanwhilePopup()
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void PrintSuppressionCounter( INT16 x, INT16 y, INT16 data, UINT16 &width, UINT8 ubForegound, UINT8 scale )
|
||||
void PrintCounter( INT16 x, INT16 y, INT16 data, UINT16 &width, UINT8 ubForegound, UINT8 scale )
|
||||
{
|
||||
CHAR16 pStr[100];
|
||||
UINT8 num = 0;
|
||||
@@ -1263,19 +1062,19 @@ void PrintSuppressionCounter( INT16 x, INT16 y, INT16 data, UINT16 &width, UINT8
|
||||
switch ( scale )
|
||||
{
|
||||
case PRINT_SCALE_ASTERISK_SUPPRESSION:
|
||||
num = CalcScaleSuppression( data );
|
||||
num = CalcScaleSuppression( abs(data) );
|
||||
break;
|
||||
case PRINT_SCALE_ASTERISK_DAMAGE:
|
||||
num = CalcScaleDamage( data );
|
||||
num = CalcScaleDamage( abs(data) );
|
||||
break;
|
||||
case PRINT_SCALE_ASTERISK_MORALE:
|
||||
num = CalcScaleMorale( data );
|
||||
num = CalcScaleMorale( abs(data) );
|
||||
break;
|
||||
case PRINT_SCALE_ASTERISK_AP:
|
||||
num = CalcScaleAP( data );
|
||||
num = CalcScaleAP( abs(data) );
|
||||
break;
|
||||
case PRINT_SCALE_ASTERISK_SHOCK:
|
||||
num = CalcScaleShock( data );
|
||||
num = CalcScaleShock( abs(data) );
|
||||
break;
|
||||
default:
|
||||
num = 1;
|
||||
@@ -1293,19 +1092,13 @@ void PrintSuppressionCounter( INT16 x, INT16 y, INT16 data, UINT16 &width, UINT8
|
||||
swprintf( pStr, L"*" );
|
||||
for ( i = 1; i<num; i++)
|
||||
wcscat( pStr, L"*" );
|
||||
// add " " only after numbers
|
||||
if( scale == PRINT_SCALE_PLAIN_NUMBER )
|
||||
wcscat( pStr, L" " );
|
||||
|
||||
gprintfdirty( x+width, y, pStr );
|
||||
mprintf( x+width, y, pStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
gprintfdirty( x+width, y, L"%d", data );
|
||||
mprintf( x+width, y, L"%d", data );
|
||||
swprintf( pStr, L"%d|", data );
|
||||
swprintf( pStr, L"%d ", data );
|
||||
}
|
||||
gprintfdirty( x+width, y, pStr );
|
||||
mprintf( x+width, y, pStr );
|
||||
width += StringPixLength ( pStr, TINYFONT1 );
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
}
|
||||
@@ -1348,3 +1141,163 @@ UINT8 CalcScaleShock( INT16 data )
|
||||
if( data > 3 ) return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void DrawCounters( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
// Use world coordinates!
|
||||
INT16 sMercScreenX, sMercScreenY, sOffsetX, sOffsetY, sDamageX, sDamageY;
|
||||
|
||||
// sevenfm: added for suppression counters
|
||||
INT16 sSuppressionX, sSuppressionY;
|
||||
UINT16 widthDamage = 0; // print damage counters one after another in one line
|
||||
UINT16 widthSuppression = 0; // print suppression counters (not moving) one after another in one line above soldier
|
||||
BOOLEAN printSuppression = FALSE; // determines if any value is printed above soldier (only for new suppression counters)
|
||||
UINT8 hitCount;
|
||||
CHAR16 pStr[100];
|
||||
|
||||
if ( gGameExternalOptions.ubShowSuppressionCountAlt ||
|
||||
gGameExternalOptions.ubShowSuppressionCount == 2 ||
|
||||
gGameExternalOptions.ubShowShockCount == 2 ||
|
||||
gGameExternalOptions.ubShowAPCount == 2 ||
|
||||
gGameExternalOptions.ubShowMoraleCount == 2 )
|
||||
printSuppression = TRUE;
|
||||
|
||||
if (!TileIsOutOfBounds(pSoldier->sGridNo) && pSoldier->bVisible != -1 )
|
||||
{
|
||||
GetSoldierScreenPos( pSoldier, &sMercScreenX, &sMercScreenY );
|
||||
GetSoldierAnimOffsets( pSoldier, &sOffsetX, &sOffsetY );
|
||||
// coordinates for suppression counter
|
||||
|
||||
if ( pSoldier->ubBodyType == QUEENMONSTER )
|
||||
{
|
||||
sSuppressionX = sMercScreenX - pSoldier->sBoundingBoxOffsetX;
|
||||
sSuppressionY = sMercScreenY - pSoldier->sBoundingBoxOffsetY;
|
||||
sSuppressionX += 25;
|
||||
sSuppressionY += 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
sSuppressionX = (INT16)(sMercScreenX + ( 2 * 30 / 3 ) );
|
||||
sSuppressionY = (INT16)(sMercScreenY - 5 );
|
||||
|
||||
if ( sSuppressionY < gsVIEWPORT_WINDOW_START_Y )
|
||||
sSuppressionY = ( sMercScreenY - sOffsetY );
|
||||
}
|
||||
// coordinates for damage counter
|
||||
if ( pSoldier->ubBodyType == QUEENMONSTER )
|
||||
{
|
||||
sDamageX = sMercScreenX + pSoldier->sDamageX - pSoldier->sBoundingBoxOffsetX;
|
||||
sDamageY = sMercScreenY + pSoldier->sDamageY - pSoldier->sBoundingBoxOffsetY;
|
||||
sDamageX += 25;
|
||||
sDamageY += 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
sDamageX = pSoldier->sDamageX + (INT16)(sMercScreenX + ( 2 * 30 / 3 ) );
|
||||
sDamageY = pSoldier->sDamageY + (INT16)(sMercScreenY - 5 );
|
||||
sDamageX -= sOffsetX;
|
||||
sDamageY -= sOffsetY;
|
||||
// if showing suppression - move damage counter higher on screen
|
||||
if( printSuppression)
|
||||
// sDamageY -= 2*WFGetFontHeight ( TINYFONT1 );
|
||||
sDamageY -= WFGetFontHeight ( TINYFONT1 );
|
||||
if ( sSuppressionY < gsVIEWPORT_WINDOW_START_Y )
|
||||
sSuppressionY = ( sMercScreenY - sOffsetY );
|
||||
}
|
||||
// print current ubSuppressionPoints counter
|
||||
if( gGameExternalOptions.ubShowSuppressionCountAlt && pSoldier->stats.bLife >= OKLIFE )
|
||||
{
|
||||
if( pSoldier->ubSuppressionPoints >0 )
|
||||
{
|
||||
PrintCounter( sSuppressionX, sSuppressionY, pSoldier->ubSuppressionPoints, widthSuppression, FONT_MCOLOR_LTGRAY,
|
||||
gGameExternalOptions.ubShowSuppressionUseAsterisks ? PRINT_SCALE_ASTERISK_SUPPRESSION : PRINT_SCALE_PLAIN_NUMBER );
|
||||
}
|
||||
}
|
||||
|
||||
if ( pSoldier->flags.fDisplayDamage )
|
||||
{
|
||||
// Display damage
|
||||
SetFont( TINYFONT1 );
|
||||
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
|
||||
if( pSoldier->bTeam == OUR_TEAM )
|
||||
hitCount = gGameExternalOptions.ubPlayerHitCount;
|
||||
else
|
||||
hitCount = gGameExternalOptions.ubEnemyHitCount;
|
||||
|
||||
if( pSoldier->sDamage < 0 )
|
||||
{
|
||||
// Flugente: it is possible that someone might regain negative damage as zombies can regenerate health through bleeding
|
||||
SetFontForeground( FONT_MCOLOR_LTGREEN );
|
||||
swprintf( pStr, L"+%d ", -pSoldier->sDamage );
|
||||
gprintfdirty( sDamageX, sDamageY, pStr );
|
||||
mprintf( sDamageX, sDamageY, pStr );
|
||||
widthDamage += StringPixLength ( pStr, TINYFONT1 );
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
}
|
||||
else // normal soldier
|
||||
{
|
||||
switch (hitCount)
|
||||
{
|
||||
case 0: // show damage as usual
|
||||
if( pSoldier->sDamage > 0 )
|
||||
//PrintCounter( sDamageX, sDamageY, pSoldier->sDamage, widthDamage, FONT_MCOLOR_WHITE, PRINT_SCALE_PLAIN_NUMBER );
|
||||
swprintf( pStr, L"-%d ", pSoldier->sDamage );
|
||||
gprintfdirty( sDamageX, sDamageY, pStr );
|
||||
mprintf( sDamageX, sDamageY, pStr );
|
||||
widthDamage += StringPixLength ( pStr, TINYFONT1 );
|
||||
break;
|
||||
case 1: // show ? indicator
|
||||
if( pSoldier->sDamage != 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s ", gzHiddenHitCountStr[0] );
|
||||
gprintfdirty( sDamageX, sDamageY, pStr );
|
||||
mprintf( sDamageX, sDamageY, pStr );
|
||||
widthDamage += StringPixLength ( pStr, TINYFONT1 );
|
||||
}
|
||||
break;
|
||||
case 2: // do not show anything
|
||||
break;
|
||||
case 3: // show white asterisks
|
||||
PrintCounter( sDamageX, sDamageY, pSoldier->sDamage, widthDamage, FONT_MCOLOR_WHITE, PRINT_SCALE_ASTERISK_DAMAGE );
|
||||
break;
|
||||
case 4: // show red asterisks
|
||||
PrintCounter( sDamageX, sDamageY, pSoldier->sDamage, widthDamage, FONT_MCOLOR_DKRED, PRINT_SCALE_ASTERISK_DAMAGE );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// do not show suppression info for dying soldier
|
||||
if ( pSoldier->stats.bLife >= OKLIFE )
|
||||
{
|
||||
// replace ubLastSuppression count on screen
|
||||
if( gGameExternalOptions.ubShowSuppressionCountAlt && gGameExternalOptions.ubShowSuppressionCount == 2 && pSoldier->ubLastSuppression > 0 )
|
||||
widthSuppression = 0;
|
||||
// display suppression from last attack
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, sSuppressionX, sSuppressionY, pSoldier->ubLastSuppression, widthDamage, widthSuppression,
|
||||
FONT_MCOLOR_LTGRAY, PRINT_SCALE_ASTERISK_SUPPRESSION, gGameExternalOptions.ubShowSuppressionCount );
|
||||
// display shock from last attack
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, sSuppressionX, sSuppressionY, pSoldier->ubLastShock + pSoldier->ubLastShockFromHit, widthDamage, widthSuppression,
|
||||
FONT_MCOLOR_LTYELLOW, PRINT_SCALE_ASTERISK_SHOCK, gGameExternalOptions.ubShowShockCount );
|
||||
// display morale hit from last attack
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, sSuppressionX, sSuppressionY, pSoldier->ubLastMorale + pSoldier->ubLastMoraleFromHit, widthDamage, widthSuppression,
|
||||
FONT_MCOLOR_LTGREEN, PRINT_SCALE_ASTERISK_MORALE, gGameExternalOptions.ubShowMoraleCount );
|
||||
// display AP loss from last attack
|
||||
PrintSuppressionCounter( sDamageX, sDamageY, sSuppressionX, sSuppressionY, pSoldier->ubLastAP + pSoldier->ubLastAPFromHit, widthDamage, widthSuppression,
|
||||
FONT_MCOLOR_LTBLUE, PRINT_SCALE_ASTERISK_AP, gGameExternalOptions.ubShowAPCount );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PrintSuppressionCounter( INT16 x, INT16 y, INT16 sX, INT16 sY, UINT8 data, UINT16 &widthDamage, UINT16 &widthSuppression, UINT8 ubForeground, UINT8 scale, UINT8 option)
|
||||
{
|
||||
if( option == 1 ) // show after damage counter
|
||||
PrintCounter( x, y, data, widthDamage, ubForeground, gGameExternalOptions.ubShowSuppressionUseAsterisks ? scale : PRINT_SCALE_PLAIN_NUMBER );
|
||||
if( option == 2 ) // show after suppression counter
|
||||
PrintCounter( sX, sY, data, widthSuppression, ubForeground, gGameExternalOptions.ubShowSuppressionUseAsterisks ? scale : PRINT_SCALE_PLAIN_NUMBER );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user