mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
new feature: soldier profiles allows defining individual names/bodytypes/hair/skin/traits of soldiers and militia. The game will choose randomly from this pool.
WARNING: GameDir revision >= 1672 is required. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6071 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+62
-3
@@ -100,9 +100,13 @@ int INV_INTERFACE_START_Y;// = ( SCREEN_HEIGHT - INV_INTERFACE_HEIGHT );
|
||||
|
||||
HIDDEN_NAMES_VALUES zHiddenNames[500]; //legion2 Jazz
|
||||
ENEMY_NAMES_VALUES zEnemyName[500];
|
||||
ENEMY_RANK_VALUES zEnemyRank[20]; // Flugente: set this to 20, which should be way enough, as there are onyl 10 exp levels
|
||||
ENEMY_RANK_VALUES zEnemyRank[20]; // Flugente: set this to 20, which should be way enough, as there are only 10 exp levels
|
||||
CIV_NAMES_VALUES zCivGroupName[NUM_CIV_GROUPS];
|
||||
|
||||
// Flugente: soldier profiles
|
||||
SOLDIER_PROFILE_VALUES zSoldierProfile[6][NUM_SOLDIER_PROFILES];
|
||||
UINT16 num_found_soldier_profiles[6]; // the correct number is set on reading the xml
|
||||
|
||||
BOOLEAN gfInMovementMenu = FALSE;
|
||||
INT32 giMenuAnchorX, giMenuAnchorY;
|
||||
|
||||
@@ -2058,7 +2062,20 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
{
|
||||
if ( pSoldier->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
if (gGameExternalOptions.fEnemyNames == TRUE && gGameExternalOptions.fEnemyRank == FALSE)
|
||||
// Flugente: soldier profiles
|
||||
if ( gGameExternalOptions.fSoldierProfiles_Enemy && pSoldier->usSoldierProfile )
|
||||
{
|
||||
swprintf(NameStr, pSoldier->GetName());
|
||||
|
||||
SetFont( TINYFONT1 );
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
|
||||
FindFontCenterCoordinates( sXPos, (INT16)( sYPos + 20 ), (INT16)(80 ), 1, NameStr, TINYFONT1, &sX, &sY );
|
||||
gprintfdirty( sX, sY, NameStr );
|
||||
mprintf( sX, sY, NameStr );
|
||||
}
|
||||
else if (gGameExternalOptions.fEnemyNames == TRUE && gGameExternalOptions.fEnemyRank == FALSE)
|
||||
{
|
||||
for( iCounter2 = 0; iCounter2 < 500; ++iCounter2 )
|
||||
{
|
||||
@@ -2107,6 +2124,20 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
}
|
||||
}
|
||||
}
|
||||
// Flugente: soldier profiles
|
||||
else if ( pSoldier->bTeam == MILITIA_TEAM && gGameExternalOptions.fSoldierProfiles_Militia && pSoldier->usSoldierProfile )
|
||||
{
|
||||
// get a proper chaos name
|
||||
swprintf(NameStr, pSoldier->GetName());
|
||||
|
||||
SetFont( TINYFONT1 );
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
|
||||
FindFontCenterCoordinates( sXPos, (INT16)( sYPos + 20 ), (INT16)(80 ), 1, NameStr, TINYFONT1, &sX, &sY );
|
||||
gprintfdirty( sX, sY, NameStr );
|
||||
mprintf( sX, sY, NameStr );
|
||||
}
|
||||
else if (gGameExternalOptions.fCivGroupName == TRUE && pSoldier->ubCivilianGroup > 0 )
|
||||
{
|
||||
if (zCivGroupName[pSoldier->ubCivilianGroup].Enabled == 1)
|
||||
@@ -2181,7 +2212,21 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
#endif
|
||||
if ( pSoldier->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
if (gGameExternalOptions.fEnemyNames == TRUE && gGameExternalOptions.fEnemyRank == FALSE)
|
||||
// Flugente: soldier profiles
|
||||
if ( gGameExternalOptions.fSoldierProfiles_Enemy && pSoldier->usSoldierProfile )
|
||||
{
|
||||
// get a proper chaos name
|
||||
swprintf(NameStr, pSoldier->GetName());
|
||||
|
||||
SetFont( TINYFONT1 );
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
|
||||
FindFontCenterCoordinates( sXPos, (INT16)( sYPos + 20 ), (INT16)(80 ), 1, NameStr, TINYFONT1, &sX, &sY );
|
||||
gprintfdirty( sX, sY, NameStr );
|
||||
mprintf( sX, sY, NameStr );
|
||||
}
|
||||
else if (gGameExternalOptions.fEnemyNames == TRUE && gGameExternalOptions.fEnemyRank == FALSE)
|
||||
{
|
||||
for( iCounter2 = 0; iCounter2 < 500; ++iCounter2 )
|
||||
{
|
||||
@@ -2230,6 +2275,20 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
}
|
||||
}
|
||||
}
|
||||
// Flugente: soldier profiles
|
||||
else if ( pSoldier->bTeam == MILITIA_TEAM && gGameExternalOptions.fSoldierProfiles_Militia && pSoldier->usSoldierProfile )
|
||||
{
|
||||
// get a proper chaos name
|
||||
swprintf(NameStr, pSoldier->GetName());
|
||||
|
||||
SetFont( TINYFONT1 );
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
|
||||
FindFontCenterCoordinates( sXPos, (INT16)( sYPos + 20 ), (INT16)(80 ), 1, NameStr, TINYFONT1, &sX, &sY );
|
||||
gprintfdirty( sX, sY, NameStr );
|
||||
mprintf( sX, sY, NameStr );
|
||||
}
|
||||
else if (gGameExternalOptions.fCivGroupName == TRUE && pSoldier->ubCivilianGroup > 0 )
|
||||
{
|
||||
if (zCivGroupName[pSoldier->ubCivilianGroup].Enabled == 1)
|
||||
|
||||
Reference in New Issue
Block a user