- 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:
Wanne
2006-09-18 20:30:20 +00:00
parent 6f06b9ce78
commit 7bd0bda5f0
7 changed files with 13 additions and 34 deletions
+1 -2
View File
@@ -536,9 +536,8 @@ void LoadGameExternalOptions()
gGameExternalOptions.fVehicleInventory = iniReader.ReadBoolean("JA2 Gameplay Settings", "VEHICLE_INVENTORY", TRUE); gGameExternalOptions.fVehicleInventory = iniReader.ReadBoolean("JA2 Gameplay Settings", "VEHICLE_INVENTORY", TRUE);
// ShadoWarrior: Tooltip changes (start) // 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.fEnableSoldierTooltipLocation = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_LOCATION", TRUE);
gGameExternalOptions.fEnableSoldierTooltipBrightness = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BRIGHTNESS", 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); gGameExternalOptions.fEnableSoldierTooltipRangeToTarget = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_RANGE_TO_TARGET", TRUE);
-2
View File
@@ -143,7 +143,6 @@ typedef struct
BOOLEAN fSellAll; BOOLEAN fSellAll;
INT16 iPriceModifier; INT16 iPriceModifier;
INT32 iMaxIMPMaleCharacters;
INT32 iMaxIMPCharacters; INT32 iMaxIMPCharacters;
INT32 iMinAttribute; INT32 iMinAttribute;
INT32 iMaxAttribute; INT32 iMaxAttribute;
@@ -351,7 +350,6 @@ typedef struct
// ShadoWarrior: Tooltip changes (start) // ShadoWarrior: Tooltip changes (start)
UINT8 ubSoldierTooltipDetailLevel; UINT8 ubSoldierTooltipDetailLevel;
BOOLEAN fEnableDynamicSoldierTooltips;
BOOLEAN fEnableSoldierTooltipLocation; BOOLEAN fEnableSoldierTooltipLocation;
BOOLEAN fEnableSoldierTooltipBrightness; BOOLEAN fEnableSoldierTooltipBrightness;
BOOLEAN fEnableSoldierTooltipRangeToTarget; BOOLEAN fEnableSoldierTooltipRangeToTarget;
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else #else
//RELEASE BUILD VERSION //RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.529" }; INT16 zVersionLabel[256] = { L"Release v1.13.536" };
#endif #endif
INT8 czVersionNumber[16] = { "Build 06.09.17" }; INT8 czVersionNumber[16] = { "Build 06.09.18" };
INT16 zTrackingNumber[16] = { L"Z" }; INT16 zTrackingNumber[16] = { L"Z" };
BIN
View File
Binary file not shown.
+1
View File
@@ -289,6 +289,7 @@ typedef struct
BOOLEAN twohanded; BOOLEAN twohanded;
BOOLEAN notbuyable; BOOLEAN notbuyable;
BOOLEAN attachment; BOOLEAN attachment;
BOOLEAN hiddenattachment;
BOOLEAN biggunlist; BOOLEAN biggunlist;
BOOLEAN notineditor; BOOLEAN notineditor;
BOOLEAN defaultundroppable; BOOLEAN defaultundroppable;
+3 -28
View File
@@ -49,7 +49,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
if ( gusSelectedSoldier != NOBODY ) if ( gusSelectedSoldier != NOBODY )
iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10; iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10;
if ( gGameExternalOptions.fEnableDynamicSoldierTooltips ) // WANNE NEW
//if ( gGameExternalOptions.fEnableDynamicSoldierTooltips )
{ {
for ( INT32 cnt = 0; cnt < MAX_ATTACHMENTS; cnt++ ) 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 ) 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; INT32 iNumAttachments = 0;
BOOLEAN fDisplayAttachment = FALSE; BOOLEAN fDisplayAttachment = FALSE;
@@ -358,31 +355,9 @@ void DisplayWeaponInfo( SOLDIERTYPE* pSoldier, CHAR16* pStrInfo, UINT8 ubSlot, U
if ( ubTooltipDetailLevel == DL_Basic ) if ( ubTooltipDetailLevel == DL_Basic )
{ {
// display only externally-visible weapon attachments // 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 ]].hiddenattachment )
if ( !Item[pSoldier->inv[ubSlot].usAttachItem[ cnt ]].inseparable )
{
if ( pSoldier->inv[ubSlot].usAttachItem[ cnt ] != TriggerGroup )
{ {
fDisplayAttachment = TRUE; 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 else
+6
View File
@@ -117,6 +117,7 @@ itemStartElementHandle(void *userData, const char *name, const char **atts)
strcmp(name, "TwoHanded") == 0 || strcmp(name, "TwoHanded") == 0 ||
strcmp(name, "NotBuyable") == 0 || strcmp(name, "NotBuyable") == 0 ||
strcmp(name, "Attachment") == 0 || strcmp(name, "Attachment") == 0 ||
strcmp(name, "HiddenAttachment") == 0 ||
strcmp(name, "BigGunList") == 0 || strcmp(name, "BigGunList") == 0 ||
strcmp(name, "NotInEditor") == 0 || strcmp(name, "NotInEditor") == 0 ||
strcmp(name, "DefaultUndroppable") == 0 || strcmp(name, "DefaultUndroppable") == 0 ||
@@ -511,6 +512,11 @@ itemEndElementHandle(void *userData, const char *name)
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
pData->curItem.attachment = (BOOLEAN) atol(pData->szCharData); 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) else if(strcmp(name, "BigGunList") == 0)
{ {
pData->curElement = ELEMENT; pData->curElement = ELEMENT;