mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
New Misc filter buttons for Bobby Rays, by attachmentClass:
(attachment tag must also be 1) BR_MISC_FILTER_OPTICS (AC_SCOPE | AC_SIGHT) BR_MISC_FILTER_SIDE_BOTTOM (AC_LASER | AC_FOREGRIP | AC_BIPOD) BR_MISC_FILTER_MUZZLE (AC_SUPPRESSOR | AC_EXTENDER) BR_MISC_FILTER_STOCK AC_STOCK BR_MISC_FILTER_INTERNAL (AC_MAGWELL | AC_INTERNAL | AC_EXTERNAL) BR_MISC_FILTER_OTHER_ATTACHMENTS for all other attachment classes BR_MISC_FILTER_NO_ATTACHMENTS for the original button; it no longer displays any attachments git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5285 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+115
-22
@@ -149,13 +149,14 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ 100 ];
|
|||||||
#define FILTER_BUTTONS_USED_START_X FILTER_BUTTONS_GUN_START_X //FILTER_BUTTONS_GUN_START_X + 122
|
#define FILTER_BUTTONS_USED_START_X FILTER_BUTTONS_GUN_START_X //FILTER_BUTTONS_GUN_START_X + 122
|
||||||
#define FILTER_BUTTONS_ARMOUR_START_X FILTER_BUTTONS_GUN_START_X
|
#define FILTER_BUTTONS_ARMOUR_START_X FILTER_BUTTONS_GUN_START_X
|
||||||
#define FILTER_BUTTONS_MISC_START_X FILTER_BUTTONS_GUN_START_X
|
#define FILTER_BUTTONS_MISC_START_X FILTER_BUTTONS_GUN_START_X
|
||||||
#define FILTER_BUTTONS_Y BOBBYR_PREVIOUS_BUTTON_Y + 25
|
#define FILTER_BUTTONS_Y_OFFSET 22 //Madd: added to standardize this value, and decreased slightly from 25 to make more room
|
||||||
|
#define FILTER_BUTTONS_Y BOBBYR_PREVIOUS_BUTTON_Y + FILTER_BUTTONS_Y_OFFSET
|
||||||
|
|
||||||
// The number of filter buttons which category uses
|
// The number of filter buttons which category uses
|
||||||
#define NUMBER_GUNS_FILTER_BUTTONS 9
|
#define NUMBER_GUNS_FILTER_BUTTONS 9
|
||||||
#define NUMBER_AMMO_FILTER_BUTTONS 8
|
#define NUMBER_AMMO_FILTER_BUTTONS 8
|
||||||
#define NUMBER_ARMOUR_FILTER_BUTTONS 4
|
#define NUMBER_ARMOUR_FILTER_BUTTONS 4
|
||||||
#define NUMBER_MISC_FILTER_BUTTONS 10
|
#define NUMBER_MISC_FILTER_BUTTONS 16 // Madd: Increased to 16 for new categories
|
||||||
#define NUMBER_USED_FILTER_BUTTONS 4
|
#define NUMBER_USED_FILTER_BUTTONS 4
|
||||||
|
|
||||||
#define BOBBYR_GUNS_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_GUNS_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
@@ -164,6 +165,17 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ 100 ];
|
|||||||
#define BOBBYR_ARMOUR_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_ARMOUR_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
#define BOBBYR_MISC_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_MISC_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
|
|
||||||
|
//Madd: new BR filters
|
||||||
|
#define BR_MISC_FILTER_OPTICS (AC_SCOPE | AC_SIGHT)
|
||||||
|
#define BR_MISC_FILTER_SIDE_BOTTOM (AC_LASER | AC_FOREGRIP | AC_BIPOD)
|
||||||
|
#define BR_MISC_FILTER_MUZZLE (AC_SUPPRESSOR | AC_EXTENDER)
|
||||||
|
#define BR_MISC_FILTER_STOCK AC_STOCK
|
||||||
|
#define BR_MISC_FILTER_INTERNAL (AC_MAGWELL | AC_INTERNAL | AC_EXTERNAL)
|
||||||
|
#define BR_MISC_FILTER_STD_ATTACHMENTS (BR_MISC_FILTER_OPTICS | BR_MISC_FILTER_SIDE_BOTTOM | BR_MISC_FILTER_MUZZLE | BR_MISC_FILTER_STOCK | BR_MISC_FILTER_INTERNAL)
|
||||||
|
#define BR_MISC_FILTER_OTHER_ATTACHMENTS AC_SLING
|
||||||
|
#define BR_MISC_FILTER_NO_ATTACHMENTS 0
|
||||||
|
|
||||||
|
|
||||||
UINT32 guiBobbyRFilterGuns[ NUMBER_GUNS_FILTER_BUTTONS ];
|
UINT32 guiBobbyRFilterGuns[ NUMBER_GUNS_FILTER_BUTTONS ];
|
||||||
UINT32 guiBobbyRFilterAmmo[ NUMBER_AMMO_FILTER_BUTTONS ];
|
UINT32 guiBobbyRFilterAmmo[ NUMBER_AMMO_FILTER_BUTTONS ];
|
||||||
UINT32 guiBobbyRFilterArmour[ NUMBER_ARMOUR_FILTER_BUTTONS ];
|
UINT32 guiBobbyRFilterArmour[ NUMBER_ARMOUR_FILTER_BUTTONS ];
|
||||||
@@ -223,10 +235,14 @@ INT8 ubFilterMiscButtonValues[] = {
|
|||||||
BOBBYR_FILTER_MISC_KIT,
|
BOBBYR_FILTER_MISC_KIT,
|
||||||
BOBBYR_FILTER_MISC_FACE,
|
BOBBYR_FILTER_MISC_FACE,
|
||||||
BOBBYR_FILTER_MISC_LBEGEAR,
|
BOBBYR_FILTER_MISC_LBEGEAR,
|
||||||
|
BOBBYR_FILTER_MISC_OPTICS_ATTACHMENTS, // Madd: new BR filters
|
||||||
|
BOBBYR_FILTER_MISC_SIDE_AND_BOTTOM_ATTACHMENTS,
|
||||||
|
BOBBYR_FILTER_MISC_MUZZLE_ATTACHMENTS,
|
||||||
|
BOBBYR_FILTER_MISC_STOCK_ATTACHMENTS,
|
||||||
|
BOBBYR_FILTER_MISC_INTERNAL_ATTACHMENTS,
|
||||||
|
BOBBYR_FILTER_MISC_OTHER_ATTACHMENTS,
|
||||||
BOBBYR_FILTER_MISC_MISC};
|
BOBBYR_FILTER_MISC_MISC};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern BOOLEAN fExitingLaptopFlag;
|
extern BOOLEAN fExitingLaptopFlag;
|
||||||
|
|
||||||
UINT32 guiGunBackground;
|
UINT32 guiGunBackground;
|
||||||
@@ -346,6 +362,7 @@ void GameInitBobbyRGuns()
|
|||||||
guiCurrentUsedFilterMode = -1;
|
guiCurrentUsedFilterMode = -1;
|
||||||
guiCurrentArmourFilterMode = -1;
|
guiCurrentArmourFilterMode = -1;
|
||||||
guiCurrentMiscFilterMode = -1;
|
guiCurrentMiscFilterMode = -1;
|
||||||
|
guiCurrentMiscSubFilterMode = -1;
|
||||||
|
|
||||||
memset(&BobbyRayPurchases, 0, gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
memset(&BobbyRayPurchases, 0, gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
}
|
}
|
||||||
@@ -525,7 +542,7 @@ BOOLEAN InitBobbyRGunsFilterBar()
|
|||||||
if (i > 7)
|
if (i > 7)
|
||||||
{
|
{
|
||||||
usPosX = FILTER_BUTTONS_GUN_START_X;
|
usPosX = FILTER_BUTTONS_GUN_START_X;
|
||||||
usYOffset = 25;
|
usYOffset = FILTER_BUTTONS_Y_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
@@ -568,7 +585,7 @@ BOOLEAN InitBobbyRAmmoFilterBar()
|
|||||||
if (i > 7)
|
if (i > 7)
|
||||||
{
|
{
|
||||||
usPosX = FILTER_BUTTONS_AMMO_START_X;
|
usPosX = FILTER_BUTTONS_AMMO_START_X;
|
||||||
usYOffset = 25;
|
usYOffset = FILTER_BUTTONS_Y_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
@@ -610,7 +627,7 @@ BOOLEAN InitBobbyRArmourFilterBar()
|
|||||||
if (i > 7)
|
if (i > 7)
|
||||||
{
|
{
|
||||||
usPosX = FILTER_BUTTONS_ARMOUR_START_X;
|
usPosX = FILTER_BUTTONS_ARMOUR_START_X;
|
||||||
usYOffset = 25;
|
usYOffset = FILTER_BUTTONS_Y_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
@@ -676,7 +693,7 @@ BOOLEAN InitBobbyRMiscFilterBar()
|
|||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX = 0, usPosY = 0;
|
UINT16 usPosX = 0, usPosY = 0;
|
||||||
UINT8 bCurMode;
|
UINT8 bCurMode;
|
||||||
UINT16 usYOffset = 25, sItemWidth = 8;
|
UINT16 usYOffset = FILTER_BUTTONS_Y_OFFSET - 2, sItemWidth = 8; //Madd: reduced Y offset to 20 to make more room
|
||||||
UINT16 usXOffset = BOBBYR_MISC_FILTER_BUTTON_GAP;
|
UINT16 usXOffset = BOBBYR_MISC_FILTER_BUTTON_GAP;
|
||||||
|
|
||||||
bCurMode = 0;
|
bCurMode = 0;
|
||||||
@@ -693,6 +710,7 @@ BOOLEAN InitBobbyRMiscFilterBar()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
usPosX = FILTER_BUTTONS_MISC_START_X + ( (bCurMode % sItemWidth) * usXOffset);
|
usPosX = FILTER_BUTTONS_MISC_START_X + ( (bCurMode % sItemWidth) * usXOffset);
|
||||||
usPosY = FILTER_BUTTONS_Y + ( (bCurMode / sItemWidth) * usYOffset);
|
usPosY = FILTER_BUTTONS_Y + ( (bCurMode / sItemWidth) * usYOffset);
|
||||||
|
|
||||||
@@ -945,9 +963,11 @@ void BtnBobbyRPageMenuCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
break;
|
break;
|
||||||
case LAPTOP_MODE_BOBBY_R_MISC:
|
case LAPTOP_MODE_BOBBY_R_MISC:
|
||||||
guiPrevMiscFilterMode = guiCurrentMiscFilterMode;
|
guiPrevMiscFilterMode = guiCurrentMiscFilterMode;
|
||||||
|
guiPrevMiscSubFilterMode = guiCurrentMiscSubFilterMode;
|
||||||
guiCurrentMiscFilterMode = -1;
|
guiCurrentMiscFilterMode = -1;
|
||||||
|
guiCurrentMiscSubFilterMode = -1;
|
||||||
UpdateMiscFilterButtons();
|
UpdateMiscFilterButtons();
|
||||||
SetFirstLastPagesForNew(IC_BOBBY_MISC, guiCurrentMiscFilterMode);
|
SetFirstLastPagesForNew(IC_BOBBY_MISC, guiCurrentMiscFilterMode, guiCurrentMiscSubFilterMode);
|
||||||
break;
|
break;
|
||||||
case LAPTOP_MODE_BOBBY_R_USED:
|
case LAPTOP_MODE_BOBBY_R_USED:
|
||||||
guiPrevUsedFilterMode = guiCurrentUsedFilterMode;
|
guiPrevUsedFilterMode = guiCurrentUsedFilterMode;
|
||||||
@@ -1221,7 +1241,9 @@ void BtnBobbyRFilterMiscCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
guiPrevMiscFilterMode = guiCurrentMiscFilterMode;
|
guiPrevMiscFilterMode = guiCurrentMiscFilterMode;
|
||||||
|
guiPrevMiscSubFilterMode = guiCurrentMiscSubFilterMode;
|
||||||
|
|
||||||
|
guiCurrentMiscSubFilterMode = -1;
|
||||||
switch (bNewValue)
|
switch (bNewValue)
|
||||||
{
|
{
|
||||||
case BOBBYR_FILTER_MISC_BLADE:
|
case BOBBYR_FILTER_MISC_BLADE:
|
||||||
@@ -1251,12 +1273,37 @@ void BtnBobbyRFilterMiscCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
case BOBBYR_FILTER_MISC_LBEGEAR:
|
case BOBBYR_FILTER_MISC_LBEGEAR:
|
||||||
guiCurrentMiscFilterMode = IC_LBEGEAR;
|
guiCurrentMiscFilterMode = IC_LBEGEAR;
|
||||||
break;
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_OPTICS_ATTACHMENTS: // Madd: New BR filters
|
||||||
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_OPTICS;
|
||||||
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_SIDE_AND_BOTTOM_ATTACHMENTS:
|
||||||
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_SIDE_BOTTOM;
|
||||||
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_MUZZLE_ATTACHMENTS:
|
||||||
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_MUZZLE;
|
||||||
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_STOCK_ATTACHMENTS:
|
||||||
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_STOCK;
|
||||||
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_INTERNAL_ATTACHMENTS:
|
||||||
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_INTERNAL;
|
||||||
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_OTHER_ATTACHMENTS:
|
||||||
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_OTHER_ATTACHMENTS;
|
||||||
|
break;
|
||||||
case BOBBYR_FILTER_MISC_MISC:
|
case BOBBYR_FILTER_MISC_MISC:
|
||||||
guiCurrentMiscFilterMode = IC_MISC;
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
|
guiCurrentMiscSubFilterMode = BR_MISC_FILTER_NO_ATTACHMENTS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFirstLastPagesForNew(IC_BOBBY_MISC, guiCurrentMiscFilterMode);
|
SetFirstLastPagesForNew(IC_BOBBY_MISC, guiCurrentMiscFilterMode,guiCurrentMiscSubFilterMode);
|
||||||
|
|
||||||
UpdateMiscFilterButtons();
|
UpdateMiscFilterButtons();
|
||||||
|
|
||||||
@@ -1338,7 +1385,7 @@ void BtnBobbyRNextPreviousPageCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter, INT32 iSubFilter)
|
||||||
{
|
{
|
||||||
UINT16 i;
|
UINT16 i;
|
||||||
UINT8 ubCount=0;
|
UINT8 ubCount=0;
|
||||||
@@ -1635,12 +1682,19 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
// MISC
|
// MISC
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (iFilter > -1)
|
if (iFilter > -1 && Item[usItemIndex].usItemClass == iFilter)
|
||||||
{
|
{
|
||||||
if (Item[usItemIndex].usItemClass == iFilter)
|
if ( iSubFilter > -1 ) // Madd: new BR filters
|
||||||
{
|
{
|
||||||
bAddItem = TRUE;
|
if (Item[usItemIndex].attachment && Item[usItemIndex].attachmentclass & iSubFilter )
|
||||||
|
bAddItem = TRUE;
|
||||||
|
else if (iSubFilter == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && Item[usItemIndex].attachment)
|
||||||
|
bAddItem = TRUE;
|
||||||
|
else if (iSubFilter == BR_MISC_FILTER_NO_ATTACHMENTS && !Item[usItemIndex].attachment)
|
||||||
|
bAddItem = TRUE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
bAddItem = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2203,7 +2257,7 @@ void CalculateFirstAndLastIndexs()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Loops through Bobby Rays Inventory to find the first and last index
|
//Loops through Bobby Rays Inventory to find the first and last index
|
||||||
void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter )
|
void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter, INT32 iSubFilter )
|
||||||
{
|
{
|
||||||
UINT16 i;
|
UINT16 i;
|
||||||
INT16 sFirst = -1;
|
INT16 sFirst = -1;
|
||||||
@@ -2260,10 +2314,20 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// Misc
|
// Misc
|
||||||
case IC_BOBBY_MISC:
|
case IC_BOBBY_MISC:
|
||||||
if (Item[usItemIndex].usItemClass == iFilter)
|
if (Item[usItemIndex].usItemClass == iFilter) // Madd: new BR filter options
|
||||||
{
|
{
|
||||||
bCntNumItems = TRUE;
|
if (iSubFilter > -1 )
|
||||||
|
{
|
||||||
|
if (Item[usItemIndex].attachment && Item[usItemIndex].attachmentclass & iSubFilter)
|
||||||
|
bCntNumItems = TRUE;
|
||||||
|
else if (iSubFilter == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && Item[usItemIndex].attachment)
|
||||||
|
bCntNumItems = TRUE;
|
||||||
|
else if (iSubFilter == BR_MISC_FILTER_NO_ATTACHMENTS && !Item[usItemIndex].attachment )
|
||||||
|
bCntNumItems = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bCntNumItems = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3368,6 +3432,12 @@ void UpdateMiscFilterButtons()
|
|||||||
if(guiBobbyRFilterMisc[8])
|
if(guiBobbyRFilterMisc[8])
|
||||||
EnableButton(guiBobbyRFilterMisc[8]);
|
EnableButton(guiBobbyRFilterMisc[8]);
|
||||||
EnableButton(guiBobbyRFilterMisc[9]);
|
EnableButton(guiBobbyRFilterMisc[9]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[10]); // Madd: New BR filter options
|
||||||
|
EnableButton(guiBobbyRFilterMisc[11]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[12]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[13]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[14]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[15]);
|
||||||
|
|
||||||
switch (guiCurrentMiscFilterMode)
|
switch (guiCurrentMiscFilterMode)
|
||||||
{
|
{
|
||||||
@@ -3399,7 +3469,21 @@ void UpdateMiscFilterButtons()
|
|||||||
DisableButton(guiBobbyRFilterMisc[8]);
|
DisableButton(guiBobbyRFilterMisc[8]);
|
||||||
break;
|
break;
|
||||||
case IC_MISC:
|
case IC_MISC:
|
||||||
DisableButton(guiBobbyRFilterMisc[9]);
|
// Madd: new BR filters
|
||||||
|
if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_OPTICS)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[9]);
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_SIDE_BOTTOM)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[10]);
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_MUZZLE)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[11]);
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_STOCK)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[12]);
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_INTERNAL)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[13]);
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_OTHER_ATTACHMENTS)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[14]);
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_NO_ATTACHMENTS)
|
||||||
|
DisableButton(guiBobbyRFilterMisc[15]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3639,11 +3723,20 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
usItemIndex = LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex;
|
usItemIndex = LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex;
|
||||||
|
|
||||||
if (Item[usItemIndex].usItemClass == guiCurrentMiscFilterMode)
|
if (Item[usItemIndex].usItemClass == guiCurrentMiscFilterMode)
|
||||||
{
|
{
|
||||||
bCntItem = TRUE;
|
if (guiCurrentMiscSubFilterMode > -1) // Madd: new BR filter options
|
||||||
|
{
|
||||||
|
if (Item[usItemIndex].attachment && Item[usItemIndex].attachmentclass & guiCurrentMiscSubFilterMode)
|
||||||
|
bCntItem = TRUE;
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && Item[usItemIndex].attachment)
|
||||||
|
bCntItem = TRUE;
|
||||||
|
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_NO_ATTACHMENTS && !Item[usItemIndex].attachment)
|
||||||
|
bCntItem = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bCntItem = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -53,7 +53,7 @@ BOOLEAN DeleteBobbyMenuBar();
|
|||||||
|
|
||||||
|
|
||||||
//BOOLEAN DisplayWeaponInfo();
|
//BOOLEAN DisplayWeaponInfo();
|
||||||
BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter);
|
BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter, INT32 iSubFilter = -1); // Madd: added iSubFilter for new BR filter options
|
||||||
void DeleteMouseRegionForBigImage();
|
void DeleteMouseRegionForBigImage();
|
||||||
void UpdateButtonText(UINT32 uiCurPage);
|
void UpdateButtonText(UINT32 uiCurPage);
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ void DailyUpdateOfBobbyRaysUsedInventory();
|
|||||||
UINT16 CalcBobbyRayCost( UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
UINT16 CalcBobbyRayCost( UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
||||||
//void CalculateFirstAndLastIndexs();
|
//void CalculateFirstAndLastIndexs();
|
||||||
void SetFirstLastPagesForUsed(INT32 iFilter);
|
void SetFirstLastPagesForUsed(INT32 iFilter);
|
||||||
void SetFirstLastPagesForNew( UINT32 uiClass, INT32 iFilter );
|
void SetFirstLastPagesForNew( UINT32 uiClass, INT32 iFilter , INT32 iSubFilter = -1); // Madd: added iSubFilter for new BR filter options
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,10 @@ BOOLEAN EnterBobbyRMisc()
|
|||||||
|
|
||||||
guiPrevMiscFilterMode = -1;
|
guiPrevMiscFilterMode = -1;
|
||||||
guiCurrentMiscFilterMode = -1;
|
guiCurrentMiscFilterMode = -1;
|
||||||
|
guiCurrentMiscSubFilterMode = -1;
|
||||||
|
guiPrevMiscSubFilterMode = -1;
|
||||||
|
|
||||||
SetFirstLastPagesForNew( IC_BOBBY_MISC, guiCurrentMiscFilterMode );
|
SetFirstLastPagesForNew( IC_BOBBY_MISC, guiCurrentMiscFilterMode, guiCurrentMiscSubFilterMode );
|
||||||
|
|
||||||
//Draw menu bar
|
//Draw menu bar
|
||||||
InitBobbyMenuBar( );
|
InitBobbyMenuBar( );
|
||||||
@@ -89,7 +91,7 @@ void RenderBobbyRMisc()
|
|||||||
GetVideoObject(&hPixHandle, guiMiscGrid);
|
GetVideoObject(&hPixHandle, guiMiscGrid);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
DisplayItemInfo(IC_BOBBY_MISC, guiCurrentMiscFilterMode);
|
DisplayItemInfo(IC_BOBBY_MISC, guiCurrentMiscFilterMode, guiCurrentMiscSubFilterMode);
|
||||||
UpdateButtonText(guiCurrentLaptopMode);
|
UpdateButtonText(guiCurrentLaptopMode);
|
||||||
UpdateMiscFilterButtons();
|
UpdateMiscFilterButtons();
|
||||||
|
|
||||||
|
|||||||
@@ -303,6 +303,8 @@ INT32 guiPrevArmourFilterMode;
|
|||||||
|
|
||||||
INT32 guiCurrentMiscFilterMode;
|
INT32 guiCurrentMiscFilterMode;
|
||||||
INT32 guiPrevMiscFilterMode;
|
INT32 guiPrevMiscFilterMode;
|
||||||
|
INT32 guiCurrentMiscSubFilterMode; // Madd: new BR filter options
|
||||||
|
INT32 guiPrevMiscSubFilterMode;
|
||||||
|
|
||||||
BOOLEAN gbMessageDisplayed;
|
BOOLEAN gbMessageDisplayed;
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ extern INT32 guiPrevArmourFilterMode;
|
|||||||
|
|
||||||
extern INT32 guiCurrentMiscFilterMode;
|
extern INT32 guiCurrentMiscFilterMode;
|
||||||
extern INT32 guiPrevMiscFilterMode;
|
extern INT32 guiPrevMiscFilterMode;
|
||||||
|
extern INT32 guiCurrentMiscSubFilterMode;
|
||||||
|
extern INT32 guiPrevMiscSubFilterMode;
|
||||||
|
|
||||||
extern BOOLEAN gbMessageDisplayed;
|
extern BOOLEAN gbMessageDisplayed;
|
||||||
|
|
||||||
|
|||||||
@@ -1113,6 +1113,12 @@ enum
|
|||||||
BOBBYR_FILTER_MISC_KIT,
|
BOBBYR_FILTER_MISC_KIT,
|
||||||
BOBBYR_FILTER_MISC_FACE,
|
BOBBYR_FILTER_MISC_FACE,
|
||||||
BOBBYR_FILTER_MISC_LBEGEAR,
|
BOBBYR_FILTER_MISC_LBEGEAR,
|
||||||
|
BOBBYR_FILTER_MISC_OPTICS_ATTACHMENTS, // Madd: New BR filter option
|
||||||
|
BOBBYR_FILTER_MISC_SIDE_AND_BOTTOM_ATTACHMENTS, // Madd: New BR filter option
|
||||||
|
BOBBYR_FILTER_MISC_MUZZLE_ATTACHMENTS, // Madd: New BR filter option
|
||||||
|
BOBBYR_FILTER_MISC_STOCK_ATTACHMENTS, // Madd: New BR filter option
|
||||||
|
BOBBYR_FILTER_MISC_INTERNAL_ATTACHMENTS, // Madd: New BR filter option
|
||||||
|
BOBBYR_FILTER_MISC_OTHER_ATTACHMENTS, // Madd: New BR filter option
|
||||||
BOBBYR_FILTER_MISC_MISC,
|
BOBBYR_FILTER_MISC_MISC,
|
||||||
TEXT_NUM_BOBBYR_FILTER
|
TEXT_NUM_BOBBYR_FILTER
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4429,6 +4429,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"工具套装", //"Kits",
|
L"工具套装", //"Kits",
|
||||||
L"头部装备", //"Face Items",
|
L"头部装备", //"Face Items",
|
||||||
L"携行具", //"LBE Gear",
|
L"携行具", //"LBE Gear",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"杂项", //"Misc.",
|
L"杂项", //"Misc.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4429,6 +4429,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Kits",
|
L"Kits",
|
||||||
L"Face Items",
|
L"Face Items",
|
||||||
L"LBE Gear",
|
L"LBE Gear",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Misc.",
|
L"Misc.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4427,6 +4427,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Kits",
|
L"Kits",
|
||||||
L"Face Items",
|
L"Face Items",
|
||||||
L"LBE Gear",
|
L"LBE Gear",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Misc.",
|
L"Misc.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4419,6 +4419,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Kits",
|
L"Kits",
|
||||||
L"Mat. Face",
|
L"Mat. Face",
|
||||||
L"Mat. LBE",
|
L"Mat. LBE",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Divers",
|
L"Divers",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4330,6 +4330,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Taschen",
|
L"Taschen",
|
||||||
L"Kopfausr.",
|
L"Kopfausr.",
|
||||||
L"Trageausr.",
|
L"Trageausr.",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Sonstiges",
|
L"Sonstiges",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4417,6 +4417,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Kits",
|
L"Kits",
|
||||||
L"Face Items",
|
L"Face Items",
|
||||||
L"LBE Gear",
|
L"LBE Gear",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Misc.",
|
L"Misc.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4425,6 +4425,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Ekwipunek",
|
L"Ekwipunek",
|
||||||
L"Na twarz",
|
L"Na twarz",
|
||||||
L"Oporządzenie", //LBE Gear
|
L"Oporządzenie", //LBE Gear
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Inne",
|
L"Inne",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4416,6 +4416,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Наборы",
|
L"Наборы",
|
||||||
L"Головные",
|
L"Головные",
|
||||||
L"Разгр.с-мы",
|
L"Разгр.с-мы",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Разное",
|
L"Разное",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4430,6 +4430,12 @@ STR16 BobbyRFilter[] =
|
|||||||
L"Kits",
|
L"Kits",
|
||||||
L"Face Items",
|
L"Face Items",
|
||||||
L"LBE Gear",
|
L"LBE Gear",
|
||||||
|
L"Optics", // Madd: new BR filters
|
||||||
|
L"Side/Bot.",
|
||||||
|
L"Muzzle",
|
||||||
|
L"Stock",
|
||||||
|
L"Mag/Trig.",
|
||||||
|
L"Other Att.",
|
||||||
L"Misc.",
|
L"Misc.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user