mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New option BACKGROUND_TOOLTIP_DETAILS (TRUE by default) can be used to enable or disable showing background details in laptop.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8732 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-1
@@ -1945,7 +1945,8 @@ void LoadGameExternalOptions()
|
||||
|
||||
gGameExternalOptions.fCampaignHistoryWebSite = iniReader.ReadBoolean("Laptop Settings", "CAMPAIGN_HISTORY", TRUE);
|
||||
gGameExternalOptions.usReportsToLoad = iniReader.ReadInteger("Laptop Settings", "CAMPAIGN_HISTORY_MAX_REPORTS", -1, -1, 100);
|
||||
|
||||
|
||||
gGameExternalOptions.fBackgroundTooltipDetails = iniReader.ReadBoolean("Laptop Settings", "BACKGROUND_TOOLTIP_DETAILS", TRUE);
|
||||
//################# Bobby Ray Settings ##################
|
||||
|
||||
|
||||
|
||||
@@ -951,6 +951,8 @@ typedef struct
|
||||
BOOLEAN fCampaignHistoryWebSite; // if set to FALSE, the website won't be displayed, and thus the data cannot be seen
|
||||
INT16 usReportsToLoad; // number of reports to read when loading a game, older reports will be lost. This is irreversible. -1: read all (default)
|
||||
|
||||
BOOLEAN fBackgroundTooltipDetails;
|
||||
|
||||
// CPT: Cover System Settings
|
||||
UINT8 ubStealthTraitCoverValue;
|
||||
UINT8 ubStealthEffectiveness;
|
||||
|
||||
+34
-33
@@ -468,68 +468,69 @@ void AssignBackgroundHelpText( UINT16 ubNumber, MOUSE_REGION* pMouseregion )
|
||||
|
||||
swprintf( apStr, L"" );
|
||||
|
||||
if ( ubNumber )
|
||||
if (!ubNumber)
|
||||
return;
|
||||
|
||||
swprintf(atStr, zBackground[ubNumber].szName);
|
||||
wcscat(apStr, atStr);
|
||||
wcscat(apStr, L"\n");
|
||||
|
||||
swprintf(atStr, zBackground[ubNumber].szDescription);
|
||||
wcscat(apStr, atStr);
|
||||
wcscat(apStr, L"\n");
|
||||
|
||||
// ability description
|
||||
if (gGameExternalOptions.fBackgroundTooltipDetails)
|
||||
{
|
||||
swprintf(atStr, zBackground[ ubNumber ].szName );
|
||||
wcscat( apStr, atStr );
|
||||
wcscat( apStr, L"\n" );
|
||||
|
||||
swprintf(atStr, zBackground[ ubNumber ].szDescription );
|
||||
wcscat( apStr, atStr );
|
||||
wcscat( apStr, L"\n" );
|
||||
|
||||
// ability description
|
||||
for ( UINT8 i = 0; i < BACKGROUND_FLAG_MAX; ++i)
|
||||
for (UINT8 i = 0; i < BACKGROUND_FLAG_MAX; ++i)
|
||||
{
|
||||
// some properties are hidden
|
||||
if ( ((UINT64)1 << i) & BACKGROUND_HIDDEN_FLAGS )
|
||||
if (((UINT64)1 << i) & BACKGROUND_HIDDEN_FLAGS)
|
||||
continue;
|
||||
|
||||
if ( zBackground[ ubNumber ].uiFlags & ((UINT64)1 << i) )
|
||||
if (zBackground[ubNumber].uiFlags & ((UINT64)1 << i))
|
||||
{
|
||||
swprintf(atStr, szBackgroundText_Flags[ i ] );
|
||||
wcscat( apStr, atStr );
|
||||
swprintf(atStr, szBackgroundText_Flags[i]);
|
||||
wcscat(apStr, atStr);
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 strused = 0;
|
||||
for ( UINT8 i = 0; i < BG_MAX; ++i)
|
||||
for (UINT8 i = 0; i < BG_MAX; ++i)
|
||||
{
|
||||
if (BG_DISLIKEBG == i && zBackground[ubNumber].value[i])
|
||||
{
|
||||
swprintf( atStr, szBackgroundText_Value[strused] );
|
||||
wcscat( apStr, atStr );
|
||||
swprintf(atStr, szBackgroundText_Value[strused]);
|
||||
wcscat(apStr, atStr);
|
||||
}
|
||||
else if ( BG_TRACKER_ABILITY == i && zBackground[ubNumber].value[i] )
|
||||
else if (BG_TRACKER_ABILITY == i && zBackground[ubNumber].value[i])
|
||||
{
|
||||
swprintf( atStr, szBackgroundText_Value[strused], (UINT16)((gSkillTraitValues.usSVTrackerMaxRange * zBackground[ubNumber].value[i]) / 100) );
|
||||
wcscat( apStr, atStr );
|
||||
swprintf(atStr, szBackgroundText_Value[strused], (UINT16)((gSkillTraitValues.usSVTrackerMaxRange * zBackground[ubNumber].value[i]) / 100));
|
||||
wcscat(apStr, atStr);
|
||||
}
|
||||
else if ( BG_SMOKERTYPE == i )
|
||||
else if (BG_SMOKERTYPE == i)
|
||||
{
|
||||
if ( zBackground[ubNumber].value[i] == 1 )
|
||||
swprintf( atStr, szBackgroundText_Value[strused] );
|
||||
if (zBackground[ubNumber].value[i] == 1)
|
||||
swprintf(atStr, szBackgroundText_Value[strused]);
|
||||
else
|
||||
swprintf( atStr, szBackgroundText_Value[strused + 1] );
|
||||
swprintf(atStr, szBackgroundText_Value[strused + 1]);
|
||||
|
||||
wcscat( apStr, L" " );
|
||||
wcscat( apStr, atStr );
|
||||
wcscat( apStr, L"\n" );
|
||||
wcscat(apStr, L" ");
|
||||
wcscat(apStr, atStr);
|
||||
wcscat(apStr, L"\n");
|
||||
|
||||
// smoke has 2 texts, so extra increase of counter is needed
|
||||
++strused;
|
||||
}
|
||||
else if ( zBackground[ ubNumber ].value[i] )
|
||||
else if (zBackground[ubNumber].value[i])
|
||||
{
|
||||
swprintf( atStr, szBackgroundText_Value[strused], zBackground[ubNumber].value[i] > 0 ? L"+" : L"", zBackground[ubNumber].value[i] );
|
||||
wcscat( apStr, atStr );
|
||||
swprintf(atStr, szBackgroundText_Value[strused], zBackground[ubNumber].value[i] > 0 ? L"+" : L"", zBackground[ubNumber].value[i]);
|
||||
wcscat(apStr, atStr);
|
||||
}
|
||||
|
||||
++strused;
|
||||
}
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
// Set region help text
|
||||
SetRegionFastHelpText( pMouseregion, apStr );
|
||||
|
||||
@@ -1664,7 +1664,7 @@ void DisplayCharStats( INT32 iId, INT32 iSlot )
|
||||
// Background
|
||||
|
||||
// display background
|
||||
if ( UsingBackGroundSystem() )
|
||||
if (UsingBackGroundSystem())
|
||||
{
|
||||
UINT8 loc = 21;
|
||||
UINT8 regionnr = 12;
|
||||
|
||||
Reference in New Issue
Block a user