New feature for UDB

It is now possible to see secondary attributes on the general tab for weapons. Just click on the tab a second time.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6428 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-09-21 16:03:47 +00:00
parent 6f2c3bc833
commit f3a36ee7c6
13 changed files with 57 additions and 22 deletions
+16 -8
View File
@@ -1401,7 +1401,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
/////////////////////////////////////////////////////////////////////////////////
// WEAPONS
/////////////////////////////////////////////////////////////////////////////////
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH )
if ( (Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) && gubDescGenPage == 0 )
{
if (gubDescBoxPage == 1)
{
@@ -2281,6 +2281,8 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
}
//////////////////// REPAIR EASE
// not for weapons. They have this one their primary page
if ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) )
{
swprintf( pStr, L"%s%s", szUDBGenCommonStatsTooltipText[ 0 ], szUDBGenCommonStatsExplanationsTooltipText[ 0 ]);
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + 0 ]), pStr );
@@ -2295,7 +2297,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
// UDB page. They appear only for non-weapon items (no room in the weapon page).
if (gubDescBoxPage == 1 &&
!(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH ) )
( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH ) || gubDescGenPage == 1 ) )
{
iFirstDataRegion = iRegionsCreated;
CHAR16 pStr[1000];
@@ -5592,13 +5594,17 @@ void DrawMiscStats( OBJECTTYPE * gpItemDescObject )
if (gubDescBoxPage == 1)
{
////////////////// REPAIR EASE
if ( !Item[gpItemDescObject->usItem].repairable )
// not for weapons. They have this one their primary page
if ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) )
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 35, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
}
else
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 10, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
if ( !Item[gpItemDescObject->usItem].repairable )
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 35, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
}
else
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 10, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
}
}
DrawSecondaryStats( gpItemDescObject );
@@ -12426,6 +12432,8 @@ void DrawMiscValues( OBJECTTYPE * gpItemDescObject )
SetFontForeground( 6 );
//////////////////// REPAIR EASE
// not for weapons. They have this one their primary page
if ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) )
{
// Set line to draw into
ubNumLine = 0;