mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Skill Tooltip on Merc Portrait (by Buggler)
- Skills/Traits tooltip over merc portrait in Tactical & Strategic screen - Fixed Traits tooltip on 'more' popup in personnel screen - Increased Energy Bar Color Contrast - Swapped Mechanical & Explosive Skill in Tactical & Strategic screen to standardize across all screens including AIM, MERC & Personnel screen Optional Skill Tooltip On Merc Portrait (by Buggler) - Option to show skill/traits tooltip on merc portrait in AIM/MERC hire screen - Enhanced merc inventory tooltip to show full BR info in AIM/MERC hire screen - Fixed BR heavy weapon AP tooltip display bug - Fixed MERC Exp Lv statistic color git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5802 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -846,6 +846,9 @@ void LoadGameExternalOptions()
|
||||
// CHRISL: New setting to allow Slay to remain as a hired PC
|
||||
gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("Recruitment Settings", "SLAY_STAYS_FOREVER", FALSE);
|
||||
|
||||
// Buggler: setting to show/hide skills/traits in AIM & MERC hiring page
|
||||
gGameExternalOptions.fShowSkillsInHirePage = iniReader.ReadBoolean("Recruitment Settings", "SHOW_SKILLS_IN_HIRING_PAGE", FALSE);
|
||||
|
||||
//################# Financial Settings #################
|
||||
|
||||
gGameExternalOptions.iStartingCashNovice = iniReader.ReadInteger("Financial Settings", "STARTING_CASH_NOVICE",45000, 2000, 0x0FFFFFFF);
|
||||
|
||||
@@ -1124,6 +1124,8 @@ typedef struct
|
||||
|
||||
UINT8 ubChanceTonyAvailable; // silversurfer/SANDRO
|
||||
|
||||
BOOLEAN fShowSkillsInHirePage;
|
||||
|
||||
BOOLEAN fBobbyRayFastShipments;
|
||||
|
||||
BOOLEAN fGridExitInTurnBased;
|
||||
|
||||
+92
-4
@@ -45,6 +45,7 @@
|
||||
#include "Sound Control.h"
|
||||
#include "Quests.h"
|
||||
#include "strategicmap.h"
|
||||
#include "Personnel.h"
|
||||
#endif
|
||||
|
||||
#include "Strategic Town Loyalty.h"
|
||||
@@ -658,6 +659,7 @@ extern void HelpTextDoneCallback( void );
|
||||
|
||||
//tais: tooltip regions for weaponbox images
|
||||
MOUSE_REGION gWeaponboxFasthelpRegion[WEAPONBOX_TOTAL_ITEMS];
|
||||
extern void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber );
|
||||
|
||||
|
||||
//*******************************************
|
||||
@@ -1242,7 +1244,7 @@ BOOLEAN RenderAIMMembers()
|
||||
}
|
||||
|
||||
|
||||
//if we are to renbder the 'click face' text
|
||||
//if we are to render the 'click face' text
|
||||
if( gfAimMemberDisplayFaceHelpText )
|
||||
{
|
||||
DisplayAimMemberClickOnFaceHelpText();
|
||||
@@ -1567,7 +1569,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
HVOBJECT hVObject;
|
||||
UINT32 usHeight, usWidth;
|
||||
ETRLEObject *pTrav;
|
||||
CHAR16 gzItemName[ SIZE_ITEM_NAME ];
|
||||
CHAR16 gzItemName[ 5000 ];
|
||||
UINT8 ubItemCount=0;
|
||||
UINT8 ubColumnCount=0;
|
||||
|
||||
@@ -1641,8 +1643,8 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
|
||||
DrawTextToScreen( zTempStr, (UINT16)(PosX-1), (UINT16)(PosY+20), AIM_MEMBER_WEAPON_NAME_WIDTH, AIM_M_FONT_DYNAMIC_TEXT, AIM_M_WEAPON_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
}
|
||||
|
||||
wcscpy( gzItemName, ShortItemNames[ usItem ] );
|
||||
|
||||
GetHelpTextForItemInLaptop( gzItemName, usItem );
|
||||
SetRegionFastHelpText( &(gWeaponboxFasthelpRegion[ubItemCount-1]), gzItemName );
|
||||
SetRegionHelpEndCallback( &(gWeaponboxFasthelpRegion[ubItemCount-1]), HelpTextDoneCallback );
|
||||
MSYS_EnableRegion( &gWeaponboxFasthelpRegion[ubItemCount-1] );
|
||||
@@ -5562,6 +5564,8 @@ void DisplayPopUpBoxExplainingMercArrivalLocationAndTimeCallBack( UINT8 bExitVal
|
||||
|
||||
void DisplayAimMemberClickOnFaceHelpText()
|
||||
{
|
||||
CHAR16 sString[ 128 ], sTemp[ 20 ];
|
||||
|
||||
if(gGameExternalOptions.gfUseNewStartingGearInterface)
|
||||
{
|
||||
//display the 'left click' onscreen help msg a bit to the right
|
||||
@@ -5577,6 +5581,90 @@ void DisplayAimMemberClickOnFaceHelpText()
|
||||
//display the 'right click' onscreen help msg
|
||||
DrawTextToScreen( AimMemberText[2], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
DrawTextToScreen( AimMemberText[3], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
// Buggler: skills/traits tooltip on merc portrait
|
||||
if( gGameExternalOptions.fShowSkillsInHirePage == TRUE )
|
||||
{
|
||||
// clear string value
|
||||
swprintf( sString, L"");
|
||||
|
||||
if (gGameOptions.fNewTraitSystem) // SANDRO - old/new traits check
|
||||
{
|
||||
UINT8 ubTempSkillArray[30];
|
||||
INT8 bNumSkillTraits = 0;
|
||||
|
||||
// lets rearrange our skills to a temp array
|
||||
// we also get the number of lines (skills) to be displayed
|
||||
for ( UINT8 ubCnt = 1; ubCnt < NUM_SKILLTRAITS_NT; ubCnt++ )
|
||||
{
|
||||
if ( ProfileHasSkillTrait( gbCurrentSoldier, ubCnt ) == 2 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = (ubCnt + NEWTRAIT_MERCSKILL_EXPERTOFFSET);
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
else if ( ProfileHasSkillTrait( gbCurrentSoldier, ubCnt ) == 1 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = ubCnt;
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNumSkillTraits == 0 )
|
||||
{
|
||||
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
||||
{
|
||||
// Flugente: as the whole trait display is fubar, we have to to a special treatment here for new traits
|
||||
UINT8 display1 = ubTempSkillArray[ubCnt];
|
||||
if ( display1 > SCOUTING_NT + NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
else if ( display1 >= AMBIDEXTROUS_NT && display1 <= SCOUTING_NT )
|
||||
display1++;
|
||||
else if ( display1 == NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
|
||||
swprintf( sTemp, L"%s\n", gzMercSkillTextNew[ display1 ] );
|
||||
wcscat( sString, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT8 bSkill1 = 0, bSkill2 = 0;
|
||||
bSkill1 = gMercProfiles[ gbCurrentSoldier ].bSkillTraits[0];
|
||||
bSkill2 = gMercProfiles[ gbCurrentSoldier ].bSkillTraits[1];
|
||||
|
||||
if ( bSkill1 == 0 && bSkill2 == 0 )
|
||||
{
|
||||
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//if the 2 skills are the same, add the '(expert)' at the end
|
||||
if( bSkill1 == bSkill2 )
|
||||
{
|
||||
swprintf( sString, L"%s %s", gzMercSkillText[bSkill1], gzMercSkillText[EXPERT] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display the first skill
|
||||
if( bSkill1 != 0 )
|
||||
{
|
||||
swprintf( sString, L"%s\n", gzMercSkillText[bSkill1] );
|
||||
}
|
||||
if( bSkill2 != 0 )
|
||||
{
|
||||
swprintf( sTemp, L"%s", gzMercSkillText[bSkill2] );
|
||||
wcscat( sString, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SetRegionFastHelpText( &gSelectedFaceRegion, sString );
|
||||
}
|
||||
}
|
||||
|
||||
void CreateWeaponBoxMouseRegions()
|
||||
|
||||
+386
-378
@@ -351,6 +351,10 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass );
|
||||
void OutOfStockMessageBoxCallBack( UINT8 bExitValue );
|
||||
UINT8 CheckPlayersInventoryForGunMatchingGivenAmmoID( INT16 sItemID );
|
||||
void BobbyrRGunsHelpTextDoneCallBack( void );
|
||||
|
||||
//Buggler: Seperated function for easy code reuse
|
||||
void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber );
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
void ReportBobbyROrderError( UINT16 usItemNumber, UINT8 ubPurchaseNum, UINT8 ubQtyOnHand, UINT8 ubNumPurchasing );
|
||||
#endif
|
||||
@@ -2694,8 +2698,7 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
||||
void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers )
|
||||
{
|
||||
UINT8 i;
|
||||
CHAR16 zItemName[ SIZE_ITEM_NAME ];
|
||||
UINT8 ubItemCount=0;
|
||||
UINT16 usItem;
|
||||
// HEADROCK HAM 3: Increased size, to allow larger tooltips. Used for Attachments Shown on Tooltips feature.
|
||||
// Please note, if a mod introduces a weapon that can take several hundred attachments, this value MIGHT overflow.
|
||||
// I do not have the expertise to think of a better solution. Still, 5000 is enough for around 200 possible attachments,
|
||||
@@ -2713,383 +2716,9 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
||||
MSYS_AddRegion(&gSelectedBigImageRegion[ i ]);
|
||||
MSYS_SetRegionUserData( &gSelectedBigImageRegion[ i ], 0, i);
|
||||
|
||||
usItem = pItemNumbers[ i ];
|
||||
|
||||
//get item weight
|
||||
FLOAT fWeight = GetWeightBasedOnMetricOption(Item[ pItemNumbers[ i ] ].ubWeight)/10;
|
||||
|
||||
|
||||
switch( Item[ pItemNumbers[ i ] ].usItemClass )
|
||||
{
|
||||
case IC_GUN:
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now take a negative modifier.
|
||||
//UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
|
||||
UINT16 gunDamage = (UINT16)GetModifiedGunDamage( Weapon[ pItemNumbers[ i ] ].ubImpact );
|
||||
UINT16 readyAPs = (UINT16)(( Weapon[ pItemNumbers[ i ] ].ubReadyTime * (100 - Item[ pItemNumbers[ i ] ].percentreadytimeapreduction)) / 100);
|
||||
UINT16 gunRange = (UINT16)GetModifiedGunRange(pItemNumbers[ i ]);
|
||||
|
||||
//Calculate AP's
|
||||
CHAR16 apStr[20];
|
||||
CHAR16 apStr2[20];
|
||||
OBJECTTYPE pObject;
|
||||
|
||||
// HEADROCK HAM 3: Variables for "Possible Attachment List"
|
||||
BOOLEAN fAttachmentsFound = FALSE;
|
||||
// Contains entire string of attachment names
|
||||
CHAR16 attachStr[3900];
|
||||
// Contains current attachment string
|
||||
CHAR16 attachStr2[100];
|
||||
// Contains temporary attachment list before added to string constant from text.h
|
||||
CHAR16 attachStr3[3900];
|
||||
UINT16 usAttachment;
|
||||
|
||||
CreateItem(pItemNumbers[ i ], 100, &pObject);
|
||||
INT16 ubAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL );
|
||||
|
||||
if ( Weapon[ pItemNumbers[ i ] ].NoSemiAuto )
|
||||
swprintf( apStr, L"-" );
|
||||
else
|
||||
swprintf( apStr, L"%d", ubAttackAPs );
|
||||
|
||||
if (GetShotsPerBurst(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( APBPConstants[DEFAULT_APS], &pObject, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
if (GetAutofireShotsPerFiveAPs(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( APBPConstants[DEFAULT_APS], &pObject, 3, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
// HEADROCK HAM 3: Empty these strings first, to avoid crashes. Please keep this here.
|
||||
swprintf( attachStr, L"" );
|
||||
swprintf( attachStr2, L"" );
|
||||
swprintf( attachStr3, L"" );
|
||||
|
||||
// HEADROCK HAM 3: Generate list of possible attachments to a gun (Guns only!)
|
||||
if (gGameExternalOptions.fBobbyRayTooltipsShowAttachments)
|
||||
{
|
||||
UINT16 iLoop = 0;
|
||||
// Check entire attachment list
|
||||
while( 1 )
|
||||
{
|
||||
//Madd: Common Attachment Framework
|
||||
//TODO: Note that the items in this list will be duplicated if they are present in both the CAF and the old attachment method
|
||||
//need to refactor this to work more like the NAS attachment slots method
|
||||
usAttachment = 0;
|
||||
if ( IsAttachmentPointAvailable(Item[pItemNumbers[ i ]].uiIndex, iLoop) )
|
||||
{
|
||||
usAttachment = iLoop;
|
||||
// If the attachment is not hidden
|
||||
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
|
||||
{
|
||||
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{// Add the attachment's name to the list.
|
||||
fAttachmentsFound = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
|
||||
wcscat( attachStr3, attachStr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the weapon we're checking the same as the one we're tooltipping?
|
||||
usAttachment = 0;
|
||||
if (Attachment[iLoop][1] == Item[pItemNumbers[ i ]].uiIndex)
|
||||
{
|
||||
usAttachment = Attachment[iLoop][0];
|
||||
}
|
||||
|
||||
// If the attachment is not hidden
|
||||
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
|
||||
{
|
||||
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{// Add the attachment's name to the list.
|
||||
fAttachmentsFound = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
|
||||
wcscat( attachStr3, attachStr2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
iLoop++;
|
||||
if (Attachment[iLoop][0] == 0 && Item[iLoop].usItemClass == 0)
|
||||
{
|
||||
// Reached end of list
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fAttachmentsFound)
|
||||
{
|
||||
// Add extra empty line and attachment list title
|
||||
swprintf( attachStr, L"\n \n%s", gWeaponStatsDesc[ 14 ] );
|
||||
wcscat( attachStr, attachStr3 );
|
||||
}
|
||||
}
|
||||
|
||||
//Sum up default attachments.
|
||||
BOOLEAN fFoundDefault = FALSE;
|
||||
swprintf( attachStr2, L"" );
|
||||
swprintf( attachStr3, L"" );
|
||||
for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++){
|
||||
if(Item[pItemNumbers[ i ]].defaultattachments[cnt] != 0){
|
||||
if (wcslen( attachStr ) + wcslen(attachStr3) + wcslen(Item[ Item[pItemNumbers[ i ]].defaultattachments[cnt] ].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
fFoundDefault = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ Item[pItemNumbers[ i ]].defaultattachments[cnt] ].szItemName );
|
||||
wcscat( attachStr3, attachStr2 );
|
||||
} else {
|
||||
//If we found an empty entry, we can assume the rest will be empty too.
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(fFoundDefault){
|
||||
//Found at least one default attachment, write it to the attachment string.
|
||||
CHAR16 defaultStr[50];
|
||||
swprintf( defaultStr, L"\n \n%s", gWeaponStatsDesc[ 17 ] );
|
||||
wcscat( attachStr, defaultStr );
|
||||
wcscat( attachStr, attachStr3 );
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3: Added last string (attachStr), for display of the possible attachment list.
|
||||
// If the feature is deactivated, the attachStr will simply be empty at this point
|
||||
// (remember? we emptied it earlier!).
|
||||
INT8 accuracy = (UsingNewCTHSystem()==true?Weapon[ pItemNumbers[ i ] ].nAccuracy:Weapon[ pItemNumbers[ i ] ].bAccuracy);
|
||||
swprintf( pStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s (%d) %s\n%s %1.1f %s%s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
AmmoCaliber[ Weapon[ pItemNumbers[ i ] ].ubCalibre ],
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
accuracy, //Accuracy
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
gunDamage, //Gun damage
|
||||
gWeaponStatsDesc[ 10 ], //Range String
|
||||
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? gunRange/10 : gunRange, //Gun Range
|
||||
gWeaponStatsDesc[ 6 ], //AP String
|
||||
readyAPs,
|
||||
apStr, //AP's
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString(), //Weight units
|
||||
attachStr
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_LAUNCHER:
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now take a negative modifier.
|
||||
UINT16 gunDamage = (UINT16)GetModifiedGunDamage( Weapon[ pItemNumbers[ i ] ].ubImpact );
|
||||
UINT16 readyAPs = (UINT16)(( Weapon[ pItemNumbers[ i ] ].ubReadyTime * (100 - Item[ pItemNumbers[ i ] ].percentreadytimeapreduction)) / 100);
|
||||
UINT16 usRange = (UINT16)GetModifiedGunRange(pItemNumbers[ i ]);
|
||||
INT8 accuracy = (UsingNewCTHSystem()==true?Weapon[ pItemNumbers[ i ] ].nAccuracy:Weapon[ pItemNumbers[ i ] ].bAccuracy);
|
||||
//UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
|
||||
|
||||
//Calculate AP's
|
||||
CHAR16 apStr[20];
|
||||
CHAR16 apStr2[20];
|
||||
OBJECTTYPE pObject;
|
||||
|
||||
CreateItem(pItemNumbers[ i ], 100, &pObject);
|
||||
INT16 ubAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL );
|
||||
|
||||
if ( Weapon[ pItemNumbers[ i ] ].NoSemiAuto )
|
||||
swprintf( apStr, L"-" );
|
||||
else
|
||||
swprintf( apStr2, L"%d", ubAttackAPs );
|
||||
wcscat( apStr, apStr2 );
|
||||
|
||||
if (GetShotsPerBurst(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( APBPConstants[DEFAULT_APS], &pObject, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
if (GetAutofireShotsPerFiveAPs(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( APBPConstants[DEFAULT_APS], &pObject, 3, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
swprintf( pStr, L"%s\n%s %d\n%s %d\n%s %d\n%s (%d) %s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
accuracy, //Accuracy
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
gunDamage, //Gun damage
|
||||
gWeaponStatsDesc[ 10 ], //Range String
|
||||
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? usRange/10 : usRange, //Gun Range
|
||||
gWeaponStatsDesc[ 6 ], //AP String
|
||||
readyAPs,
|
||||
apStr, //AP's
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_BLADE:
|
||||
case IC_THROWING_KNIFE:
|
||||
case IC_PUNCH:
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now take a negative modifier
|
||||
//UINT16 meleeDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubMeleeDamageMultiplier );
|
||||
//UINT16 meleeDamage = (UINT16)GetModifiedMeleeDamage( Weapon[ pItemNumbers[ i ] ].ubImpact );
|
||||
OBJECTTYPE pObject;
|
||||
|
||||
CreateItem(pItemNumbers[ i ], 100, &pObject);
|
||||
swprintf( pStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
GetDamage(&pObject), //Melee damage
|
||||
gWeaponStatsDesc[ 6 ], //AP String
|
||||
BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL ), //AP's
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_AMMO:
|
||||
{
|
||||
swprintf( pStr, L"%s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ], //Item long name
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
|
||||
//Lal: do not delete, commented out for next version
|
||||
//swprintf( pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s",
|
||||
// AmmoCaliber[ Magazine[ Item[usItem].ubClassIndex ].ubCalibre ], //Ammo calibre
|
||||
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
||||
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
||||
// Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity
|
||||
// (*pObject)[0]->data.ubShotsLeft, //Shots left
|
||||
// gWeaponStatsDesc[ 12 ], //Weight String
|
||||
// fWeight, //Weight
|
||||
// GetWeightUnitString() //Weight units
|
||||
// );
|
||||
|
||||
//specify the help text only if the items is ammo
|
||||
//and only if the user has an item that can use the particular type of ammo
|
||||
ubItemCount = CheckPlayersInventoryForGunMatchingGivenAmmoID( pItemNumbers[ i ] );
|
||||
if( ubItemCount != 0 )
|
||||
{
|
||||
swprintf( zItemName, L"\n%s %d %s",BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_1], ubItemCount, BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_2] );
|
||||
wcscat( pStr, zItemName );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_GRENADE:
|
||||
case IC_BOMB:
|
||||
// explosives
|
||||
//if ( (Item[ pItemNumbers[ i ] ].usItemClass == IC_GRENADE)||(Item[ pItemNumbers[ i ] ].usItemClass == IC_BOMB) )
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now use negative modifier.
|
||||
//UINT16 explDamage = (UINT16)( Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubDamage + ( (double) Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubDamage / 100) * gGameExternalOptions.bExplosivesDamageModifier );
|
||||
//UINT16 explStunDamage = (UINT16)( Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubStunDamage + ( (double) Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubStunDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier );
|
||||
UINT16 explDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubDamage );
|
||||
UINT16 explStunDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ pItemNumbers[ i ] ].ubClassIndex].ubStunDamage );
|
||||
|
||||
|
||||
swprintf( pStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ],
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
explDamage, //Expl damage
|
||||
gWeaponStatsDesc[ 13 ], //Stun Damage String
|
||||
explStunDamage, //Stun Damage
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_ARMOUR:
|
||||
//Armor
|
||||
//if (Item[ pItemNumbers[ i ] ].usItemClass == IC_ARMOUR)
|
||||
{
|
||||
INT32 iProtection = Armour[ Item[ pItemNumbers[ i ] ].ubClassIndex ].ubProtection;
|
||||
|
||||
switch( Armour[ Item[ pItemNumbers[ i ] ].ubClassIndex ].ubArmourClass )
|
||||
{
|
||||
case( ARMOURCLASS_HELMET ):
|
||||
iProtection = 15 * iProtection / Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubProtection;
|
||||
break;
|
||||
|
||||
case( ARMOURCLASS_VEST ):
|
||||
iProtection = 65 * iProtection / ( Armour[ Item[ SPECTRA_VEST_18 ].ubClassIndex ].ubProtection + Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection );
|
||||
break;
|
||||
|
||||
case( ARMOURCLASS_LEGGINGS ):
|
||||
iProtection = 25 * iProtection / Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubProtection;
|
||||
break;
|
||||
|
||||
case( ARMOURCLASS_PLATE ):
|
||||
iProtection = 65 * iProtection / ( Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection );
|
||||
break;
|
||||
}
|
||||
|
||||
swprintf( pStr, L"%s\n%s %d%% (%d)\n%s %d%%\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ], //Item long name
|
||||
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||
iProtection, //Protection rating in % based on best armor
|
||||
Armour[ Item[ pItemNumbers[ i ] ].ubClassIndex ].ubProtection, //Protection (raw data)
|
||||
pInvPanelTitleStrings[ 3 ], //Camo string
|
||||
Item[ pItemNumbers[ i ] ].camobonus, //Camo bonus
|
||||
gWeaponStatsDesc[ 12 ], //Weight string
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_MISC:
|
||||
case IC_MEDKIT:
|
||||
case IC_KIT:
|
||||
case IC_FACE:
|
||||
default:
|
||||
// The final, and typical case, is that of an item with a percent status
|
||||
{
|
||||
swprintf( pStr, L"%s\n%s %1.1f %s",
|
||||
ItemNames[ pItemNumbers[ i ] ], //Item long name
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GetHelpTextForItemInLaptop( pStr, usItem );
|
||||
|
||||
SetRegionFastHelpText( &gSelectedBigImageRegion[ i ], pStr );
|
||||
SetRegionHelpEndCallback( &gSelectedBigImageRegion[ i ], BobbyrRGunsHelpTextDoneCallBack );
|
||||
@@ -4291,3 +3920,382 @@ void HandleBobbyRGunsKeyBoardInput()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
|
||||
{
|
||||
CHAR16 zItemName[ SIZE_ITEM_NAME ];
|
||||
UINT8 ubItemCount=0;
|
||||
|
||||
//get item weight
|
||||
FLOAT fWeight = GetWeightBasedOnMetricOption(Item[ usItemNumber ].ubWeight)/10;
|
||||
|
||||
switch( Item[ usItemNumber ].usItemClass )
|
||||
{
|
||||
case IC_GUN:
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now take a negative modifier.
|
||||
//UINT16 gunDamage = (UINT16)( Weapon[ usItemNumber ].ubImpact + ( (double) Weapon[ usItemNumber ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
|
||||
UINT16 gunDamage = (UINT16)GetModifiedGunDamage( Weapon[ usItemNumber ].ubImpact );
|
||||
UINT16 readyAPs = (UINT16)(( Weapon[ usItemNumber ].ubReadyTime * (100 - Item[ usItemNumber ].percentreadytimeapreduction)) / 100);
|
||||
UINT16 gunRange = (UINT16)GetModifiedGunRange(usItemNumber);
|
||||
|
||||
//Calculate AP's
|
||||
CHAR16 apStr[20];
|
||||
CHAR16 apStr2[20];
|
||||
OBJECTTYPE pObject;
|
||||
|
||||
// HEADROCK HAM 3: Variables for "Possible Attachment List"
|
||||
BOOLEAN fAttachmentsFound = FALSE;
|
||||
// Contains entire string of attachment names
|
||||
CHAR16 attachStr[3900];
|
||||
// Contains current attachment string
|
||||
CHAR16 attachStr2[100];
|
||||
// Contains temporary attachment list before added to string constant from text.h
|
||||
CHAR16 attachStr3[3900];
|
||||
UINT16 usAttachment;
|
||||
|
||||
CreateItem(usItemNumber, 100, &pObject);
|
||||
INT16 ubAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL );
|
||||
|
||||
if ( Weapon[ usItemNumber ].NoSemiAuto )
|
||||
swprintf( apStr, L"-" );
|
||||
else
|
||||
swprintf( apStr, L"%d", ubAttackAPs );
|
||||
|
||||
if (GetShotsPerBurst(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( APBPConstants[DEFAULT_APS], &pObject, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
if (GetAutofireShotsPerFiveAPs(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( APBPConstants[DEFAULT_APS], &pObject, 3, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
// HEADROCK HAM 3: Empty these strings first, to avoid crashes. Please keep this here.
|
||||
swprintf( attachStr, L"" );
|
||||
swprintf( attachStr2, L"" );
|
||||
swprintf( attachStr3, L"" );
|
||||
|
||||
// HEADROCK HAM 3: Generate list of possible attachments to a gun (Guns only!)
|
||||
if (gGameExternalOptions.fBobbyRayTooltipsShowAttachments)
|
||||
{
|
||||
UINT16 iLoop = 0;
|
||||
// Check entire attachment list
|
||||
while( 1 )
|
||||
{
|
||||
//Madd: Common Attachment Framework
|
||||
//TODO: Note that the items in this list will be duplicated if they are present in both the CAF and the old attachment method
|
||||
//need to refactor this to work more like the NAS attachment slots method
|
||||
usAttachment = 0;
|
||||
if ( IsAttachmentPointAvailable(Item[usItemNumber].uiIndex, iLoop) )
|
||||
{
|
||||
usAttachment = iLoop;
|
||||
// If the attachment is not hidden
|
||||
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
|
||||
{
|
||||
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{// Add the attachment's name to the list.
|
||||
fAttachmentsFound = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
|
||||
wcscat( attachStr3, attachStr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the weapon we're checking the same as the one we're tooltipping?
|
||||
usAttachment = 0;
|
||||
if (Attachment[iLoop][1] == Item[usItemNumber].uiIndex)
|
||||
{
|
||||
usAttachment = Attachment[iLoop][0];
|
||||
}
|
||||
|
||||
// If the attachment is not hidden
|
||||
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
|
||||
{
|
||||
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{// Add the attachment's name to the list.
|
||||
fAttachmentsFound = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
|
||||
wcscat( attachStr3, attachStr2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
iLoop++;
|
||||
if (Attachment[iLoop][0] == 0 && Item[iLoop].usItemClass == 0)
|
||||
{
|
||||
// Reached end of list
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fAttachmentsFound)
|
||||
{
|
||||
// Add extra empty line and attachment list title
|
||||
swprintf( attachStr, L"\n \n%s", gWeaponStatsDesc[ 14 ] );
|
||||
wcscat( attachStr, attachStr3 );
|
||||
}
|
||||
}
|
||||
|
||||
//Sum up default attachments.
|
||||
BOOLEAN fFoundDefault = FALSE;
|
||||
swprintf( attachStr2, L"" );
|
||||
swprintf( attachStr3, L"" );
|
||||
for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++){
|
||||
if(Item[usItemNumber].defaultattachments[cnt] != 0){
|
||||
if (wcslen( attachStr ) + wcslen(attachStr3) + wcslen(Item[ Item[usItemNumber].defaultattachments[cnt] ].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
fFoundDefault = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ Item[usItemNumber].defaultattachments[cnt] ].szItemName );
|
||||
wcscat( attachStr3, attachStr2 );
|
||||
} else {
|
||||
//If we found an empty entry, we can assume the rest will be empty too.
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(fFoundDefault){
|
||||
//Found at least one default attachment, write it to the attachment string.
|
||||
CHAR16 defaultStr[50];
|
||||
swprintf( defaultStr, L"\n \n%s", gWeaponStatsDesc[ 17 ] );
|
||||
wcscat( attachStr, defaultStr );
|
||||
wcscat( attachStr, attachStr3 );
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3: Added last string (attachStr), for display of the possible attachment list.
|
||||
// If the feature is deactivated, the attachStr will simply be empty at this point
|
||||
// (remember? we emptied it earlier!).
|
||||
INT8 accuracy = (UsingNewCTHSystem()==true?Weapon[ usItemNumber ].nAccuracy:Weapon[ usItemNumber ].bAccuracy);
|
||||
swprintf( pzStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s (%d) %s\n%s %1.1f %s%s",
|
||||
ItemNames[ usItemNumber ],
|
||||
AmmoCaliber[ Weapon[ usItemNumber ].ubCalibre ],
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
accuracy, //Accuracy
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
gunDamage, //Gun damage
|
||||
gWeaponStatsDesc[ 10 ], //Range String
|
||||
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? gunRange/10 : gunRange, //Gun Range
|
||||
gWeaponStatsDesc[ 6 ], //AP String
|
||||
readyAPs,
|
||||
apStr, //AP's
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString(), //Weight units
|
||||
attachStr
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_LAUNCHER:
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now take a negative modifier.
|
||||
UINT16 gunDamage = (UINT16)GetModifiedGunDamage( Weapon[ usItemNumber ].ubImpact );
|
||||
UINT16 readyAPs = (UINT16)(( Weapon[ usItemNumber ].ubReadyTime * (100 - Item[ usItemNumber ].percentreadytimeapreduction)) / 100);
|
||||
UINT16 usRange = (UINT16)GetModifiedGunRange(usItemNumber);
|
||||
INT8 accuracy = (UsingNewCTHSystem()==true?Weapon[ usItemNumber ].nAccuracy:Weapon[ usItemNumber ].bAccuracy);
|
||||
//UINT16 gunDamage = (UINT16)( Weapon[ usItemNumber ].ubImpact + ( (double) Weapon[ usItemNumber ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
|
||||
|
||||
//Calculate AP's
|
||||
CHAR16 apStr[20];
|
||||
CHAR16 apStr2[20];
|
||||
OBJECTTYPE pObject;
|
||||
|
||||
CreateItem(usItemNumber, 100, &pObject);
|
||||
INT16 ubAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL );
|
||||
|
||||
if ( Weapon[ usItemNumber ].NoSemiAuto )
|
||||
swprintf( apStr, L"-" );
|
||||
else
|
||||
swprintf( apStr, L"%d", ubAttackAPs );
|
||||
|
||||
if (GetShotsPerBurst(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( APBPConstants[DEFAULT_APS], &pObject, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
if (GetAutofireShotsPerFiveAPs(&pObject) > 0)
|
||||
{
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( APBPConstants[DEFAULT_APS], &pObject, 3, NULL ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
swprintf( pzStr, L"%s\n%s %d\n%s %d\n%s %d\n%s (%d) %s\n%s %1.1f %s",
|
||||
ItemNames[ usItemNumber ],
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
accuracy, //Accuracy
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
gunDamage, //Gun damage
|
||||
gWeaponStatsDesc[ 10 ], //Range String
|
||||
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? usRange/10 : usRange, //Gun Range
|
||||
gWeaponStatsDesc[ 6 ], //AP String
|
||||
readyAPs,
|
||||
apStr, //AP's
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_BLADE:
|
||||
case IC_THROWING_KNIFE:
|
||||
case IC_PUNCH:
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now take a negative modifier
|
||||
//UINT16 meleeDamage = (UINT16)( Weapon[ usItemNumber ].ubImpact + ( (double) Weapon[ usItemNumber ].ubImpact / 100) * gGameExternalOptions.ubMeleeDamageMultiplier );
|
||||
//UINT16 meleeDamage = (UINT16)GetModifiedMeleeDamage( Weapon[ usItemNumber ].ubImpact );
|
||||
OBJECTTYPE pObject;
|
||||
|
||||
CreateItem(usItemNumber, 100, &pObject);
|
||||
swprintf( pzStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ usItemNumber ],
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
GetDamage(&pObject), //Melee damage
|
||||
gWeaponStatsDesc[ 6 ], //AP String
|
||||
BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL ), //AP's
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_AMMO:
|
||||
{
|
||||
swprintf( pzStr, L"%s\n%s %1.1f %s",
|
||||
ItemNames[ usItemNumber ], //Item long name
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
|
||||
//Lal: do not delete, commented out for next version
|
||||
//swprintf( pzStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s",
|
||||
// AmmoCaliber[ Magazine[ Item[usItem].ubClassIndex ].ubCalibre ], //Ammo calibre
|
||||
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
||||
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
||||
// Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity
|
||||
// (*pObject)[0]->data.ubShotsLeft, //Shots left
|
||||
// gWeaponStatsDesc[ 12 ], //Weight String
|
||||
// fWeight, //Weight
|
||||
// GetWeightUnitString() //Weight units
|
||||
// );
|
||||
|
||||
//specify the help text only if the items is ammo
|
||||
//and only if the user has an item that can use the particular type of ammo
|
||||
ubItemCount = CheckPlayersInventoryForGunMatchingGivenAmmoID( usItemNumber );
|
||||
if( ubItemCount != 0 )
|
||||
{
|
||||
swprintf( zItemName, L"\n%s %d %s",BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_1], ubItemCount, BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_2] );
|
||||
wcscat( pzStr, zItemName );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_GRENADE:
|
||||
case IC_BOMB:
|
||||
// explosives
|
||||
//if ( (Item[ usItemNumber ].usItemClass == IC_GRENADE)||(Item[ usItemNumber ].usItemClass == IC_BOMB) )
|
||||
{
|
||||
// HEADROCK HAM 3.6: Can now use negative modifier.
|
||||
//UINT16 explDamage = (UINT16)( Explosive[Item[ usItemNumber ].ubClassIndex].ubDamage + ( (double) Explosive[Item[ usItemNumber ].ubClassIndex].ubDamage / 100) * gGameExternalOptions.bExplosivesDamageModifier );
|
||||
//UINT16 explStunDamage = (UINT16)( Explosive[Item[ usItemNumber ].ubClassIndex].ubStunDamage + ( (double) Explosive[Item[ usItemNumber ].ubClassIndex].ubStunDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier );
|
||||
UINT16 explDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItemNumber ].ubClassIndex].ubDamage );
|
||||
UINT16 explStunDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItemNumber ].ubClassIndex].ubStunDamage );
|
||||
|
||||
|
||||
swprintf( pzStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ usItemNumber ],
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
explDamage, //Expl damage
|
||||
gWeaponStatsDesc[ 13 ], //Stun Damage String
|
||||
explStunDamage, //Stun Damage
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_ARMOUR:
|
||||
//Armor
|
||||
//if (Item[ usItemNumber ].usItemClass == IC_ARMOUR)
|
||||
{
|
||||
INT32 iProtection = Armour[ Item[ usItemNumber ].ubClassIndex ].ubProtection;
|
||||
|
||||
switch( Armour[ Item[ usItemNumber ].ubClassIndex ].ubArmourClass )
|
||||
{
|
||||
case( ARMOURCLASS_HELMET ):
|
||||
iProtection = 15 * iProtection / Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubProtection;
|
||||
break;
|
||||
|
||||
case( ARMOURCLASS_VEST ):
|
||||
iProtection = 65 * iProtection / ( Armour[ Item[ SPECTRA_VEST_18 ].ubClassIndex ].ubProtection + Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection );
|
||||
break;
|
||||
|
||||
case( ARMOURCLASS_LEGGINGS ):
|
||||
iProtection = 25 * iProtection / Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubProtection;
|
||||
break;
|
||||
|
||||
case( ARMOURCLASS_PLATE ):
|
||||
iProtection = 65 * iProtection / ( Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection );
|
||||
break;
|
||||
}
|
||||
|
||||
swprintf( pzStr, L"%s\n%s %d%% (%d)\n%s %d%%\n%s %1.1f %s",
|
||||
ItemNames[ usItemNumber ], //Item long name
|
||||
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||
iProtection, //Protection rating in % based on best armor
|
||||
Armour[ Item[ usItemNumber ].ubClassIndex ].ubProtection, //Protection (raw data)
|
||||
pInvPanelTitleStrings[ 3 ], //Camo string
|
||||
Item[ usItemNumber ].camobonus, //Camo bonus
|
||||
gWeaponStatsDesc[ 12 ], //Weight string
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_MISC:
|
||||
case IC_MEDKIT:
|
||||
case IC_KIT:
|
||||
case IC_FACE:
|
||||
default:
|
||||
// The final, and typical case, is that of an item with a percent status
|
||||
{
|
||||
swprintf( pzStr, L"%s\n%s %1.1f %s",
|
||||
ItemNames[ usItemNumber ], //Item long name
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
+10
-10
@@ -1808,23 +1808,23 @@ void DisplayCharStats(INT32 iId, INT32 iSlot)
|
||||
|
||||
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
||||
{
|
||||
// Flugente: as the whole trait display is fubar, we have to to a special treatment here for new traits
|
||||
UINT8 display1 = ubTempSkillArray[ubCnt];
|
||||
if ( display1 > SCOUTING_NT + NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
else if ( display1 >= AMBIDEXTROUS_NT && display1 <= SCOUTING_NT )
|
||||
display1++;
|
||||
else if ( display1 == NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
|
||||
if ( ubCnt >= 4 && bNumSkillTraits > 5 )
|
||||
{
|
||||
fDisplayMoreTraits = TRUE;
|
||||
swprintf( sString, L"%s\n", gzMercSkillTextNew[ ubTempSkillArray[ubCnt] ] );
|
||||
swprintf( sString, L"%s\n", gzMercSkillTextNew[ display1 ] );
|
||||
wcscat( sString2, sString );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flugente: as the whole trait display is fubar, we have to to a special treatment here for new traits
|
||||
UINT8 display1 = ubTempSkillArray[ubCnt];
|
||||
if ( display1 > SCOUTING_NT + NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
else if ( display1 >= AMBIDEXTROUS_NT && display1 <= SCOUTING_NT )
|
||||
display1++;
|
||||
else if ( display1 == NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
|
||||
swprintf( sString, L"%s", gzMercSkillTextNew[ display1 ] );
|
||||
|
||||
if ( ubTempSkillArray[ubCnt] > NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
#include "Queen Command.h"
|
||||
#include "Render Fun.h"
|
||||
#include "Food.h"
|
||||
#include "Personnel.h"
|
||||
#include "mapscreen.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
@@ -232,6 +234,7 @@ BOOLEAN fShowMapScreenMovementList = FALSE;
|
||||
MapScreenCharacterSt gCharactersList[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS+1];
|
||||
|
||||
extern MOUSE_REGION gCharInfoHandRegion;
|
||||
extern MOUSE_REGION gCharInfoFaceRegion;
|
||||
MOUSE_REGION gMapStatusBarsRegion;
|
||||
|
||||
SGPPoint MovePosition={450, 100 };
|
||||
@@ -1942,7 +1945,7 @@ void RemoveMapStatusBarsRegion( void )
|
||||
|
||||
void UpdateCharRegionHelpText( void )
|
||||
{
|
||||
CHAR16 sString[ 128 ];
|
||||
CHAR16 sString[ 128 ], sTemp[ 20 ];
|
||||
CHAR16 pMoraleStr[ 128 ];
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
|
||||
@@ -2031,6 +2034,93 @@ void UpdateCharRegionHelpText( void )
|
||||
|
||||
SetRegionFastHelpText( &gMapStatusBarsRegion, sString );
|
||||
|
||||
// Buggler: skills/traits tooltip on merc portrait
|
||||
if( ( pSoldier->stats.bLife != 0 ) && !AM_A_ROBOT( pSoldier ) && !IsVehicle( pSoldier ) )
|
||||
{
|
||||
// clear pStr value
|
||||
swprintf( sString, L"");
|
||||
|
||||
if (gGameOptions.fNewTraitSystem) // SANDRO - old/new traits check
|
||||
{
|
||||
UINT8 ubTempSkillArray[30];
|
||||
INT8 bNumSkillTraits = 0;
|
||||
|
||||
// lets rearrange our skills to a temp array
|
||||
// we also get the number of lines (skills) to be displayed
|
||||
for ( UINT8 ubCnt = 1; ubCnt < NUM_SKILLTRAITS_NT; ubCnt++ )
|
||||
{
|
||||
if ( ProfileHasSkillTrait( pSoldier->ubProfile, ubCnt ) == 2 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = (ubCnt + NEWTRAIT_MERCSKILL_EXPERTOFFSET);
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
else if ( ProfileHasSkillTrait( pSoldier->ubProfile, ubCnt ) == 1 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = ubCnt;
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNumSkillTraits == 0 )
|
||||
{
|
||||
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
||||
{
|
||||
// Flugente: as the whole trait display is fubar, we have to to a special treatment here for new traits
|
||||
UINT8 display1 = ubTempSkillArray[ubCnt];
|
||||
if ( display1 > SCOUTING_NT + NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
else if ( display1 >= AMBIDEXTROUS_NT && display1 <= SCOUTING_NT )
|
||||
display1++;
|
||||
else if ( display1 == NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
|
||||
swprintf( sTemp, L"%s\n", gzMercSkillTextNew[ display1 ] );
|
||||
wcscat( sString, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT8 bSkill1 = 0, bSkill2 = 0;
|
||||
bSkill1 = gMercProfiles[ pSoldier->ubProfile ].bSkillTraits[0];
|
||||
bSkill2 = gMercProfiles[ pSoldier->ubProfile ].bSkillTraits[1];
|
||||
|
||||
if ( bSkill1 == 0 && bSkill2 == 0 )
|
||||
{
|
||||
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//if the 2 skills are the same, add the '(expert)' at the end
|
||||
if( bSkill1 == bSkill2 )
|
||||
{
|
||||
swprintf( sString, L"%s %s", gzMercSkillText[bSkill1], gzMercSkillText[EXPERT] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display the first skill
|
||||
if( bSkill1 != 0 )
|
||||
{
|
||||
swprintf( sString, L"%s\n", gzMercSkillText[bSkill1] );
|
||||
}
|
||||
if( bSkill2 != 0 )
|
||||
{
|
||||
swprintf( sTemp, L"%s", gzMercSkillText[bSkill2] );
|
||||
wcscat( sString, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SetRegionFastHelpText( &gCharInfoFaceRegion, sString );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRegionFastHelpText( &gCharInfoFaceRegion, L"" );
|
||||
}
|
||||
|
||||
// update CONTRACT button help text
|
||||
if ( CanExtendContractForCharSlot( bSelectedInfoChar ) )
|
||||
|
||||
@@ -147,6 +147,7 @@ BOOLEAN gfBlinkHeader = FALSE;
|
||||
|
||||
// mouse regions in mapscreen proper than must have thier help text disabled then re-enabled
|
||||
extern MOUSE_REGION gMapStatusBarsRegion;
|
||||
extern MOUSE_REGION gCharInfoFaceRegion;
|
||||
extern MOUSE_REGION gCharInfoHandRegion;
|
||||
|
||||
extern INT32 giMapContractButton;
|
||||
@@ -351,6 +352,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
||||
|
||||
// reset the help text for mouse regions
|
||||
SetRegionFastHelpText( &gCharInfoHandRegion, L"" );
|
||||
SetRegionFastHelpText( &gCharInfoFaceRegion, L"" );
|
||||
SetRegionFastHelpText( &gMapStatusBarsRegion, L"" );
|
||||
|
||||
gfDisplayPotentialRetreatPaths = FALSE;
|
||||
|
||||
+37
-37
@@ -296,10 +296,10 @@ int LVL_X;
|
||||
int LVL_Y;
|
||||
int MRK_X;
|
||||
int MRK_Y;
|
||||
int EXP_X;
|
||||
int EXP_Y;
|
||||
int MEC_X;
|
||||
int MEC_Y;
|
||||
int EXP_X;
|
||||
int EXP_Y;
|
||||
int MED_X;
|
||||
int MED_Y;
|
||||
|
||||
@@ -1294,10 +1294,10 @@ BOOLEAN InitializeInvPanelCoordsOld()
|
||||
LVL_Y = AGL_Y;
|
||||
MRK_X = LVL_X;
|
||||
MRK_Y = DEX_Y;
|
||||
EXP_X = LVL_X;
|
||||
EXP_Y = STR_Y;
|
||||
MEC_X = LVL_X;
|
||||
MEC_Y = LDR_Y;
|
||||
MEC_Y = STR_Y;
|
||||
EXP_X = LVL_X;
|
||||
EXP_Y = LDR_Y;
|
||||
MED_X = LVL_X;
|
||||
MED_Y = WIS_Y;
|
||||
|
||||
@@ -1624,10 +1624,10 @@ BOOLEAN InitializeInvPanelCoordsNew()
|
||||
LVL_Y = AGL_Y;
|
||||
MRK_X = LVL_X;
|
||||
MRK_Y = DEX_Y;
|
||||
EXP_X = LVL_X;
|
||||
EXP_Y = STR_Y;
|
||||
MEC_X = LVL_X;
|
||||
MEC_Y = LDR_Y;
|
||||
MEC_Y = STR_Y;
|
||||
EXP_X = LVL_X;
|
||||
EXP_Y = LDR_Y;
|
||||
MED_X = LVL_X;
|
||||
MED_Y = WIS_Y;
|
||||
|
||||
@@ -2157,7 +2157,6 @@ void DrawFace( INT16 sCharNumber )
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if( ( gCharactersList[ bSelectedInfoChar ].usSolID == sOldId )&&( fReDrawFace == FALSE ) )
|
||||
{
|
||||
// are the same, return
|
||||
@@ -2548,34 +2547,6 @@ void DrawCharStats( INT16 sCharNum )
|
||||
FindFontRightCoordinates(MRK_X,MRK_Y,STAT_WID ,STAT_HEI,sString , CHAR_FONT, &usX, &usY);
|
||||
DrawString(sString,usX, MRK_Y,CHAR_FONT );
|
||||
|
||||
// explosives
|
||||
swprintf( sString, L"%d", pSoldier->stats.bExplosive );
|
||||
|
||||
// SANDRO - if damaged stat we could regain, show in red until repaired
|
||||
if( gGameOptions.fNewTraitSystem && ( pSoldier->ubCriticalStatDamage[DAMAGED_STAT_EXPLOSIVES] > 0 ))
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
else if( ( GetJA2Clock() < CHANGE_STAT_RECENTLY_DURATION + pSoldier->timeChanges.uiChangeExplosivesTime)&& ( pSoldier->timeChanges.uiChangeExplosivesTime != 0 ) )
|
||||
{
|
||||
if( pSoldier->usValueGoneUp & EXP_INCREASE )
|
||||
{
|
||||
SetFontForeground( FONT_LTGREEN );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFontForeground(CHAR_TEXT_FONT_COLOR);
|
||||
}
|
||||
|
||||
// right justify
|
||||
FindFontRightCoordinates(EXP_X,EXP_Y,STAT_WID ,STAT_HEI,sString , CHAR_FONT, &usX, &usY);
|
||||
DrawString(sString,usX, EXP_Y,CHAR_FONT );
|
||||
|
||||
// mechanical
|
||||
swprintf( sString, L"%d", pSoldier->stats.bMechanical );
|
||||
|
||||
@@ -2603,6 +2574,34 @@ void DrawCharStats( INT16 sCharNum )
|
||||
// right justify
|
||||
FindFontRightCoordinates(MEC_X,MEC_Y,STAT_WID ,STAT_HEI,sString , CHAR_FONT, &usX, &usY);
|
||||
DrawString(sString,usX, MEC_Y,CHAR_FONT );
|
||||
|
||||
// explosives
|
||||
swprintf( sString, L"%d", pSoldier->stats.bExplosive );
|
||||
|
||||
// SANDRO - if damaged stat we could regain, show in red until repaired
|
||||
if( gGameOptions.fNewTraitSystem && ( pSoldier->ubCriticalStatDamage[DAMAGED_STAT_EXPLOSIVES] > 0 ))
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
else if( ( GetJA2Clock() < CHANGE_STAT_RECENTLY_DURATION + pSoldier->timeChanges.uiChangeExplosivesTime)&& ( pSoldier->timeChanges.uiChangeExplosivesTime != 0 ) )
|
||||
{
|
||||
if( pSoldier->usValueGoneUp & EXP_INCREASE )
|
||||
{
|
||||
SetFontForeground( FONT_LTGREEN );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFontForeground(CHAR_TEXT_FONT_COLOR);
|
||||
}
|
||||
|
||||
// right justify
|
||||
FindFontRightCoordinates(EXP_X,EXP_Y,STAT_WID ,STAT_HEI,sString , CHAR_FONT, &usX, &usY);
|
||||
DrawString(sString,usX, EXP_Y,CHAR_FONT );
|
||||
|
||||
// medical
|
||||
swprintf( sString, L"%d", pSoldier->stats.bMedical );
|
||||
@@ -9836,6 +9835,7 @@ void MAPBeginItemPointer( SOLDIERTYPE *pSoldier, UINT8 ubHandPos )
|
||||
{
|
||||
numToMove = 1;
|
||||
}
|
||||
|
||||
pSoldier->inv[ubHandPos].MoveThisObjectTo(gItemPointer, numToMove, pSoldier, ubHandPos);
|
||||
|
||||
//Autoplace to map sector invectory
|
||||
|
||||
+226
-65
@@ -72,6 +72,7 @@
|
||||
#include "MessageBoxScreen.h"
|
||||
#include "wordwrap.h"
|
||||
#include "Boxing.h"
|
||||
#include "personnel.h"
|
||||
// HEADROCK HAM 3.6: This is required for Stat Progress Bars
|
||||
#include "Campaign.h"
|
||||
#include "Food.h" // added by Flugente
|
||||
@@ -249,10 +250,10 @@ int SM_EXPLVL_X;
|
||||
int SM_EXPLVL_Y;
|
||||
int SM_MRKM_X;
|
||||
int SM_MRKM_Y;
|
||||
int SM_EXPL_X;
|
||||
int SM_EXPL_Y;
|
||||
int SM_MECH_X;
|
||||
int SM_MECH_Y;
|
||||
int SM_EXPL_X;
|
||||
int SM_EXPL_Y;
|
||||
int SM_MED_X;
|
||||
int SM_MED_Y;
|
||||
|
||||
@@ -1609,10 +1610,10 @@ BOOLEAN InitializeSMPanelCoordsOld()
|
||||
SM_EXPLVL_Y = ( 7 + INV_INTERFACE_START_Y );
|
||||
SM_MRKM_X = ( 163 + INTERFACE_START_X );
|
||||
SM_MRKM_Y = ( 17 + INV_INTERFACE_START_Y );
|
||||
SM_EXPL_X = ( 163 + INTERFACE_START_X );
|
||||
SM_EXPL_Y = ( 27 + INV_INTERFACE_START_Y );
|
||||
SM_MECH_X = ( 163 + INTERFACE_START_X );
|
||||
SM_MECH_Y = ( 37 + INV_INTERFACE_START_Y );
|
||||
SM_MECH_Y = ( 27 + INV_INTERFACE_START_Y );
|
||||
SM_EXPL_X = ( 163 + INTERFACE_START_X );
|
||||
SM_EXPL_Y = ( 37 + INV_INTERFACE_START_Y );
|
||||
SM_MED_X = ( 163 + INTERFACE_START_X );
|
||||
SM_MED_Y = ( 47 + INV_INTERFACE_START_Y );
|
||||
|
||||
@@ -1981,10 +1982,10 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
||||
SM_EXPLVL_Y = ( 7 + INV_INTERFACE_START_Y );
|
||||
SM_MRKM_X = ( 163 + INTERFACE_START_X );
|
||||
SM_MRKM_Y = ( 17 + INV_INTERFACE_START_Y );
|
||||
SM_EXPL_X = ( 163 + INTERFACE_START_X );
|
||||
SM_EXPL_Y = ( 27 + INV_INTERFACE_START_Y );
|
||||
SM_MECH_X = ( 163 + INTERFACE_START_X );
|
||||
SM_MECH_Y = ( 37 + INV_INTERFACE_START_Y );
|
||||
SM_MECH_Y = ( 27 + INV_INTERFACE_START_Y );
|
||||
SM_EXPL_X = ( 163 + INTERFACE_START_X );
|
||||
SM_EXPL_Y = ( 37 + INV_INTERFACE_START_Y );
|
||||
SM_MED_X = ( 163 + INTERFACE_START_X );
|
||||
SM_MED_Y = ( 47 + INV_INTERFACE_START_Y );
|
||||
|
||||
@@ -2480,7 +2481,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
INT16 usX, usY;
|
||||
CHAR16 sString[9];
|
||||
UINT32 cnt;
|
||||
static CHAR16 pStr[ 200 ], pMoraleStr[ 20 ];
|
||||
static CHAR16 pStr[ 200 ], pMoraleStr[ 20 ], sTemp[ 20 ];
|
||||
|
||||
if ( gubSelectSMPanelToMerc != NOBODY )
|
||||
{
|
||||
@@ -2810,18 +2811,18 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
FindFontRightCoordinates(SM_MRKM_X, SM_MRKM_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeExplosivesTime, ( BOOLEAN ) ( gpSMCurrentMerc->usValueGoneUp & EXP_INCREASE? TRUE: FALSE ), ( BOOLEAN ) ( ( gGameOptions.fNewTraitSystem && ( gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_EXPLOSIVES] > 0 )) ? TRUE : FALSE), FALSE); // SANDRO
|
||||
|
||||
swprintf( sString, L"%2d", gpSMCurrentMerc->stats.bExplosive );
|
||||
FindFontRightCoordinates(SM_EXPL_X, SM_EXPL_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeMechanicalTime, ( BOOLEAN ) ( gpSMCurrentMerc->usValueGoneUp & MECH_INCREASE ? TRUE: FALSE ), ( BOOLEAN ) ( ( gGameOptions.fNewTraitSystem && ( gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_MECHANICAL] > 0 )) ? TRUE : FALSE), FALSE); // SANDRO
|
||||
|
||||
swprintf( sString, L"%2d", gpSMCurrentMerc->stats.bMechanical );
|
||||
FindFontRightCoordinates(SM_MECH_X, SM_MECH_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeExplosivesTime, ( BOOLEAN ) ( gpSMCurrentMerc->usValueGoneUp & EXP_INCREASE? TRUE: FALSE ), ( BOOLEAN ) ( ( gGameOptions.fNewTraitSystem && ( gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_EXPLOSIVES] > 0 )) ? TRUE : FALSE), FALSE); // SANDRO
|
||||
|
||||
swprintf( sString, L"%2d", gpSMCurrentMerc->stats.bExplosive );
|
||||
FindFontRightCoordinates(SM_EXPL_X, SM_EXPL_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeMedicalTime, ( BOOLEAN ) ( gpSMCurrentMerc->usValueGoneUp & MED_INCREASE? TRUE: FALSE ), ( BOOLEAN ) ( ( gGameOptions.fNewTraitSystem && ( gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_MEDICAL] > 0 )) ? TRUE : FALSE), FALSE); // SANDRO
|
||||
|
||||
swprintf( sString, L"%2d", gpSMCurrentMerc->stats.bMedical );
|
||||
@@ -2968,11 +2969,92 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
}
|
||||
SetRegionFastHelpText( &(gSM_SELMERCBarsRegion), pStr );
|
||||
|
||||
}
|
||||
// Buggler: skills/traits tooltip on merc portrait
|
||||
// clear pStr value
|
||||
swprintf( pStr, L"");
|
||||
|
||||
if (gGameOptions.fNewTraitSystem) // SANDRO - old/new traits check
|
||||
{
|
||||
UINT8 ubTempSkillArray[30];
|
||||
INT8 bNumSkillTraits = 0;
|
||||
|
||||
// lets rearrange our skills to a temp array
|
||||
// we also get the number of lines (skills) to be displayed
|
||||
for ( UINT8 ubCnt = 1; ubCnt < NUM_SKILLTRAITS_NT; ubCnt++ )
|
||||
{
|
||||
if ( ProfileHasSkillTrait( gpSMCurrentMerc->ubProfile, ubCnt ) == 2 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = (ubCnt + NEWTRAIT_MERCSKILL_EXPERTOFFSET);
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
else if ( ProfileHasSkillTrait( gpSMCurrentMerc->ubProfile, ubCnt ) == 1 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = ubCnt;
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNumSkillTraits == 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
||||
{
|
||||
// Flugente: as the whole trait display is fubar, we have to to a special treatment here for new traits
|
||||
UINT8 display1 = ubTempSkillArray[ubCnt];
|
||||
if ( display1 > SCOUTING_NT + NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
else if ( display1 >= AMBIDEXTROUS_NT && display1 <= SCOUTING_NT )
|
||||
display1++;
|
||||
else if ( display1 == NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
|
||||
swprintf( sTemp, L"%s\n", gzMercSkillTextNew[ display1 ] );
|
||||
wcscat( pStr, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT8 bSkill1 = 0, bSkill2 = 0;
|
||||
bSkill1 = gMercProfiles[ gpSMCurrentMerc->ubProfile ].bSkillTraits[0];
|
||||
bSkill2 = gMercProfiles[ gpSMCurrentMerc->ubProfile ].bSkillTraits[1];
|
||||
|
||||
if ( bSkill1 == 0 && bSkill2 == 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//if the 2 skills are the same, add the '(expert)' at the end
|
||||
if( bSkill1 == bSkill2 )
|
||||
{
|
||||
swprintf( pStr, L"%s %s", gzMercSkillText[bSkill1], gzMercSkillText[EXPERT] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display the first skill
|
||||
if( bSkill1 != 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s\n", gzMercSkillText[bSkill1] );
|
||||
}
|
||||
if( bSkill2 != 0 )
|
||||
{
|
||||
swprintf( sTemp, L"%s", gzMercSkillText[bSkill2] );
|
||||
wcscat( pStr, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SetRegionFastHelpText( &gSM_SELMERCPanelRegion, pStr );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRegionFastHelpText( &(gSM_SELMERCBarsRegion), L"" );
|
||||
SetRegionFastHelpText( &gSM_SELMERCPanelRegion, L"" );
|
||||
}
|
||||
|
||||
//if we are in the shop keeper interface
|
||||
@@ -3647,7 +3729,7 @@ UINT32 GetInvMovementCost(OBJECTTYPE* pObj, UINT32 old_pos, UINT32 new_pos)
|
||||
else
|
||||
weight_modifier = 0;
|
||||
|
||||
UINT32 cost = 0;
|
||||
INT32 cost = 0;
|
||||
|
||||
cost += uiAPCostFromSlot[src_type];
|
||||
cost += uiAPCostToSlot[dst_type];
|
||||
@@ -5360,7 +5442,7 @@ void RenderTEAMPanel( BOOLEAN fDirty )
|
||||
INT16 sFontX, sFontY;
|
||||
UINT32 cnt, posIndex;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
static CHAR16 pStr[ 512 ], pMoraleStr[ 20 ];
|
||||
static CHAR16 pStr[ 512 ], pMoraleStr[ 20 ], sTemp[ 20 ];
|
||||
|
||||
if ( fDirty == DIRTYLEVEL2 )
|
||||
{
|
||||
@@ -5435,7 +5517,6 @@ void RenderTEAMPanel( BOOLEAN fDirty )
|
||||
SetRegionFastHelpText( &(gTEAM_SecondHandInv[ cnt ]), pStr );
|
||||
}
|
||||
|
||||
|
||||
// Render Selected guy if selected
|
||||
if ( gusSelectedSoldier == pSoldier->ubID && gTacticalStatus.ubCurrentTeam == OUR_TEAM && OK_INTERRUPT_MERC( pSoldier ) )
|
||||
{
|
||||
@@ -5516,66 +5597,148 @@ void RenderTEAMPanel( BOOLEAN fDirty )
|
||||
if ( fDirty != DIRTYLEVEL0 )
|
||||
{
|
||||
// UPdate stats!
|
||||
if ( fDirty == DIRTYLEVEL2 )
|
||||
{
|
||||
if ( pSoldier->stats.bLife != 0 )
|
||||
if ( fDirty == DIRTYLEVEL2 )
|
||||
{
|
||||
if ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ VEHICLE_VITAL_STATS_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax );
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), pStr );
|
||||
}
|
||||
else if ( pSoldier->flags.uiStatusFlags & SOLDIER_ROBOT )
|
||||
{
|
||||
swprintf( pStr, gzLateLocalizedString[ 16 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax );
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), pStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
GetMoraleString( pSoldier, pMoraleStr );
|
||||
|
||||
if ( gGameOptions.fFoodSystem && pSoldier->ubProfile != ROBOT && !IsVehicle(pSoldier) )
|
||||
if ( pSoldier->stats.bLife != 0 )
|
||||
{
|
||||
// Flugente: added a display for poison, only show text if actually poisoned
|
||||
if ( pSoldier->bPoisonSum > 0 )
|
||||
if ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_POISON_AND_FOOD_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bPoisonSum, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr, (INT32)(100*pSoldier->bDrinkLevel/FOOD_MAX), L"%", (INT32)(100*pSoldier->bFoodLevel/FOOD_MAX), L"%" );
|
||||
swprintf( pStr, TacticalStr[ VEHICLE_VITAL_STATS_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax );
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), pStr );
|
||||
}
|
||||
else if ( pSoldier->flags.uiStatusFlags & SOLDIER_ROBOT )
|
||||
{
|
||||
swprintf( pStr, gzLateLocalizedString[ 16 ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax );
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), pStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_FOOD_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr, (INT32)(100*pSoldier->bDrinkLevel/FOOD_MAX), L"%", (INT32)(100*pSoldier->bFoodLevel/FOOD_MAX), L"%" );
|
||||
GetMoraleString( pSoldier, pMoraleStr );
|
||||
|
||||
if ( gGameOptions.fFoodSystem && pSoldier->ubProfile != ROBOT && !IsVehicle(pSoldier) )
|
||||
{
|
||||
// Flugente: added a display for poison, only show text if actually poisoned
|
||||
if ( pSoldier->bPoisonSum > 0 )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_POISON_AND_FOOD_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bPoisonSum, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr, (INT32)(100*pSoldier->bDrinkLevel/FOOD_MAX), L"%", (INT32)(100*pSoldier->bFoodLevel/FOOD_MAX), L"%" );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_FOOD_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr, (INT32)(100*pSoldier->bDrinkLevel/FOOD_MAX), L"%", (INT32)(100*pSoldier->bFoodLevel/FOOD_MAX), L"%" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flugente: added a display for poison, only show text if actually poisoned
|
||||
if ( pSoldier->bPoisonSum > 0 )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_POISON_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bPoisonSum, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr );
|
||||
}
|
||||
}
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), pStr );
|
||||
|
||||
// Buggler: skills/traits tooltip on merc portrait
|
||||
// clear pStr value
|
||||
swprintf( pStr, L"");
|
||||
|
||||
if (gGameOptions.fNewTraitSystem) // SANDRO - old/new traits check
|
||||
{
|
||||
UINT8 ubTempSkillArray[30];
|
||||
INT8 bNumSkillTraits = 0;
|
||||
|
||||
// lets rearrange our skills to a temp array
|
||||
// we also get the number of lines (skills) to be displayed
|
||||
for ( UINT8 ubCnt = 1; ubCnt < NUM_SKILLTRAITS_NT; ubCnt++ )
|
||||
{
|
||||
if ( ProfileHasSkillTrait( pSoldier->ubProfile, ubCnt ) == 2 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = (ubCnt + NEWTRAIT_MERCSKILL_EXPERTOFFSET);
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
else if ( ProfileHasSkillTrait( pSoldier->ubProfile, ubCnt ) == 1 )
|
||||
{
|
||||
ubTempSkillArray[bNumSkillTraits] = ubCnt;
|
||||
bNumSkillTraits++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNumSkillTraits == 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
||||
{
|
||||
// Flugente: as the whole trait display is fubar, we have to to a special treatment here for new traits
|
||||
UINT8 display1 = ubTempSkillArray[ubCnt];
|
||||
if ( display1 > SCOUTING_NT + NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
else if ( display1 >= AMBIDEXTROUS_NT && display1 <= SCOUTING_NT )
|
||||
display1++;
|
||||
else if ( display1 == NEWTRAIT_MERCSKILL_EXPERTOFFSET )
|
||||
display1 -= NUM_MINOR_TRAITS;
|
||||
|
||||
swprintf( sTemp, L"%s\n", gzMercSkillTextNew[ display1 ] );
|
||||
wcscat( pStr, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT8 bSkill1 = 0, bSkill2 = 0;
|
||||
bSkill1 = gMercProfiles[ pSoldier->ubProfile ].bSkillTraits[0];
|
||||
bSkill2 = gMercProfiles[ pSoldier->ubProfile ].bSkillTraits[1];
|
||||
|
||||
if ( bSkill1 == 0 && bSkill2 == 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//if the 2 skills are the same, add the '(expert)' at the end
|
||||
if( bSkill1 == bSkill2 )
|
||||
{
|
||||
swprintf( pStr, L"%s %s", gzMercSkillText[bSkill1], gzMercSkillText[EXPERT] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display the first skill
|
||||
if( bSkill1 != 0 )
|
||||
{
|
||||
swprintf( pStr, L"%s\n", gzMercSkillText[bSkill1] );
|
||||
}
|
||||
if( bSkill2 != 0 )
|
||||
{
|
||||
swprintf( sTemp, L"%s", gzMercSkillText[bSkill2] );
|
||||
wcscat( pStr, sTemp );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SetRegionFastHelpText( &(gTEAM_FaceRegions[ cnt ]), pStr );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flugente: added a display for poison, only show text if actually poisoned
|
||||
if ( pSoldier->bPoisonSum > 0 )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_POISON_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bPoisonSum, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr );
|
||||
}
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), L"" );
|
||||
SetRegionFastHelpText( &(gTEAM_FaceRegions[ cnt ]), L"" );
|
||||
}
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), pStr );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRegionFastHelpText( &(gTEAM_BarsRegions[ cnt ]), L"" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !( pSoldier->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
{
|
||||
DrawLifeUIBarEx( pSoldier, sTEAMLifeXY[ posIndex ], sTEAMLifeXY[ posIndex + 1 ], TM_LIFEBAR_WIDTH, TM_LIFEBAR_HEIGHT, TRUE, FRAME_BUFFER );
|
||||
|
||||
if ( !( pSoldier->flags.uiStatusFlags & SOLDIER_ROBOT ) )
|
||||
{
|
||||
DrawBreathUIBarEx( pSoldier, sTEAMBreathXY[ posIndex ], sTEAMBreathXY[ posIndex + 1 ], TM_LIFEBAR_WIDTH, TM_LIFEBAR_HEIGHT, TRUE, FRAME_BUFFER );
|
||||
DrawMoraleUIBarEx( pSoldier, sTEAMMoraleXY[ posIndex ], sTEAMMoraleXY[ posIndex + 1 ], TM_LIFEBAR_WIDTH, TM_LIFEBAR_HEIGHT, TRUE, FRAME_BUFFER );
|
||||
}
|
||||
if ( !( pSoldier->flags.uiStatusFlags & SOLDIER_ROBOT ) )
|
||||
{
|
||||
DrawBreathUIBarEx( pSoldier, sTEAMBreathXY[ posIndex ], sTEAMBreathXY[ posIndex + 1 ], TM_LIFEBAR_WIDTH, TM_LIFEBAR_HEIGHT, TRUE, FRAME_BUFFER );
|
||||
DrawMoraleUIBarEx( pSoldier, sTEAMMoraleXY[ posIndex ], sTEAMMoraleXY[ posIndex + 1 ], TM_LIFEBAR_WIDTH, TM_LIFEBAR_HEIGHT, TRUE, FRAME_BUFFER );
|
||||
}
|
||||
|
||||
if ( gTacticalStatus.uiFlags & TURNBASED && pSoldier->stats.bLife >= OKLIFE )
|
||||
{
|
||||
@@ -5626,9 +5789,7 @@ void RenderTEAMPanel( BOOLEAN fDirty )
|
||||
|
||||
// Erase APs
|
||||
RestoreExternBackgroundRect( sTEAMApXY[ posIndex ], sTEAMApXY[ posIndex + 1 ], TM_AP_WIDTH, TM_AP_HEIGHT );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RenderSoldierTeamInv( pSoldier, sTEAMHandInvXY[ posIndex ], sTEAMHandInvXY[ posIndex + 1 ], (UINT8)cnt, fDirty );
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
#define POISON_BLEEDING_BAR_SHADOW FROMRGB( 128, 60, 128 )
|
||||
#define POISON_BLEEDING_BAR FROMRGB( 240, 20, 240 )
|
||||
|
||||
#define CURR_BREATH_BAR_SHADOW FROMRGB( 8, 12, 118 ) // the MAX max breatth, always at 100%
|
||||
#define CURR_BREATH_BAR FROMRGB( 8, 12, 160 )
|
||||
#define CURR_MAX_BREATH FROMRGB( 0, 0, 0 ) // the current max breath, black
|
||||
#define CURR_MAX_BREATH_SHADOW FROMRGB( 0, 0, 0 )
|
||||
#define CURR_BREATH_BAR_SHADOW FROMRGB( 17, 24, 170 ) // the lt blue current breath
|
||||
#define CURR_BREATH_BAR FROMRGB( 46, 51, 243 )
|
||||
#define CURR_MAX_BREATH FROMRGB( 0, 0, 0 ) // the current max breath, black
|
||||
#define CURR_MAX_BREATH_SHADOW FROMRGB( 0, 0, 0 )
|
||||
#define MORALE_BAR_SHADOW FROMRGB( 8, 112, 12 )
|
||||
#define MORALE_BAR FROMRGB( 8, 180, 12 )
|
||||
#define BREATH_BAR_SHADOW FROMRGB( 60, 108, 108 ) // the lt blue current breath
|
||||
#define BREATH_BAR_SHADOW FROMRGB( 60, 108, 108 ) // the MAX max breath, always at 100%
|
||||
#define BREATH_BAR FROMRGB( 113, 178, 218 )
|
||||
#define BREATH_BAR_SHAD_BACK FROMRGB( 1,1,1 )
|
||||
#define FACE_WIDTH 48
|
||||
|
||||
@@ -1834,8 +1834,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"智慧", // wisdom
|
||||
L"级别", // experience level
|
||||
L"枪法", // marksmanship skill
|
||||
L"爆破", // explosive skill
|
||||
L"机械", // mechanical skill
|
||||
L"爆破", // explosive skill
|
||||
L"医疗", // medical skill
|
||||
};
|
||||
|
||||
@@ -4214,7 +4214,7 @@ STR16 MercInfo[] =
|
||||
L"已雇佣", //"Hired",
|
||||
L"日薪: ", //"Salary:",
|
||||
L"每日", //"per Day",
|
||||
L"可选装备: ", //"Optional Gear:",
|
||||
L"装备: ", //"Gear:",
|
||||
L"合计: ", //"Total:",
|
||||
L"阵亡", //"Deceased",
|
||||
|
||||
|
||||
@@ -1830,8 +1830,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Wij", // wisdom
|
||||
L"Niv", // experience level
|
||||
L"Tre", // marksmanship skill
|
||||
L"Exp", // explosive skill
|
||||
L"Tec", // mechanical skill
|
||||
L"Exp", // explosive skill
|
||||
L"Med", // medical skill
|
||||
};
|
||||
|
||||
@@ -4216,7 +4216,7 @@ STR16 MercInfo[] =
|
||||
L"Ingehuurd",
|
||||
L"Salaris:",
|
||||
L"Per Dag",
|
||||
L"Aanv. Uitrusting:",
|
||||
L"Gear:", //TODO.Translate
|
||||
L"Totaal:",
|
||||
L"Overleden",
|
||||
|
||||
@@ -4653,7 +4653,7 @@ STR16 CharacterInfo[] =
|
||||
L"Extra Info", // Title for the additional info for the merc's bio
|
||||
L"Actieve Leden", //20 // Title of the page
|
||||
L"Aanv. Uitrusting:", // Displays the optional gear cost
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's //TODO.Translate
|
||||
L"MEDISCHE aanbetaling nodig", // If the merc required a medical deposit, this is displayed
|
||||
L"Uitrusting 1", // Text on Starting Gear Selection Button 1 // TODO.Translate
|
||||
L"Uitrusting 2", // Text on Starting Gear Selection Button 2
|
||||
|
||||
@@ -1834,8 +1834,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Wis", // wisdom
|
||||
L"Lvl", // experience level
|
||||
L"Mrk", // marksmanship skill
|
||||
L"Exp", // explosive skill
|
||||
L"Mec", // mechanical skill
|
||||
L"Exp", // explosive skill
|
||||
L"Med", // medical skill
|
||||
};
|
||||
|
||||
@@ -2906,7 +2906,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Health: %d/%d\nEnergy: %d/%d\nMorale: %s\nWater: %d%s\nFood: %d%s",
|
||||
L"Health: %d/%d\nPoison: %d/%d\nEnergy: %d/%d\nMorale: %s\nWater: %d%s\nFood: %d%s",
|
||||
|
||||
// added by Flugente: selection of a function to call in tactical
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
@@ -4213,7 +4213,7 @@ STR16 MercInfo[] =
|
||||
L"Hired",
|
||||
L"Salary:",
|
||||
L"per Day",
|
||||
L"Optional Gear:",
|
||||
L"Gear:",
|
||||
L"Total:",
|
||||
L"Deceased",
|
||||
|
||||
@@ -7503,7 +7503,7 @@ STR16 szPrisonerTextStr[]=
|
||||
L"Prisoners have been released!",
|
||||
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||
L"The enemy refuses to surrender!",
|
||||
L"The enemy refuses to take you as prisoners - they prefer you dead!",
|
||||
L"The enemy refuses to take you as prisoners - they prefer you dead!", // TODO.Translate
|
||||
L"This behaviour is set OFF in your ini settings.",
|
||||
};
|
||||
|
||||
|
||||
@@ -1838,8 +1838,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Sag", // sagesse
|
||||
L"Niv", // experience level
|
||||
L"Tir", // marksmanship skill
|
||||
L"Exp", // explosive skill
|
||||
L"Méc", // mechanical skill
|
||||
L"Exp", // explosive skill
|
||||
L"Méd", // medical skill
|
||||
};
|
||||
|
||||
@@ -4211,7 +4211,7 @@ STR16 MercInfo[] =
|
||||
L"Engagé",
|
||||
L"Salaire :",
|
||||
L"Par jour",
|
||||
L"Matériel optionnel :", // TODO.Translate
|
||||
L"Gear :", // TODO.Translate
|
||||
L"Total :", // TODO.Translate
|
||||
L"Décédé(e)",
|
||||
|
||||
@@ -4648,7 +4648,7 @@ STR16 CharacterInfo[] =
|
||||
L"Info. complémentaires", // Title for the additional info for the merc's bio
|
||||
L"Membres actifs", //20 // Title of the page
|
||||
L"Matériel optionnel :", // Displays the optional gear cost
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's //TODO.Translate
|
||||
L"Dépôt Médical", // If the merc required a medical deposit, this is displayed
|
||||
L"Kit 1", // Text on Starting Gear Selection Button 1
|
||||
L"Kit 2", // Text on Starting Gear Selection Button 2
|
||||
@@ -5143,7 +5143,7 @@ STR16 zOptionsToggleText[] =
|
||||
L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate
|
||||
L"Mark Remaining Hostiles", //TODO.Translate
|
||||
L"Show LBE Content", //TODO.Translate
|
||||
L"Invert mouse wheel", // TODO.Translate
|
||||
L"Invert mouse wheel",
|
||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||
L"Forcer envois Bobby Ray", // force all pending Bobby Ray shipments
|
||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||
@@ -5258,7 +5258,7 @@ STR16 zOptionsScreenHelpText[] =
|
||||
L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate
|
||||
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
|
||||
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
|
||||
L"When ON, inverts mouse wheel directions.", // TODO.Translate
|
||||
L"When ON, inverts mouse wheel directions.",
|
||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||
L"Forcer tous les envois en attente de Bobby Ray",
|
||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||
|
||||
@@ -1835,8 +1835,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Wsh", // wisdom
|
||||
L"Erf", // experience level
|
||||
L"Trf", // marksmanship skill
|
||||
L"Spr", // explosive skill
|
||||
L"Tec", // mechanical skill
|
||||
L"Spr", // explosive skill
|
||||
L"Med", // medical skill
|
||||
};
|
||||
|
||||
@@ -4140,7 +4140,7 @@ STR16 MercInfo[] =
|
||||
L"Angestellt",
|
||||
L"Sold:",
|
||||
L"Pro Tag",
|
||||
L"Zusätzl. Ausrüst:",
|
||||
L"Ausr.:",
|
||||
L"Gesamt:",
|
||||
L"Verstorben",
|
||||
|
||||
@@ -4993,7 +4993,7 @@ STR16 zOptionsToggleText[] =
|
||||
#endif
|
||||
L"Inventar Popup-Menüs", // the_bob : enable popups for picking items from sector inv
|
||||
L"Übrige Feinde markieren",
|
||||
L"Tascheninhalt anzeigen",
|
||||
L"Tascheninhalt anzeigen",
|
||||
L"Mausradrichtung umkehren",
|
||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||
L"Erzwinge BR Lieferung", // force all pending Bobby Ray shipments
|
||||
@@ -5012,7 +5012,7 @@ STR16 zOptionsToggleText[] =
|
||||
};
|
||||
|
||||
//This is the help text associated with the above toggles.
|
||||
STR16 zOptionsScreenHelpText[] =
|
||||
STR16 zOptionsScreenHelpText[] =
|
||||
{
|
||||
// HEADROCK HAM 4: Added more tooltip text to some toggles, in order to explain them better.
|
||||
|
||||
@@ -5109,7 +5109,7 @@ STR16 zOptionsScreenHelpText[] =
|
||||
#endif
|
||||
L"Wenn diese Funktion aktiviert ist, und Sie mit der linken Maustaste auf einen freien Söldner-Inventarplatz klicken (während das Sektor-Inventar angezeigt wird), wird ein hilfreiches Popup-Menü eingeblendet.",
|
||||
L"Wenn diese Funktion aktiviert ist, wird die ungefähre Postion der verbleibenden Feinde auf der Übersichtskarte schraffiert",
|
||||
L"Wenn diese Funktion aktiviert ist, wird in der erweiterten Beschreibung von Taschen statt den Anbauteilen deren Inhalt angezeigt.",
|
||||
L"Wenn diese Funktion aktiviert ist, wird in der erweiterten Beschreibung von Tashen statt den Anbauteilen deren Inhalt angezeigt.",
|
||||
L"Wenn diese Funktion aktiviert ist, wird die Mausradrichtung umgekehrt",
|
||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||
L"Force all pending Bobby Ray shipments",
|
||||
@@ -7330,8 +7330,8 @@ STR16 szPrisonerTextStr[]=
|
||||
L"Gefangene freigelassen!",
|
||||
L"Die Armee hat das Gefängnis in %s besetzt, die Gefangenen wurden befreit!",
|
||||
L"Der Gegner weigert sich aufzugeben!",
|
||||
L"Der Gegner will uns tot sehen!",
|
||||
L"Dieses Feature ist in der ini auf AUS gesetzt.",
|
||||
L"The enemy refuses to take you as prisoners - they prefer you dead!", // TODO.Translate
|
||||
L"This behaviour is set OFF in your ini settings.",
|
||||
};
|
||||
|
||||
STR16 szMTATextStr[]= // TODO.Translate
|
||||
|
||||
@@ -1826,8 +1826,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Sag", // wisdom
|
||||
L"Liv", // experience level
|
||||
L"Tir", // marksmanship skill
|
||||
L"Esp", // explosive skill
|
||||
L"Mec", // mechanical skill
|
||||
L"Esp", // explosive skill
|
||||
L"PS", // medical skill
|
||||
};
|
||||
|
||||
@@ -4204,7 +4204,7 @@ STR16 MercInfo[] =
|
||||
L"Assoldato",
|
||||
L"Salario:",
|
||||
L"Al giorno",
|
||||
L"Dispositivo opzionale:",
|
||||
L"Gear:", //TODO.Translate
|
||||
L"Totale:",
|
||||
L"Deceduto",
|
||||
|
||||
@@ -4640,7 +4640,7 @@ STR16 CharacterInfo[] =
|
||||
L"Ulteriori informazioni", // Title for the additional info for the merc's bio
|
||||
L"Membri attivi", //20 // Title of the page
|
||||
L"Dispositivo opzionale:", // Displays the optional gear cost
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's //TODO.Translate
|
||||
L"Deposito MEDICO richiesto", // If the merc required a medical deposit, this is displayed
|
||||
L"Kit 1", // Text on Starting Gear Selection Button 1 // TODO.Translate
|
||||
L"Kit 2", // Text on Starting Gear Selection Button 2
|
||||
|
||||
@@ -1841,8 +1841,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Int", // wisdom
|
||||
L"DoŚ", // experience level
|
||||
L"Str", // marksmanship skill
|
||||
L"Wyb", // explosive skill
|
||||
L"Mec", // mechanical skill
|
||||
L"Wyb", // explosive skill
|
||||
L"Med", // medical skill
|
||||
};
|
||||
|
||||
@@ -4212,7 +4212,7 @@ STR16 MercInfo[] =
|
||||
L"Najęty",
|
||||
L"Koszt:",
|
||||
L"Dziennie",
|
||||
L"Opcjonalne wyposażenie:",
|
||||
L"Gear:", //TODO.Translate
|
||||
L"Razem:",
|
||||
L"Nie żyje",
|
||||
|
||||
@@ -4649,7 +4649,7 @@ STR16 CharacterInfo[] =
|
||||
L"Dodatkowe informacje", // Title for the additional info for the merc's bio
|
||||
L"Aktywni członkowie", //20 // Title of the page
|
||||
L"Opcjonalne wyposażenie:", // Displays the optional gear cost
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's
|
||||
L"gear", //"gear", //tais: Displays the optional gear cost in nsgi, this moved and can have only a small room, so just make it "gear" without extra's //TODO.Translate
|
||||
L"Wymagany jest zastaw na życie", // If the merc required a medical deposit, this is displayed
|
||||
L"Zestaw nr 1", // Text on Starting Gear Selection Button 1
|
||||
L"Zestaw nr 2", // Text on Starting Gear Selection Button 2
|
||||
|
||||
@@ -1834,8 +1834,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Инт", // wisdom
|
||||
L"Опт", // experience level
|
||||
L"Мет", // marksmanship skill
|
||||
L"Взр", // explosive skill
|
||||
L"Мех", // mechanical skill
|
||||
L"Взр", // explosive skill
|
||||
L"Мед", // medical skill
|
||||
};
|
||||
|
||||
@@ -4203,7 +4203,7 @@ STR16 MercInfo[] =
|
||||
L"Нанят",
|
||||
L"Oплaтa",
|
||||
L"в день",
|
||||
L"Снаряжение:",
|
||||
L"Снаряж.:",
|
||||
L"Всего:",
|
||||
L"Погиб",
|
||||
|
||||
|
||||
+10
-10
@@ -1834,8 +1834,8 @@ STR16 pShortAttributeStrings[] =
|
||||
L"Wis", // wisdom
|
||||
L"Lvl", // experience level
|
||||
L"Mrk", // marksmanship skill
|
||||
L"Exp", // explosive skill
|
||||
L"Mec", // mechanical skill
|
||||
L"Exp", // explosive skill
|
||||
L"Med", // medical skill
|
||||
};
|
||||
|
||||
@@ -2931,7 +2931,7 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"What do you want to do?",
|
||||
L"Demand surrender",
|
||||
L"Offer surrender",
|
||||
L"Talk",
|
||||
L"Talk",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
@@ -4217,7 +4217,7 @@ STR16 MercInfo[] =
|
||||
L"Hired",
|
||||
L"Salary:",
|
||||
L"per Day",
|
||||
L"Optional Gear:",
|
||||
L"Gear:",
|
||||
L"Total:",
|
||||
L"Deceased",
|
||||
|
||||
@@ -5149,8 +5149,8 @@ STR16 zOptionsToggleText[] =
|
||||
#endif
|
||||
L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv // TODO.Translate
|
||||
L"Mark Remaining Hostiles", //TODO.Translate
|
||||
L"Show LBE Content", //TODO.Translate
|
||||
L"Invert mouse wheel", // TODO.Translate
|
||||
L"Show LBE Content", //TODO.Translate
|
||||
L"Invert mouse wheel", // TODO.Translate
|
||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||
@@ -5265,8 +5265,8 @@ STR16 zOptionsScreenHelpText[] =
|
||||
#endif
|
||||
L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.", // TODO.Translate
|
||||
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
|
||||
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
|
||||
L"When ON, inverts mouse wheel directions.", // TODO.Translate
|
||||
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
|
||||
L"When ON, inverts mouse wheel directions.", // TODO.Translate
|
||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||
L"Force all pending Bobby Ray shipments",
|
||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||
@@ -7519,9 +7519,9 @@ STR16 szPrisonerTextStr[]=
|
||||
L"Prisoners were sent to %s!",
|
||||
L"Prisoners have been released!",
|
||||
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||
L"The enemy refuses to surrender!",
|
||||
L"The enemy refuses to take you as prisoners - they prefer you dead!", // TODO.Translate
|
||||
L"This behaviour is set OFF in your ini settings.",
|
||||
L"The enemy refuses to surrender!",
|
||||
L"The enemy refuses to take you as prisoners - they prefer you dead!", // TODO.Translate
|
||||
L"This behaviour is set OFF in your ini settings.",
|
||||
};
|
||||
|
||||
STR16 szMTATextStr[]= // TODO.Translate
|
||||
|
||||
Reference in New Issue
Block a user