mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- updated Shadow Warrior's tooltip code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@536 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-2
@@ -536,9 +536,8 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fVehicleInventory = iniReader.ReadBoolean("JA2 Gameplay Settings", "VEHICLE_INVENTORY", TRUE);
|
||||
|
||||
// ShadoWarrior: Tooltip changes (start)
|
||||
gGameExternalOptions.ubSoldierTooltipDetailLevel = iniReader.ReadInteger("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DETAIL_LEVEL", 1);
|
||||
gGameExternalOptions.ubSoldierTooltipDetailLevel = iniReader.ReadInteger("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DETAIL_LEVEL", 2);
|
||||
|
||||
gGameExternalOptions.fEnableDynamicSoldierTooltips = iniReader.ReadBoolean("JA2 Tactical Settings", "DYNAMIC_SOLDIER_TOOLTIPS", TRUE);
|
||||
gGameExternalOptions.fEnableSoldierTooltipLocation = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_LOCATION", TRUE);
|
||||
gGameExternalOptions.fEnableSoldierTooltipBrightness = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BRIGHTNESS", TRUE);
|
||||
gGameExternalOptions.fEnableSoldierTooltipRangeToTarget = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_RANGE_TO_TARGET", TRUE);
|
||||
|
||||
@@ -143,7 +143,6 @@ typedef struct
|
||||
BOOLEAN fSellAll;
|
||||
INT16 iPriceModifier;
|
||||
|
||||
INT32 iMaxIMPMaleCharacters;
|
||||
INT32 iMaxIMPCharacters;
|
||||
INT32 iMinAttribute;
|
||||
INT32 iMaxAttribute;
|
||||
@@ -351,7 +350,6 @@ typedef struct
|
||||
// ShadoWarrior: Tooltip changes (start)
|
||||
UINT8 ubSoldierTooltipDetailLevel;
|
||||
|
||||
BOOLEAN fEnableDynamicSoldierTooltips;
|
||||
BOOLEAN fEnableSoldierTooltipLocation;
|
||||
BOOLEAN fEnableSoldierTooltipBrightness;
|
||||
BOOLEAN fEnableSoldierTooltipRangeToTarget;
|
||||
|
||||
+2
-2
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.529" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.536" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
INT8 czVersionNumber[16] = { "Build 06.09.17" };
|
||||
INT8 czVersionNumber[16] = { "Build 06.09.18" };
|
||||
INT16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
|
||||
@@ -289,6 +289,7 @@ typedef struct
|
||||
BOOLEAN twohanded;
|
||||
BOOLEAN notbuyable;
|
||||
BOOLEAN attachment;
|
||||
BOOLEAN hiddenattachment;
|
||||
BOOLEAN biggunlist;
|
||||
BOOLEAN notineditor;
|
||||
BOOLEAN defaultundroppable;
|
||||
|
||||
@@ -49,7 +49,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10;
|
||||
|
||||
if ( gGameExternalOptions.fEnableDynamicSoldierTooltips )
|
||||
// WANNE NEW
|
||||
//if ( gGameExternalOptions.fEnableDynamicSoldierTooltips )
|
||||
{
|
||||
for ( INT32 cnt = 0; cnt < MAX_ATTACHMENTS; cnt++ )
|
||||
{
|
||||
@@ -297,10 +298,6 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
|
||||
void DisplayWeaponInfo( SOLDIERTYPE* pSoldier, CHAR16* pStrInfo, UINT8 ubSlot, UINT8 ubTooltipDetailLevel )
|
||||
{
|
||||
const int TriggerGroup = 1026;
|
||||
const int GunBarrelExtender = 310;
|
||||
const int CMagAdapter556mm = 1001;
|
||||
const int CMagAdapter9mm = 1002;
|
||||
INT32 iNumAttachments = 0;
|
||||
BOOLEAN fDisplayAttachment = FALSE;
|
||||
|
||||
@@ -358,31 +355,9 @@ void DisplayWeaponInfo( SOLDIERTYPE* pSoldier, CHAR16* pStrInfo, UINT8 ubSlot, U
|
||||
if ( ubTooltipDetailLevel == DL_Basic )
|
||||
{
|
||||
// display only externally-visible weapon attachments
|
||||
// don't display inseparable attachments such as the integral GLs on OICW & AICW
|
||||
if ( !Item[pSoldier->inv[ubSlot].usAttachItem[ cnt ]].inseparable )
|
||||
{
|
||||
if ( pSoldier->inv[ubSlot].usAttachItem[ cnt ] != TriggerGroup )
|
||||
if ( !Item[pSoldier->inv[ubSlot].usAttachItem[ cnt ]].hiddenattachment )
|
||||
{
|
||||
fDisplayAttachment = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// display C-mags and barrel extensions
|
||||
switch( pSoldier->inv[ubSlot].usAttachItem[ cnt ] )
|
||||
{
|
||||
case GunBarrelExtender:
|
||||
fDisplayAttachment = TRUE;
|
||||
break;
|
||||
case CMagAdapter556mm:
|
||||
fDisplayAttachment = TRUE;
|
||||
break;
|
||||
case CMagAdapter9mm:
|
||||
fDisplayAttachment = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -117,6 +117,7 @@ itemStartElementHandle(void *userData, const char *name, const char **atts)
|
||||
strcmp(name, "TwoHanded") == 0 ||
|
||||
strcmp(name, "NotBuyable") == 0 ||
|
||||
strcmp(name, "Attachment") == 0 ||
|
||||
strcmp(name, "HiddenAttachment") == 0 ||
|
||||
strcmp(name, "BigGunList") == 0 ||
|
||||
strcmp(name, "NotInEditor") == 0 ||
|
||||
strcmp(name, "DefaultUndroppable") == 0 ||
|
||||
@@ -511,6 +512,11 @@ itemEndElementHandle(void *userData, const char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.attachment = (BOOLEAN) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "HiddenAttachment") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.hiddenattachment = (BOOLEAN) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "BigGunList") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
Reference in New Issue
Block a user