mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -6288,7 +6288,7 @@ INT8 DetermineShowBox( )
|
||||
{
|
||||
if (UsingEDBSystem() > 0)
|
||||
{
|
||||
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH))
|
||||
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH) && gubDescGenPage == 0)
|
||||
{
|
||||
switch (gubDescBoxPage)
|
||||
{
|
||||
@@ -6332,7 +6332,7 @@ INT8 DetermineShowBox( )
|
||||
}
|
||||
else if(UsingNewInventorySystem() == true) //NIV
|
||||
{
|
||||
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH) && UsingEDBSystem() > 0 )
|
||||
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH) && UsingEDBSystem() > 0 && gubDescGenPage == 0 )
|
||||
{
|
||||
if (guiCurrentItemDescriptionScreen == MAP_SCREEN)
|
||||
{
|
||||
@@ -6769,10 +6769,14 @@ void RenderItemDescriptionBox( )
|
||||
//HEADROCK/CHRISL: This condition needs to run differently depending on whether EDB is active of not
|
||||
if(UsingEDBSystem() > 0)
|
||||
{
|
||||
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)
|
||||
{
|
||||
DrawWeaponStats(gpItemDescObject);
|
||||
}
|
||||
else if ( (Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) && gubDescGenPage == 1)
|
||||
{
|
||||
DrawMiscStats(gpItemDescObject);
|
||||
}
|
||||
else if ( Item[ gpItemDescObject->usItem ].usItemClass == IC_AMMO )
|
||||
{
|
||||
DrawAmmoStats(gpItemDescObject);
|
||||
@@ -7169,8 +7173,19 @@ void RenderItemDescriptionBox( )
|
||||
{
|
||||
if(UsingEDBSystem() > 0)
|
||||
{
|
||||
SetFontShadow( ITEMDESC_FONTSHADOW3 );
|
||||
DrawWeaponValues(gpItemDescObject);
|
||||
if ( gubDescGenPage == 0)
|
||||
{
|
||||
SetFontShadow( ITEMDESC_FONTSHADOW3 );
|
||||
DrawWeaponValues(gpItemDescObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Labels
|
||||
SetFont( BLOCKFONT2 );
|
||||
SetFontForeground( 6 );
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
DrawMiscValues(gpItemDescObject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -12538,6 +12553,14 @@ void DeletePool(ITEM_POOL *pItemPool)
|
||||
|
||||
void ItemDescTabButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
// silversurfer: We clicked on the general tab a second time. Make it toggle between first and second page.
|
||||
// This is only used for weapons at the moment because there was no space for the secondary attributes.
|
||||
if ( gubDescBoxPage == 1 && btn->UserData[0] == 1 && gfLeftButtonState )
|
||||
if ( gubDescGenPage == 0 )
|
||||
gubDescGenPage = 1;
|
||||
else
|
||||
gubDescGenPage = 0;
|
||||
|
||||
gubDescBoxPage = btn->UserData[0];
|
||||
HandleItemDescTabButton( );
|
||||
}
|
||||
|
||||
@@ -438,6 +438,8 @@ BOOLEAN gfDeductPoints;
|
||||
// By saving this in memory, we tell the DescBox which background and values to draw, and make sure that we end up
|
||||
// on the same page every time we open the description box. UDB buttons allow switching between pages.
|
||||
UINT8 gubDescBoxPage;
|
||||
// silversurfer: Now we also have a secondary page on the general tab for weapons so we can look at their secondary attributes.
|
||||
UINT8 gubDescGenPage;
|
||||
// Record which line we're looking at. This only applied to the Advanced tab in description boxes.
|
||||
UINT8 gubDescBoxLine;
|
||||
// Record how many lines this item has to display. This only applies to the Advanced tab.
|
||||
|
||||
@@ -161,6 +161,8 @@ BOOLEAN ChangeDropPackStatus(SOLDIERTYPE *pSoldier, BOOLEAN newStatus);
|
||||
// By saving this in memory, we tell the DescBox which background and values to draw, and make sure that we end up
|
||||
// on the same page every time we open the description box. UDB buttons allow switching between pages.
|
||||
extern UINT8 gubDescBoxPage;
|
||||
// silversurfer: Now we also have a secondary page on the general tab for weapons so we can look at their secondary attributes.
|
||||
extern UINT8 gubDescGenPage;
|
||||
// Record which line we're looking at. This only applied to the Advanced tab in description boxes.
|
||||
extern UINT8 gubDescBoxLine;
|
||||
// Record how many lines there are for the current item in the Advanced tab.
|
||||
|
||||
@@ -6957,7 +6957,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|说|明|页|面:\n \n显示该物品基本的文字描述。",
|
||||
L"|常|规|性|能|页|面:\n \n显示该物品的详细性能数据。",
|
||||
L"|常|规|性|能|页|面:\n \n显示该物品的详细性能数据。\n \nWeapons: Click again to see second page.", // TODO.Translate
|
||||
L"|进|阶|性|能|页|面:\n \n显示使用该物品的额外效果。",
|
||||
};
|
||||
|
||||
|
||||
@@ -6954,7 +6954,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.",
|
||||
L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6942,7 +6942,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.",
|
||||
L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6932,7 +6932,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|P|a|g|e |d|e |d|e|s|c|r|i|p|t|i|o|n :\n \nMontre des informations textuelles de base sur cet objet.",
|
||||
L"|P|r|o|p|r|i|é|t|é|s |g|é|n|é|r|a|l|e|s :\n \nMontre des données spécifiques de cet objet.",
|
||||
L"|P|r|o|p|r|i|é|t|é|s |g|é|n|é|r|a|l|e|s :\n \nMontre des données spécifiques de cet objet.\n \nWeapons: Click again to see second page.", // TODO.Translate
|
||||
L"|P|r|o|p|r|i|é|t|é|s |a|v|a|n|c|é|e|s :\n \nMontre des bonus donnés par cet objet.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6767,7 +6767,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|B|e|s|c|h|r|e|i|b|u|n|g:\n \nZeigt allgemeine Informationen über den Gegenstand.",
|
||||
L"|A|l|l|g|e|m|e|i|n|e |E|i|g|e|n|s|c|h|a|f|t|e|n:\n \nZeigt typische Daten über den Gegenstand.",
|
||||
L"|A|l|l|g|e|m|e|i|n|e |E|i|g|e|n|s|c|h|a|f|t|e|n:\n \nZeigt typische Daten über den Gegenstand.\n \nWaffen: Nochmals klicken um zweite Seite anzuzeigen.",
|
||||
L"|E|r|w|e|i|t|e|r|t|e |E|i|g|e|n|s|c|h|a|f|t|e|n:\n \nZeigt Vor-/Nachteile des Gegenstandes.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6940,7 +6940,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.",
|
||||
L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6958,7 +6958,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.",
|
||||
L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6942,7 +6942,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|И|н|ф|о|р|м|а|ц|и|о|н|н|а|я |ч|а|с|т|ь:\n \nЗдесь вы сможете ознакомиться \nс общим описанием предмета.",
|
||||
L"|П|а|р|а|м|е|т|р|ы:\n \nЗдесь вы сможете ознакомиться \nс индивидуальными свойствами и параметрами предмета.",
|
||||
L"|П|а|р|а|м|е|т|р|ы:\n \nЗдесь вы сможете ознакомиться \nс индивидуальными свойствами и параметрами предмета.\n \nWeapons: Click again to see second page.", // TODO.Translate
|
||||
L"|Д|о|п|о|л|н|и|т|е|л|ь|н|а|я| |и|н|ф|о|р|м|а|ц|и|я:\n \nЗдесь вы сможете ознакомиться \nс бонусами, дающимися данным предметом.",
|
||||
};
|
||||
|
||||
|
||||
@@ -6958,7 +6958,7 @@ STR16 gzItemDescGenIndexes[] =
|
||||
STR16 gzUDBButtonTooltipText[]=
|
||||
{
|
||||
L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.",
|
||||
L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.",
|
||||
L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user