Requires GameDir >= 2227 because of new icons!

EDB now displays available volume and pocket volume for MOLLE items.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7784 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2015-03-16 09:56:29 +00:00
parent 76689ab99d
commit 2afa02c913
10 changed files with 193 additions and 3 deletions
+159 -1
View File
@@ -2267,7 +2267,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
CHAR16 pStr[1000];
///////////////// PRIMARY DATA - ICONS
for (cnt = 0; cnt < 1; cnt++)
for (cnt = 0; cnt < 3; cnt++)
{
MSYS_DefineRegion( &gUDBFasthelpRegions[ iRegionsCreated ],
(INT16)(gItemDescGenRegions[cnt][0].sLeft),
@@ -2291,6 +2291,24 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + 0 ]), pStr );
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + 0 ] );
}
//////////////////// LBE Stuff
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_LBEGEAR )
{
//////////////////// LBE AVAILABLE VOLUME (for MOLLE carriers)
if ( LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume > 0 )
{
swprintf( pStr, L"%s%s", szUDBGenCommonStatsTooltipText[ 1 ], szUDBGenCommonStatsExplanationsTooltipText[ 1 ]);
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + 1 ]), pStr );
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + 1 ] );
}
//////////////////// POCKET VOLUME (for MOLLE pockets)
if ( Item[ gpItemDescObject->usItem ].nasAttachmentClass != 0 && LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbePocketIndex[0] > 0 )
{
swprintf( pStr, L"%s%s", szUDBGenCommonStatsTooltipText[ 2 ], szUDBGenCommonStatsExplanationsTooltipText[ 2 ]);
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + 2 ]), pStr );
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + 2 ] );
}
}
}
}
@@ -5855,6 +5873,20 @@ void DrawMiscStats( OBJECTTYPE * gpItemDescObject )
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 10, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
}
}
//////////////////// LBE Stuff
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_LBEGEAR )
{
//////////////////// LBE AVAILABLE VOLUME (for MOLLE carriers)
if ( LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume > 0 )
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 63, gItemDescGenRegions[1][0].sLeft + sOffsetX, gItemDescGenRegions[1][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
}
//////////////////// POCKET VOLUME (for MOLLE pockets)
if ( Item[ gpItemDescObject->usItem ].nasAttachmentClass != 0 && LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbePocketIndex[0] > 0 )
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 64, gItemDescGenRegions[2][0].sLeft + sOffsetX, gItemDescGenRegions[2][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
}
}
DrawSecondaryStats( gpItemDescObject );
}
@@ -14455,6 +14487,132 @@ void DrawMiscValues( OBJECTTYPE * gpItemDescObject )
FindFontCenterCoordinates( sLeft, sTop, sWidth, sHeight, pStr, BLOCKFONT2, &usX, &usY);
mprintf( usX, usY, pStr );
}
//////////////////// LBE Stuff
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_LBEGEAR )
{
//////////////////// LBE AVAILABLE VOLUME (for MOLLE carriers)
if ( LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume > 0 )
{
// Set line to draw into
ubNumLine = 1;
// Get base available volume
INT16 iAvailableVolume = LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume;
// Get final available volume
INT16 iFinalAvailableVolume = iAvailableVolume - GetVolumeAlreadyTaken( gpItemDescObject, NO_SLOT );
// difference
INT16 iVolumeModifier = iFinalAvailableVolume - iAvailableVolume;
if( !fComparisonMode )
{
// Print base value
DrawPropertyValueInColour( iAvailableVolume, ubNumLine, 1, fComparisonMode, FALSE, TRUE );
// Print modifier
DrawPropertyValueInColour( iVolumeModifier, ubNumLine, 2, fComparisonMode, TRUE, TRUE );
// Print final value
DrawPropertyValueInColour( iFinalAvailableVolume, ubNumLine, 3, fComparisonMode, FALSE, TRUE, FONT_MCOLOR_WHITE );
}
else
{
INT16 iComparedAvailableVolume = 0;
INT16 iComparedFinalAvailableVolume = 0;
if ( Item[ gpComparedItemDescObject->usItem ].usItemClass & IC_LBEGEAR )
{
// Get base available volume
iComparedAvailableVolume = LoadBearingEquipment[ Item[ gpComparedItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume;
// Get final available volume
iComparedFinalAvailableVolume = iComparedAvailableVolume - GetVolumeAlreadyTaken( gpComparedItemDescObject, NO_SLOT );
}
// Print difference in base value
DrawPropertyValueInColour( iComparedAvailableVolume - iAvailableVolume, ubNumLine, 1, fComparisonMode, FALSE, TRUE );
// Print difference in modifier
DrawPropertyTextInColour( L"--", ubNumLine, 2 );
// Print difference in final value
DrawPropertyValueInColour( iComparedFinalAvailableVolume - iFinalAvailableVolume, ubNumLine, 3, fComparisonMode, FALSE, TRUE );
}
}
else if( fComparisonMode && Item[ gpComparedItemDescObject->usItem ].usItemClass & IC_LBEGEAR )
{
if ( LoadBearingEquipment[ Item[ gpComparedItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume > 0
&& LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume > 0)
{
// Set line to draw into
ubNumLine = 1;
// Get base available volume
INT16 iAvailableVolume = LoadBearingEquipment[ Item[ gpComparedItemDescObject->usItem ].ubClassIndex ].lbeAvailableVolume;
// Get final available volume
INT16 iFinalAvailableVolume = iAvailableVolume - GetVolumeAlreadyTaken( gpComparedItemDescObject, NO_SLOT );
// difference
INT16 iVolumeModifier = iFinalAvailableVolume - iAvailableVolume;
// Print base value
DrawPropertyValueInColour( iAvailableVolume, ubNumLine, 1, FALSE, FALSE, TRUE, ITEMDESC_FONTPOSITIVE );
// Print modifier
DrawPropertyValueInColour( iVolumeModifier, ubNumLine, 2, FALSE, TRUE, TRUE );
// Print final value
DrawPropertyValueInColour( iFinalAvailableVolume, ubNumLine, 3, FALSE, FALSE, TRUE, ITEMDESC_FONTPOSITIVE );
}
}
//////////////////// POCKET VOLUME (for MOLLE pockets)
if ( Item[ gpItemDescObject->usItem ].nasAttachmentClass != 0 && LoadBearingEquipment[ Item[ gpItemDescObject->usItem ].ubClassIndex ].lbePocketIndex[0] > 0 )
{
// Set line to draw into
ubNumLine = 2;
// Get base pocket volume
INT16 iPocketVolume = LBEPocketType[GetFirstPocketOnItem(gpItemDescObject->usItem)].pVolume;
// Get final pocket volume
INT16 iFinalPocketVolume = iPocketVolume;
if( !fComparisonMode )
{
// Print base value
DrawPropertyValueInColour( iPocketVolume, ubNumLine, 1, fComparisonMode, FALSE, FALSE );
// Print modifier
DrawPropertyTextInColour( L"--", ubNumLine, 2 );
// Print final value
DrawPropertyValueInColour( iFinalPocketVolume, ubNumLine, 3, fComparisonMode, FALSE, FALSE, FONT_MCOLOR_WHITE );
}
else
{
INT16 iComparedPocketVolume = 0;
INT16 iComparedFinalPocketVolume = 0;
if ( Item[ gpComparedItemDescObject->usItem ].usItemClass & IC_LBEGEAR && Item[ gpComparedItemDescObject->usItem ].nasAttachmentClass != 0 )
{
// Get base available volume
iComparedPocketVolume = LBEPocketType[GetFirstPocketOnItem(gpComparedItemDescObject->usItem)].pVolume;
// Get final available volume
iComparedFinalPocketVolume = iComparedPocketVolume;
}
// Print difference in base value
DrawPropertyValueInColour( iComparedPocketVolume - iPocketVolume, ubNumLine, 1, fComparisonMode, FALSE, FALSE );
// Print difference in modifier
DrawPropertyTextInColour( L"--", ubNumLine, 2 );
// Print difference in final value
DrawPropertyValueInColour( iComparedFinalPocketVolume - iFinalPocketVolume, ubNumLine, 3, fComparisonMode, FALSE, FALSE );
}
}
else if( fComparisonMode && Item[ gpComparedItemDescObject->usItem ].usItemClass & IC_LBEGEAR )
{
if ( Item[ gpComparedItemDescObject->usItem ].nasAttachmentClass != 0 && LoadBearingEquipment[ Item[ gpComparedItemDescObject->usItem ].ubClassIndex ].lbePocketIndex[0] > 0
&& Item[ gpItemDescObject->usItem ].nasAttachmentClass != 0 )
{
// Set line to draw into
ubNumLine = 2;
// base available volume
INT16 iPocketVolume = LBEPocketType[GetFirstPocketOnItem(gpComparedItemDescObject->usItem)].pVolume;
// current available volume
INT16 iFinalPocketVolume = iPocketVolume;
// Print base value
DrawPropertyValueInColour( iPocketVolume, ubNumLine, 1, FALSE, FALSE, FALSE, ITEMDESC_FONTPOSITIVE );
// Print modifier
DrawPropertyTextInColour( L"--", ubNumLine, 2 );
// Print final value
DrawPropertyValueInColour( iFinalPocketVolume, ubNumLine, 3, FALSE, FALSE, FALSE, ITEMDESC_FONTPOSITIVE );
}
}
}
}
if (gubDescBoxPage == 2)
+2 -2
View File
@@ -731,8 +731,8 @@ extern STR16 szUDBGenAmmoStatsTooltipText[ 6 ]; // Flugente Overheating: 3
extern STR16 szUDBGenAmmoStatsExplanationsTooltipText[ 6 ]; // Flugente Overheating: 3->4 poison: 4->5 dirt: 5->6
extern STR16 szUDBGenExplosiveStatsTooltipText[ 23 ]; // silversurfer Repair Ease: 22->23
extern STR16 szUDBGenExplosiveStatsExplanationsTooltipText[ 23 ]; // silversurfer Repair Ease: 22->23
extern STR16 szUDBGenCommonStatsTooltipText[ 1 ]; // silversurfer new for items that don't fit the other categories
extern STR16 szUDBGenCommonStatsExplanationsTooltipText[ 1 ]; // silversurfer new for items that don't fit the other categories
extern STR16 szUDBGenCommonStatsTooltipText[ 3 ]; // silversurfer new for items that don't fit the other categories
extern STR16 szUDBGenCommonStatsExplanationsTooltipText[ 3 ]; // silversurfer new for items that don't fit the other categories
extern STR16 szUDBGenSecondaryStatsTooltipText[]; // Flugente Food System: 26 -> 28 external feeding: 28->30 JMich_SkillsModifiers: 31 for Defusal kit - covert item: 31->32 silversurfer more tags: 32->37
extern STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]; // Flugente Food System: 26 -> 28 external feeding: 28->30 JMich_SkillsModifiers: 31 for Defusal kit - covert item: 31->32 silversurfer more tags: 32->37
extern STR16 szUDBAdvStatsTooltipText[ 66 ]; // Flugente Overheating Weapons: 48->56 poison: 56->57 dirt: 57->58 food:58->64 silversurfer Best Laser Range:64->65 silversurfer PercentRecoilModifier: 66
+4
View File
@@ -7655,11 +7655,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|修|理|难|度",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e", // TODO.Translate
L"|V|o|l|u|m|e", // TODO.Translate
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \n决定了修理难度以及谁可以完全修复其损坏值\n \n绿色 = 任何人都可以修理\n \n红色 = 这个物品不能被修理\n \n 越高越好", //L"\n \nDetermines how difficult it is to repair this item.\n \ngreen = Anybody can repair it.\n \nred = This item can't be repaired.\n \nHigher is better.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.", // TODO.Translate
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7663,11 +7663,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|R|e|p|a|i|r |E|a|s|e",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e",
L"|V|o|l|u|m|e",
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nDetermines how difficult it is to repair this item.\n \ngreen = Anybody can repair it.\n \nred = This item can't be repaired.\n \nHigher is better.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.",
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.",
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7653,11 +7653,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|R|e|p|a|i|r |E|a|s|e",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e",
L"|V|o|l|u|m|e",
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nDetermines how difficult it is to repair this item.\n \ngreen = Anybody can repair it.\n \nred = This item can't be repaired.\n \nHigher is better.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.",
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.",
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7654,11 +7654,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|F|a|c|i|l|i|t|é |d|e |r|é|p|a|r|a|t|i|o|n",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e", // TODO.Translate
L"|V|o|l|u|m|e", // TODO.Translate
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nDétermine la difficulté à réparer complètement un objet.\n \nVert = N'importe qui peut le réparer.\n \nRouge = Il ne peut pas être réparé.\n \nValeur élevée recommandée.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.", // TODO.Translate
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7484,11 +7484,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|R|e|p|a|r|i|e|r|f|ä|h|i|g|k|e|i|t",
L"|V|e|r|f|ü|g|b|a|r|e|r |P|l|a|t|z",
L"|P|l|a|t|z|b|e|d|a|r|f",
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nBestimmt, wie schwierig es ist, diesen Gegenstand zu reparieren.\n \ngrün = Jeder kann ihn reparieren.\n \nrot = Dieser Gegenstand kann nicht repariert werden.\n \nHöher ist besser.",
L"\n \nBestimmt, wieviel Platz dieser MOLLE Träger für Taschen bietet.\n \nHöher ist besser.",
L"\n \nBestimmt, wieviel Platz diese Tasche auf einem MOLLE Träger einnimmt.\n \nNiedriger ist besser.",
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7657,11 +7657,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|R|e|p|a|i|r |E|a|s|e",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e",
L"|V|o|l|u|m|e",
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nDetermines how difficult it is to repair this item.\n \ngreen = Anybody can repair it.\n \nred = This item can't be repaired.\n \nHigher is better.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.",
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.",
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7673,11 +7673,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|R|e|p|a|i|r |E|a|s|e",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e",
L"|V|o|l|u|m|e",
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nDetermines how difficult it is to repair this item.\n \ngreen = Anybody can repair it.\n \nred = This item can't be repaired.\n \nHigher is better.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.",
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.",
};
STR16 szUDBGenSecondaryStatsTooltipText[]=
+4
View File
@@ -7647,11 +7647,15 @@ STR16 szUDBGenExplosiveStatsExplanationsTooltipText[]=
STR16 szUDBGenCommonStatsTooltipText[]=
{
L"|Л|ё|г|к|о|с|т|ь |п|о|ч|и|н|к|и",
L"|A|v|a|i|l|a|b|l|e |V|o|l|u|m|e", // TODO.Translate
L"|V|o|l|u|m|e", // TODO.Translate
};
STR16 szUDBGenCommonStatsExplanationsTooltipText[]=
{
L"\n \nОпределяет сложность починки этого предмета,\nа также то, кто сможет полностью починить его.\nЗеленый - может починить кто угодно.\n \nКрасный - эту вещь починить невозможно.\n \nБольше - лучше.",
L"\n \nDetermines how much space is available on this MOLLE carrier.\n \nHigher is better.", // TODO.Translate
L"\n \nDetermines how much space this MOLLE pocket will occupy.\n \nLower is better.", // TODO.Translate
};
STR16 szUDBGenSecondaryStatsTooltipText[]=