mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- new feature: backgrounds allow more personalisation of mercenaries
- background feature replaces overheating on startup screen, moved overheating opion to ini WARNING: GameDir revision >= 1748 is required. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6353 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+41
-2
@@ -35,7 +35,10 @@
|
||||
#include "Soldier Macros.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
|
||||
#include "IMP Skill Trait.h" // added by Flugente
|
||||
#include "Map Screen Interface.h" // added by Flugente
|
||||
#include "Interface.h" // added by Flugente
|
||||
#include "IMP Background.h" // added by Flugente for AssignBackgroundHelpText()
|
||||
|
||||
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
@@ -1673,6 +1676,44 @@ void DisplayCharStats(INT32 iId, INT32 iSlot)
|
||||
mprintf(sX,pPersonnelScreenPoints[iCounter].y,sString);
|
||||
break;
|
||||
|
||||
// Added by Flugente
|
||||
case 16:
|
||||
// Background
|
||||
|
||||
// display background
|
||||
if ( gGameOptions.fBackGround )
|
||||
{
|
||||
UINT8 loc = 21;
|
||||
UINT8 regionnr = 12;
|
||||
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[loc].y + 15), L"Background:");
|
||||
|
||||
if ( !gMercProfiles[pSoldier->ubProfile].usBackground )
|
||||
swprintf(sString, L"unknown");
|
||||
else
|
||||
swprintf(sString, zBackground[ gMercProfiles[pSoldier->ubProfile].usBackground ].szShortName);
|
||||
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x+(iSlot*TEXT_BOX_WIDTH)),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX,(pPersonnelScreenPoints[loc].y + 15),sString);
|
||||
|
||||
// Add specific region for fast help window
|
||||
if( fAddedTraitRegion[regionnr] )
|
||||
{
|
||||
MSYS_RemoveRegion( &gSkillTraitHelpTextRegion[regionnr] );
|
||||
}
|
||||
MSYS_DefineRegion( &gSkillTraitHelpTextRegion[regionnr], ( sX - 3 ), (UINT16)( pPersonnelScreenPoints[loc].y + 15),
|
||||
( sX + StringPixLength(sString,PERS_FONT) + 3 ), (UINT16)( pPersonnelScreenPoints[loc].y + 23 ), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, NULL );
|
||||
|
||||
MSYS_AddRegion( &gSkillTraitHelpTextRegion[regionnr] );
|
||||
fAddedTraitRegion[regionnr] = TRUE;
|
||||
|
||||
// Info about our background
|
||||
AssignBackgroundHelpText( gMercProfiles[pSoldier->ubProfile].usBackground, &(gSkillTraitHelpTextRegion[12]) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// Added by SANDRO
|
||||
case 15:
|
||||
@@ -8664,5 +8705,3 @@ INT8 CalculateMercsAchievemntPercentage( INT32 IMercId )
|
||||
else
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user