From c739efc56e39ab5ea78c0e0ef0a010494904bf1c Mon Sep 17 00:00:00 2001 From: Wanne Date: Fri, 11 Aug 2006 10:21:36 +0000 Subject: [PATCH] Bobby Ray: Filter Guns, Ammo and Used! Filters for Armour and Misc will follow git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@423 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- JA2.suo | Bin 82432 -> 86016 bytes Laptop/BobbyR.h | 2 +- Laptop/BobbyRAmmo.cpp | 26 +- Laptop/BobbyRArmour.cpp | 15 +- Laptop/BobbyRGuns.cpp | 1149 +++++++++++++++++++++++++++++++++++---- Laptop/BobbyRGuns.h | 23 +- Laptop/BobbyRMisc.cpp | 12 +- Laptop/BobbyRUsed.cpp | 18 +- Laptop/laptop.cpp | 18 + Laptop/laptop.h | 18 + Utils/Text.h | 31 ++ Utils/_DutchText.cpp | 30 + Utils/_EnglishText.cpp | 30 + Utils/_FrenchText.cpp | 30 + Utils/_GermanText.cpp | 30 + Utils/_ItalianText.cpp | 30 + Utils/_PolishText.cpp | 30 + Utils/_RussianText.cpp | 31 ++ gamescreen.cpp | 1 - 19 files changed, 1388 insertions(+), 136 deletions(-) diff --git a/JA2.suo b/JA2.suo index 4706cb493648dfe69eb2cadd41bd543e55606b04..e272ee56abe268a28c5ff76ce39bc86ba9629072 100644 GIT binary patch delta 2868 zcmcImTTGNk6rQs;7Wi3~<-T%R6_HZFg$2A(0fmZ)inc}*wdGbVmI5wY1Gp`ac%jxN z#wkp#X+vr2gSBbxMmK5FCYnMM`$C&0eQ4U)SJQ_kweeQne&^pspc+yioIl@x&YU@O z=FFLM=Klu|n+M0tU(^_)GlUTLL!nTT++@f$$Do%PIAFL-Hc_7T{<5zp$p}%^aG>9G zis+V%vv^E*NQgj7# zgsk5gR_+H|B6ed^7fg6XE0kS$cj?o1i}1Kh92CW(2=G9+1)A+L6k8J~Y_Q22fd3)+ zgDJ*TG^o zP>bEQ>ju0m3be()Xp9q?;MvObX5Dj!`}Tz}K`wo9+W>E2BB?SYO@ zRa&V!dIiE(4d`hf4Jvr2C0qni7m*;}nuIK#*s7+?r`6WcJ>r;o5kXQUeX z1lwo__CT92m1)~Eo8hrpO%|G>RaHJ64PLh+UZWb-Sz|FieQ-gaM(0SmY?P;tCs1$D znMl_ysws!+RJWb_gOm9*Y94h`BbBPHPWp@-sydrw@O%b2EkSDz-7>TGrQjtSoh9{6 z0l9*HH?1|REH~AwYZgjT1lwaUu9lwrxo`F-xw`i zhY^~kuQk6u7ZW$8%l?Oct|hF`G-Ce*`*S39#)m5$A~dG%u+4{bWJHIlE3DJ44%lgf zvMnXYk{viVz6iT;dOfqYcbhLUG^Uy1XO^a!QH&*&N;v)5q~8 z$RA-erm3@iSw1@o56ACZRCpfK1z=MF-933>B7HQLa#x!5&mi)VTdEi~P7>A#g_alu ze>k}fudcO^Rn*#fVpQZHSJ9~j4dfrGq^HQQE|<~vf%!b~3%@udYJ?l#xnfZ*%EUTR zE(%fm9`Gx{m13k6V}^UV=Y@bwD*xB3_3h#U-B7ISwz(o!{dml7oLW zr20j@Zlwsf5Eq{pxw>EY)j~I|SKdlW8+a1F&hd2Vyp9^hyCl0^2(J2kF?m!B(HijZ zZ=-TAq@sZy{91KCsI4dAt*5lCe2&L?vpi0IC>spIHGgc89vcTb^*_R9y!m&o2JgKn z*-lWtC|*W_Jc$(Hjc^8!WJQftj6}_(Fgtw+`NcU^Cd$6dzd|ZEgN~}aN@|PS#k0_u RhU-n2+x4GA$e5-9{{juNU6=p> delta 1857 zcmb_cTWpj?6h3GB@1@&+w@bULW$6`2X)1+MG@;zAvJp5o^#GWBy(F zT+0n{w;EhSj#WA04s4<%?WS&U+_bb(FQg>o9_j#3R@!sXQ5%7>m!5)a zryZgVV}knO)Jbi$0b#mflga(i$HBM3J4!VwozviBKUTwL>`#4VEOg0c+Z}4q9CRH6 zYgAj;Ob_Q0F%w-8t3fnh&GF}Fe+l7hfJ9Pt{sCjbT@Vhd5RN3v1B1N~=vL8`y`9_F{xe1#$~kA27jghjK3x?-O+%hHdbS+sZh&E>TN>_0$eO36Kz#)tXlYP#kb38{xmLjk zm2<}yvI?IbO=mXNLI@mmP(podld;0RJNJ67Vwc3UFLi#Y*^jwK+B~ z^af-J`X=aGz}vvgN6{lZVesNqlfg;WS3JB#``uhqMN*z9(|URsh5L_1Ogq)+`F!ng za)lb{G<27nkKf;c=y5bal1gbct--kGFLl%kYZT~5sV#w3`mLKD6JMQna|sWPk8;_w zF^Zt*qBH=91U19G8!nGyO3W_eK7`nWb|sRt+lLKHk?uuxO2>8CRVp(xO&+&r(3$bE#8y-Q!yz zk25}@3o|ie%lKZ_Tb;Z^e^bci|7nMN^yG5hk@~TQrwo0ph1-44W!591L0PauiFlags & BUTTON_ENABLED)) return; + //gbMessageDisplayed = TRUE; + if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN ) { btn->uiFlags |= BUTTON_CLICKED_ON; @@ -527,9 +748,53 @@ void BtnBobbyRPageMenuCallback(GUI_BUTTON *btn,INT32 reason) guiTempCurrentMode = BOBBYR_DEFAULT_MENU_COLOR; UpdateButtonText(guiCurrentLaptopMode); + + // Set the new category button guiCurrentLaptopMode = bNewValue; + // Set no Filter! + switch (bNewValue) + { + case LAPTOP_MODE_BOBBY_R_GUNS: + guiPrevGunFilterMode = guiCurrentGunFilterMode; + guiCurrentGunFilterMode = -1; + UpdateGunFilterButtons(guiCurrentGunFilterMode, guiPrevGunFilterMode); + SetFirstLastPagesForNew(IC_BOBBY_GUN, guiCurrentGunFilterMode); + break; + case LAPTOP_MODE_BOBBY_R_AMMO: + guiPrevAmmoFilterMode = guiCurrentAmmoFilterMode; + guiCurrentAmmoFilterMode = -1; + UpdateAmmoFilterButtons(guiCurrentAmmoFilterMode, guiPrevAmmoFilterMode); + SetFirstLastPagesForNew(IC_AMMO, guiCurrentAmmoFilterMode); + break; + case LAPTOP_MODE_BOBBY_R_ARMOR: + guiPrevArmourFilterMode = guiCurrentArmourFilterMode; + guiCurrentArmourFilterMode = -1; + // TODO + //UpdateAmmoFilterButtons(guiCurrentAmmoFilterMode, guiPrevAmmoFilterMode); + SetFirstLastPagesForNew(IC_ARMOUR, guiCurrentArmourFilterMode); + break; + case LAPTOP_MODE_BOBBY_R_MISC: + guiPrevMiscFilterMode = guiCurrentMiscFilterMode; + guiCurrentMiscFilterMode = -1; + // TODO + //UpdateAmmoFilterButtons(guiCurrentAmmoFilterMode, guiPrevAmmoFilterMode); + SetFirstLastPagesForNew(IC_BOBBY_MISC, guiCurrentMiscFilterMode); + break; + case LAPTOP_MODE_BOBBY_R_USED: + guiPrevUsedFilterMode = guiCurrentUsedFilterMode; + guiCurrentUsedFilterMode = -1; + + EnableButton(guiBobbyRFilterAmmo[0]); + EnableButton(guiBobbyRFilterAmmo[1]); + EnableButton(guiBobbyRFilterAmmo[2]); + EnableButton(guiBobbyRFilterAmmo[3]); + + SetFirstLastPagesForUsed(guiCurrentUsedFilterMode); + break; + } } + if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE) { btn->uiFlags &= (~BUTTON_CLICKED_ON ); @@ -539,6 +804,193 @@ void BtnBobbyRPageMenuCallback(GUI_BUTTON *btn,INT32 reason) } +// WANNE +void BtnBobbyRFilterGunsCallback(GUI_BUTTON *btn,INT32 reason) +{ + UINT32 bNewValue; + bNewValue = MSYS_GetBtnUserData( btn, 0 ); + + if (!(btn->uiFlags & BUTTON_ENABLED)) + return; + + //gbMessageDisplayed = TRUE; + + if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN ) + { + btn->uiFlags |= BUTTON_CLICKED_ON; + + InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); + } + if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP ) + { + btn->uiFlags &= (~BUTTON_CLICKED_ON ); + + guiPrevGunFilterMode = guiCurrentGunFilterMode; + + switch (bNewValue) + { + case BOBBYR_FILTER_GUNS_PISTOL: + guiCurrentGunFilterMode = GUN_PISTOL; + break; + case BOBBYR_FILTER_GUNS_M_PISTOL: + guiCurrentGunFilterMode = GUN_M_PISTOL; + break; + case BOBBYR_FILTER_GUNS_SMG: + guiCurrentGunFilterMode = GUN_SMG; + break; + case BOBBYR_FILTER_GUNS_RIFLE: + guiCurrentGunFilterMode = GUN_RIFLE; + break; + case BOBBYR_FILTER_GUNS_SN_RIFLE: + guiCurrentGunFilterMode = GUN_SN_RIFLE; + break; + case BOBBYR_FILTER_GUNS_AS_RIFLE: + guiCurrentGunFilterMode = GUN_AS_RIFLE; + break; + case BOBBYR_FILTER_GUNS_LMG: + guiCurrentGunFilterMode = GUN_LMG; + break; + case BOBBYR_FILTER_GUNS_SHOTGUN: + guiCurrentGunFilterMode = GUN_SHOTGUN; + break; + } + + //if (guiCurrentAmmoFilterMode > -1) + { + SetFirstLastPagesForNew(IC_BOBBY_GUN, guiCurrentGunFilterMode); + } + + UpdateGunFilterButtons(guiCurrentGunFilterMode, guiPrevGunFilterMode); + + DeleteMouseRegionForBigImage(); + fReDrawScreenFlag = TRUE; + fPausedReDrawScreenFlag = TRUE; + } + if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE) + { + btn->uiFlags &= (~BUTTON_CLICKED_ON ); + InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); + } +} + +// WANNE +void BtnBobbyRFilterAmmoCallback(GUI_BUTTON *btn,INT32 reason) +{ + UINT32 bNewValue; + bNewValue = MSYS_GetBtnUserData( btn, 0 ); + + if (!(btn->uiFlags & BUTTON_ENABLED)) + return; + + //gbMessageDisplayed = TRUE; + + if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN ) + { + btn->uiFlags |= BUTTON_CLICKED_ON; + InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); + } + if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP ) + { + btn->uiFlags &= (~BUTTON_CLICKED_ON ); + + guiPrevAmmoFilterMode = guiCurrentAmmoFilterMode; + + switch (bNewValue) + { + case BOBBYR_FILTER_AMMO_PISTOL: + guiCurrentAmmoFilterMode = GUN_PISTOL; + break; + case BOBBYR_FILTER_AMMO_M_PISTOL: + guiCurrentAmmoFilterMode = GUN_M_PISTOL; + break; + case BOBBYR_FILTER_AMMO_SMG: + guiCurrentAmmoFilterMode = GUN_SMG; + break; + case BOBBYR_FILTER_AMMO_RIFLE: + guiCurrentAmmoFilterMode = GUN_RIFLE; + break; + case BOBBYR_FILTER_AMMO_SN_RIFLE: + guiCurrentAmmoFilterMode = GUN_SN_RIFLE; + break; + case BOBBYR_FILTER_AMMO_AS_RIFLE: + guiCurrentAmmoFilterMode = GUN_AS_RIFLE; + break; + case BOBBYR_FILTER_AMMO_LMG: + guiCurrentAmmoFilterMode = GUN_LMG; + break; + case BOBBYR_FILTER_AMMO_SHOTGUN: + guiCurrentAmmoFilterMode = GUN_SHOTGUN; + break; + } + + SetFirstLastPagesForNew(IC_AMMO, guiCurrentAmmoFilterMode); + UpdateAmmoFilterButtons(guiCurrentAmmoFilterMode, guiPrevAmmoFilterMode); + + DeleteMouseRegionForBigImage(); + fReDrawScreenFlag = TRUE; + fPausedReDrawScreenFlag = TRUE; + } + if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE) + { + btn->uiFlags &= (~BUTTON_CLICKED_ON ); + InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); + } +} + + +// WANNE +void BtnBobbyRFilterUsedCallback(GUI_BUTTON *btn,INT32 reason) +{ + UINT32 bNewValue; + bNewValue = MSYS_GetBtnUserData( btn, 0 ); + + if (!(btn->uiFlags & BUTTON_ENABLED)) + return; + + //gbMessageDisplayed = TRUE; + + if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN ) + { + btn->uiFlags |= BUTTON_CLICKED_ON; + InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); + } + if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP ) + { + btn->uiFlags &= (~BUTTON_CLICKED_ON ); + + guiPrevUsedFilterMode = guiCurrentUsedFilterMode; + + switch (bNewValue) + { + case BOBBYR_FILTER_USED_GUNS: + guiCurrentUsedFilterMode = IC_BOBBY_GUN; + break; + case BOBBYR_FILTER_USED_AMMO: + guiCurrentUsedFilterMode = IC_AMMO; + break; + case BOBBYR_FILTER_USED_ARMOR: + guiCurrentUsedFilterMode = IC_ARMOUR; + break; + case BOBBYR_FILTER_USED_MISC: + guiCurrentUsedFilterMode = IC_BOBBY_MISC; + break; + } + + UpdateUsedFilterButtons(); + SetFirstLastPagesForUsed(guiCurrentUsedFilterMode); + + DeleteMouseRegionForBigImage(); + fReDrawScreenFlag = TRUE; + fPausedReDrawScreenFlag = TRUE; + } + if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE) + { + btn->uiFlags &= (~BUTTON_CLICKED_ON ); + InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); + } +} + + void BtnBobbyRNextPreviousPageCallback(GUI_BUTTON *btn,INT32 reason) { @@ -585,9 +1037,7 @@ void BtnBobbyRNextPreviousPageCallback(GUI_BUTTON *btn,INT32 reason) } - - -BOOLEAN DisplayItemInfo(UINT32 uiItemClass) +BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter) { UINT16 i; UINT8 ubCount=0; @@ -597,6 +1047,7 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass) wchar_t sDollarTemp[60]; wchar_t sTemp[60]; INT16 pItemNumbers[ BOBBYR_NUM_WEAPONS_ON_PAGE ]; + BOOLEAN bAddItem = FALSE; PosY = BOBBYR_GRID_PIC_Y; usTextPosY = BOBBYR_ITEM_DESC_START_Y; @@ -611,8 +1062,13 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass) DisableBobbyRButtons(); - //Display a popup saying we are out of stock - DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, BobbyRText[ BOBBYR_NO_MORE_STOCK ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, OutOfStockMessageBoxCallBack ); + if (gbMessageDisplayed == FALSE) + { + //Display a popup saying we are out of stock + DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, BobbyRText[ BOBBYR_NO_MORE_STOCK ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, OutOfStockMessageBoxCallBack ); + + gbMessageDisplayed = TRUE; + } return( TRUE ); } @@ -634,6 +1090,8 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass) for(i=gusCurWeaponIndex; ((i<=gusLastItemIndex) && (ubCount < 4)); i++) { + bAddItem = FALSE; + if( uiItemClass == BOBBYR_USED_ITEMS ) { //If there is not items in stock @@ -659,6 +1117,11 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass) continue; } + // No Filter -> Take all + if (iFilter == -1) + { + bAddItem = TRUE; + } pItemNumbers[ ubCount ] = usItemIndex; @@ -666,65 +1129,166 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass) { case IC_GUN: case IC_LAUNCHER: - gusItemNumberForItemsOnScreen[ ubCount ] = i; + // Used + if (uiItemClass == BOBBYR_USED_ITEMS) + { + if (iFilter > -1) + { + if (Item[usItemIndex].usItemClass == IC_GUN || + Item[usItemIndex].usItemClass == IC_LAUNCHER) + { + bAddItem = TRUE; + } + } + } + // Guns + else + { + if (iFilter > -1) + { + if (Weapon[ Item[usItemIndex].ubClassIndex ].ubWeaponType == iFilter) + { + bAddItem = TRUE; + } + } + } - DisplayBigItemImage( usItemIndex, PosY); - - //Display Items Name - DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); + if (bAddItem == TRUE) + { + gusItemNumberForItemsOnScreen[ ubCount ] = i; - DisplayGunInfo(usItemIndex, usTextPosY, gfOnUsedPage, i); + DisplayBigItemImage( usItemIndex, PosY); + + //Display Items Name + DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); - PosY += BOBBYR_GRID_OFFSET; - usTextPosY += BOBBYR_GRID_OFFSET; - ubCount++; + DisplayGunInfo(usItemIndex, usTextPosY, gfOnUsedPage, i); + + PosY += BOBBYR_GRID_OFFSET; + usTextPosY += BOBBYR_GRID_OFFSET; + ubCount++; + } break; case IC_AMMO: - gusItemNumberForItemsOnScreen[ ubCount ] = i; + // USED + if (uiItemClass == BOBBYR_USED_ITEMS) + { + if (iFilter > -1) + { + if (Item[usItemIndex].usItemClass == iFilter) + { + bAddItem = TRUE; + } + } + } + // AMMO + else + { + if (iFilter > -1) + { + if (IsAmmoMatchinWeaponType(usItemIndex, iFilter)) + { + bAddItem = TRUE; + } + } + } - DisplayBigItemImage( usItemIndex, PosY); - - //Display Items Name - DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); + if (bAddItem == TRUE) + { + gusItemNumberForItemsOnScreen[ ubCount ] = i; - DisplayAmmoInfo( usItemIndex, usTextPosY, gfOnUsedPage, i); + DisplayBigItemImage( usItemIndex, PosY); + + //Display Items Name + DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); - PosY += BOBBYR_GRID_OFFSET; - usTextPosY += BOBBYR_GRID_OFFSET; - ubCount++; + DisplayAmmoInfo( usItemIndex, usTextPosY, gfOnUsedPage, i); + + PosY += BOBBYR_GRID_OFFSET; + usTextPosY += BOBBYR_GRID_OFFSET; + ubCount++; + } break; case IC_ARMOUR: - gusItemNumberForItemsOnScreen[ ubCount ] = i; + // USED + if (uiItemClass == BOBBYR_USED_ITEMS) + { + if (iFilter > -1) + { + if (Item[usItemIndex].usItemClass == iFilter) + { + bAddItem = TRUE; + } + } + } + // ARMOUR + else + { + if (iFilter > -1) + { + // TODO + } + } - DisplayBigItemImage( usItemIndex, PosY); - - //Display Items Name - DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); + if (bAddItem == TRUE) + { + gusItemNumberForItemsOnScreen[ ubCount ] = i; - DisplayArmourInfo( usItemIndex, usTextPosY, gfOnUsedPage, i); + DisplayBigItemImage( usItemIndex, PosY); + + //Display Items Name + DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); - PosY += BOBBYR_GRID_OFFSET; - usTextPosY += BOBBYR_GRID_OFFSET; - ubCount++; + DisplayArmourInfo( usItemIndex, usTextPosY, gfOnUsedPage, i); + + PosY += BOBBYR_GRID_OFFSET; + usTextPosY += BOBBYR_GRID_OFFSET; + ubCount++; + } break; case IC_BLADE: case IC_THROWING_KNIFE: case IC_PUNCH: - gusItemNumberForItemsOnScreen[ ubCount ] = i; + // USED + if (uiItemClass == BOBBYR_USED_ITEMS) + { + if (iFilter > -1) + { + if (Item[usItemIndex].usItemClass == IC_BLADE || + Item[usItemIndex].usItemClass == IC_THROWING_KNIFE || + Item[usItemIndex].usItemClass == IC_PUNCH) + { + bAddItem = TRUE; + } + } + } + // MISC + else + { + if (iFilter > -1) + { + // TODO + } + } - DisplayBigItemImage( usItemIndex, PosY); - - //Display Items Name - DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); + if (bAddItem == TRUE) + { + gusItemNumberForItemsOnScreen[ ubCount ] = i; - DisplayNonGunWeaponInfo(usItemIndex, usTextPosY, gfOnUsedPage, i); + DisplayBigItemImage( usItemIndex, PosY); + + //Display Items Name + DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); - PosY += BOBBYR_GRID_OFFSET; - usTextPosY += BOBBYR_GRID_OFFSET; - ubCount++; + DisplayNonGunWeaponInfo(usItemIndex, usTextPosY, gfOnUsedPage, i); + + PosY += BOBBYR_GRID_OFFSET; + usTextPosY += BOBBYR_GRID_OFFSET; + ubCount++; + } break; case IC_GRENADE: @@ -733,18 +1297,46 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass) case IC_MEDKIT: case IC_KIT: case IC_FACE: - gusItemNumberForItemsOnScreen[ ubCount ] = i; + // USED + if (uiItemClass == BOBBYR_USED_ITEMS) + { + if (iFilter > -1) + { + if (Item[usItemIndex].usItemClass == IC_GRENADE || + Item[usItemIndex].usItemClass == IC_BOMB || + Item[usItemIndex].usItemClass == IC_MISC || + Item[usItemIndex].usItemClass == IC_MEDKIT || + Item[usItemIndex].usItemClass == IC_KIT || + Item[usItemIndex].usItemClass == IC_FACE) + { + bAddItem = TRUE; + } + } + } + // MISC + else + { + if (iFilter > -1) + { + // TODO + } + } - DisplayBigItemImage( usItemIndex, PosY); - - //Display Items Name - DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); + if (bAddItem == TRUE) + { + gusItemNumberForItemsOnScreen[ ubCount ] = i; - DisplayMiscInfo( usItemIndex, usTextPosY, gfOnUsedPage, i); + DisplayBigItemImage( usItemIndex, PosY); + + //Display Items Name + DisplayItemNameAndInfo(usTextPosY, usItemIndex, i, gfOnUsedPage); - PosY += BOBBYR_GRID_OFFSET; - usTextPosY += BOBBYR_GRID_OFFSET; - ubCount++; + DisplayMiscInfo( usItemIndex, usTextPosY, gfOnUsedPage, i); + + PosY += BOBBYR_GRID_OFFSET; + usTextPosY += BOBBYR_GRID_OFFSET; + ubCount++; + } break; } } @@ -1216,13 +1808,16 @@ void CalculateFirstAndLastIndexs() //Loops through Bobby Rays Inventory to find the first and last index -void SetFirstLastPagesForNew( UINT32 uiClassMask ) +void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter ) { - UINT16 i; + UINT16 i; INT16 sFirst = -1; INT16 sLast = -1; UINT16 ubPages=0; UINT16 ubNumItems=0; + UINT16 usItemIndex = 0; + + BOOLEAN bCntNumItems = FALSE; gubCurPage = 0; @@ -1236,17 +1831,57 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask ) { if( Item[ LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex ].usItemClass & uiClassMask ) { - ubNumItems++; + // No Filter -> Take all + if (iFilter == -1) + { + bCntNumItems = TRUE; + } + // Filter! + else + { + bCntNumItems = FALSE; - if( sFirst == -1 ) - sFirst = i; - sLast = i; + // Get the weapon from the item + usItemIndex = LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex; + + switch (uiClassMask) + { + // Guns + case IC_BOBBY_GUN: + if (Weapon[ Item[usItemIndex].ubClassIndex ].ubWeaponType == iFilter) + { + bCntNumItems = TRUE; + } + break; + // Ammo + case IC_AMMO: + //if (Weapon[ Item[usItemIndex].ubClassIndex ].ubWeaponType == uiFilter) + { + if (IsAmmoMatchinWeaponType(usItemIndex, guiCurrentAmmoFilterMode)) + { + bCntNumItems = TRUE; + } + } + break; + + } + } + + if (bCntNumItems == TRUE) + { + ubNumItems++; + + if( sFirst == -1 ) + sFirst = i; + sLast = i; + } } } } if( ubNumItems == 0 ) { + gbMessageDisplayed = FALSE; gusFirstItemIndex = BOBBYR_NO_ITEMS; gusLastItemIndex = BOBBYR_NO_ITEMS; gubNumPages = 0; @@ -1261,15 +1896,19 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask ) } //Loops through Bobby Rays Used Inventory to find the first and last index -void SetFirstLastPagesForUsed() +void SetFirstLastPagesForUsed(INT32 iFilter) { UINT16 i; INT16 sFirst = -1; INT16 sLast = -1; UINT16 ubPages=0; UINT16 ubNumItems=0; + UINT16 usItemIndex; + INT32 iFilterLauncher = IC_LAUNCHER; gubCurPage = 0; + BOOLEAN bCntNumItems = FALSE; + //First loop through to get the first and last index indexs for(i=0; i Take all + if (iFilter == -1) + { + bCntNumItems = TRUE; + } + else + { + // Get the weapon from the item + usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ i ].usItemIndex; - if( sFirst == -1 ) - sFirst = i; - sLast = i; + switch (iFilter) + { + case IC_BOBBY_GUN: + if (Item[usItemIndex].usItemClass == IC_GUN || + Item[usItemIndex].usItemClass == IC_LAUNCHER) + { + bCntNumItems = TRUE; + } + break; + case IC_AMMO: + if (Item[usItemIndex].usItemClass == IC_AMMO) + { + bCntNumItems = TRUE; + } + break; + case IC_ARMOUR: + if (Item[usItemIndex].usItemClass == IC_ARMOUR) + { + bCntNumItems = TRUE; + } + break; + case IC_BOBBY_MISC: + if (Item[usItemIndex].usItemClass == IC_BLADE || + Item[usItemIndex].usItemClass == IC_THROWING_KNIFE || + Item[usItemIndex].usItemClass == IC_PUNCH || + Item[usItemIndex].usItemClass == IC_GRENADE || + Item[usItemIndex].usItemClass == IC_BOMB || + Item[usItemIndex].usItemClass == IC_MISC || + Item[usItemIndex].usItemClass == IC_MEDKIT || + Item[usItemIndex].usItemClass == IC_KIT || + Item[usItemIndex].usItemClass == IC_FACE) + { + bCntNumItems = TRUE; + } + break; + } + } + + if (bCntNumItems == TRUE) + { + ubNumItems++; + + if( sFirst == -1 ) + sFirst = i; + sLast = i; + } } } if( sFirst == -1 ) { + gbMessageDisplayed = FALSE; gusFirstItemIndex = BOBBYR_NO_ITEMS; gusLastItemIndex = BOBBYR_NO_ITEMS; gubNumPages = 0; @@ -1834,11 +2525,25 @@ void UpdateButtonText(UINT32 uiCurPage) switch( uiCurPage ) { case LAPTOP_MODE_BOBBY_R_GUNS: - DisableButton( guiBobbyRPageMenu[0] ); + if (guiCurrentGunFilterMode != -1) + { + EnableButton( guiBobbyRPageMenu[0] ); + } + else + { + DisableButton( guiBobbyRPageMenu[0] ); + } break; case LAPTOP_MODE_BOBBY_R_AMMO: - DisableButton( guiBobbyRPageMenu[1] ); + if (guiCurrentAmmoFilterMode != -1) + { + EnableButton( guiBobbyRPageMenu[1] ); + } + else + { + DisableButton( guiBobbyRPageMenu[1] ); + } break; case LAPTOP_MODE_BOBBY_R_ARMOR: @@ -1850,11 +2555,88 @@ void UpdateButtonText(UINT32 uiCurPage) break; case LAPTOP_MODE_BOBBY_R_USED: - DisableButton( guiBobbyRPageMenu[4] ); + if (guiCurrentUsedFilterMode != -1) + { + EnableButton( guiBobbyRPageMenu[4] ); + } + else + { + DisableButton( guiBobbyRPageMenu[4] ); + } break; } } +void UpdateAmmoFilterButtons(INT32 iNewButton, INT32 iOldButton) +{ + if (iNewButton != iOldButton) + { + if (iNewButton > -1) + { + // Disable new Button + DisableButton(guiBobbyRFilterAmmo[iNewButton - 1]); + } + + if (iOldButton > -1) + { + // Enable old Button + EnableButton(guiBobbyRFilterAmmo[iOldButton - 1]); + } + } +} + +void UpdateGunFilterButtons(INT32 iNewButton, INT32 iOldButton) +{ + if (iNewButton != iOldButton) + { + if (iNewButton > -1) + { + // Disable new Button + DisableButton(guiBobbyRFilterGuns[iNewButton - 1]); + } + + if (iOldButton > -1) + { + // Enable old Button + EnableButton(guiBobbyRFilterGuns[iOldButton - 1]); + } + } +} + +void UpdateUsedFilterButtons() +{ + switch (guiCurrentUsedFilterMode) + { + case IC_BOBBY_GUN: + DisableButton(guiBobbyRFilterUsed[0]); + + EnableButton(guiBobbyRFilterUsed[1]); + EnableButton(guiBobbyRFilterUsed[2]); + EnableButton(guiBobbyRFilterUsed[3]); + break; + case IC_AMMO: + DisableButton(guiBobbyRFilterUsed[1]); + + EnableButton(guiBobbyRFilterUsed[0]); + EnableButton(guiBobbyRFilterUsed[2]); + EnableButton(guiBobbyRFilterUsed[3]); + break; + case IC_ARMOUR: + DisableButton(guiBobbyRFilterUsed[2]); + + EnableButton(guiBobbyRFilterUsed[0]); + EnableButton(guiBobbyRFilterUsed[1]); + EnableButton(guiBobbyRFilterUsed[3]); + break; + case IC_BOBBY_MISC: + DisableButton(guiBobbyRFilterUsed[3]); + + EnableButton(guiBobbyRFilterUsed[0]); + EnableButton(guiBobbyRFilterUsed[1]); + EnableButton(guiBobbyRFilterUsed[2]); + break; + } +} UINT16 CalcBobbyRayCost( UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed) { @@ -1926,6 +2708,8 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass ) { UINT16 i; UINT16 usNumItems=0; + BOOLEAN bCntItem = FALSE; + UINT32 usItemIndex = 0; //Reset the Current weapon Index gusCurWeaponIndex = 0; @@ -1935,31 +2719,58 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass ) //Get to the first index on the page for(i=gusFirstItemIndex; i<=gusLastItemIndex; i++) { + bCntItem = FALSE; + + if (guiCurrentUsedFilterMode == -1) + { + bCntItem = TRUE; + } + else + { + usItemIndex = pInv[ i ].usItemIndex; + + switch (guiCurrentUsedFilterMode) + { + case IC_BOBBY_GUN: + if (Item[usItemIndex].usItemClass == IC_GUN || + Item[usItemIndex].usItemClass == IC_LAUNCHER) + { + bCntItem = TRUE; + } + break; + case IC_AMMO: + if (Item[usItemIndex].usItemClass == IC_AMMO) + { + bCntItem = TRUE; + } + break; + case IC_ARMOUR: + if (Item[usItemIndex].usItemClass == IC_ARMOUR) + { + bCntItem = TRUE; + } + break; + case IC_BOBBY_MISC: + if (Item[usItemIndex].usItemClass == IC_BLADE || + Item[usItemIndex].usItemClass == IC_THROWING_KNIFE || + Item[usItemIndex].usItemClass == IC_PUNCH || + Item[usItemIndex].usItemClass == IC_GRENADE || + Item[usItemIndex].usItemClass == IC_BOMB || + Item[usItemIndex].usItemClass == IC_MISC || + Item[usItemIndex].usItemClass == IC_MEDKIT || + Item[usItemIndex].usItemClass == IC_KIT || + Item[usItemIndex].usItemClass == IC_FACE) + { + bCntItem = TRUE; + } + break; + } + } + //If we have some of the inventory on hand if( pInv[ i ].ubQtyOnHand != 0 ) { - if( gubCurPage == 0 ) - { - gusCurWeaponIndex = i; - break; - } - - if( usNumItems <= ( gubCurPage * 4 ) ) - gusCurWeaponIndex = i; - - usNumItems++; - } - } - } - else - { - //Get to the first index on the page - for(i=gusFirstItemIndex; i<=gusLastItemIndex; i++) - { - if( Item[ pInv[ i ].usItemIndex ].usItemClass & uiItemClass ) - { - //If we have some of the inventory on hand - if( pInv[ i ].ubQtyOnHand != 0 ) + if (bCntItem == TRUE) { if( gubCurPage == 0 ) { @@ -1975,6 +2786,124 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass ) } } } + else + { + //Get to the first index on the page + for(i=gusFirstItemIndex; i<=gusLastItemIndex; i++) + { + bCntItem = FALSE; + + if( Item[ pInv[ i ].usItemIndex ].usItemClass & uiItemClass ) + { + if (uiItemClass == IC_BOBBY_GUN) + { + if (guiCurrentGunFilterMode == -1) + { + bCntItem = TRUE; + } + else + { + usItemIndex = LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex; + + if (Weapon[ Item[usItemIndex].ubClassIndex ].ubWeaponType == guiCurrentGunFilterMode) + { + bCntItem = TRUE; + } + } + } + else if (uiItemClass == IC_AMMO) + { + if (guiCurrentAmmoFilterMode == -1) + { + bCntItem = TRUE; + } + else + { + usItemIndex = LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex; + + if (IsAmmoMatchinWeaponType(usItemIndex, guiCurrentAmmoFilterMode)) + { + bCntItem = TRUE; + } + + } + } + else if (uiItemClass == IC_ARMOUR) + { + if (guiCurrentArmourFilterMode == -1) + { + bCntItem = TRUE; + } + else + { + // TODO + } + } + else if (uiItemClass == IC_BOBBY_MISC) + { + if (guiCurrentMiscFilterMode == -1) + { + bCntItem = TRUE; + } + else + { + // TODO + } + } + + //If we have some of the inventory on hand + if( pInv[ i ].ubQtyOnHand != 0 ) + { + if (bCntItem == TRUE) + { + if( gubCurPage == 0 ) + { + gusCurWeaponIndex = i; + break; + } + + if( usNumItems <= ( gubCurPage * 4 ) ) + gusCurWeaponIndex = i; + + usNumItems++; + } + } + } + } + } +} + +BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType) +{ + // usItemIndex == Ammo + + BOOLEAN bRetValue = FALSE; + + UINT32 i; + + for (i = 0; i < MAXITEMS; i++) + { + //if( LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnHand != 0 ) + { + // We found the Weapon that uses this Ammo + if (Magazine[ Item[ usItemIndex ].ubClassIndex ].ubCalibre == Weapon[i].ubCalibre) + { + // Weapon has the correct filter ammo weapon type + if (Weapon[i].ubWeaponType == ubWeaponType) + { + bRetValue = TRUE; + } + // Weapon has another filter ammo weapon type + else + { + bRetValue = FALSE; + } + break; + } + } + } + + return bRetValue; } diff --git a/Laptop/BobbyRGuns.h b/Laptop/BobbyRGuns.h index 10493496..2b210864 100644 --- a/Laptop/BobbyRGuns.h +++ b/Laptop/BobbyRGuns.h @@ -14,7 +14,7 @@ #define BOBBYR_GUNS_BUTTON_FONT FONT10ARIAL -#define BOBBYR_GUNS_TEXT_COLOR_ON FONT_NEARBLACK +#define BOBBYR_GUNS_TEXT_COLOR_ON FONT_NEARBLACK // FONT_DKGREEN #define BOBBYR_GUNS_TEXT_COLOR_OFF FONT_NEARBLACK //#define BOBBYR_GUNS_TEXT_COLOR_ON FONT_MCOLOR_DKWHITE //#define BOBBYR_GUNS_TEXT_COLOR_OFF FONT_MCOLOR_WHITE @@ -38,6 +38,13 @@ void ExitBobbyRGuns(); void HandleBobbyRGuns(); void RenderBobbyRGuns(); +// WANNE +BOOLEAN DeleteBobbyRGunsFilter(); +BOOLEAN DeleteBobbyRAmmoFilter(); +BOOLEAN DeleteBobbyRUsedFilter(); +BOOLEAN InitBobbyRGunsFilterBar(); +BOOLEAN InitBobbyRAmmoFilterBar(); +BOOLEAN InitBobbyRUsedFilterBar(); BOOLEAN DisplayBobbyRBrTitle(); BOOLEAN DeleteBobbyBrTitle(); @@ -45,16 +52,24 @@ BOOLEAN InitBobbyBrTitle(); BOOLEAN InitBobbyMenuBar( ); BOOLEAN DeleteBobbyMenuBar(); + + //BOOLEAN DisplayWeaponInfo(); -BOOLEAN DisplayItemInfo(UINT32 uiItemClass); +BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter); void DeleteMouseRegionForBigImage(); void UpdateButtonText(UINT32 uiCurPage); + +// WANNE +void UpdateAmmoFilterButtons(INT32 iNewButton, INT32 iOldButton); +void UpdateGunFilterButtons(INT32 iNewButton, INT32 iOldButton); +void UpdateUsedFilterButtons(); + void EnterInitBobbyRGuns(); void DailyUpdateOfBobbyRaysUsedInventory(); UINT16 CalcBobbyRayCost( UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed); //void CalculateFirstAndLastIndexs(); -void SetFirstLastPagesForUsed(); -void SetFirstLastPagesForNew( UINT32 uiClass ); +void SetFirstLastPagesForUsed(INT32 iFilter); +void SetFirstLastPagesForNew( UINT32 uiClass, INT32 iFilter ); #endif diff --git a/Laptop/BobbyRMisc.cpp b/Laptop/BobbyRMisc.cpp index ed4edbe3..8fd0a96a 100644 --- a/Laptop/BobbyRMisc.cpp +++ b/Laptop/BobbyRMisc.cpp @@ -38,10 +38,14 @@ BOOLEAN EnterBobbyRMisc() CHECKF(AddVideoObject(&VObjectDesc, &guiMiscGrid)); InitBobbyBrTitle(); + + guiPrevMiscFilterMode = -1; + guiCurrentMiscFilterMode = -1; + //Draw menu bar InitBobbyMenuBar( ); - SetFirstLastPagesForNew( IC_BOBBY_MISC ); + SetFirstLastPagesForNew( IC_BOBBY_MISC, guiCurrentMiscFilterMode ); // CalculateFirstAndLastIndexs(); RenderBobbyRMisc( ); @@ -71,15 +75,17 @@ void RenderBobbyRMisc() WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiMiscBackground); //Display title at top of page - DisplayBobbyRBrTitle(); + //DisplayBobbyRBrTitle(); // GunForm GetVideoObject(&hPixHandle, guiMiscGrid); BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL); - DisplayItemInfo(IC_BOBBY_MISC); + DisplayItemInfo(IC_BOBBY_MISC, guiCurrentMiscFilterMode); UpdateButtonText(guiCurrentLaptopMode); + // TODO + MarkButtonsDirty( ); RenderWWWProgramTitleBar( ); InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y); diff --git a/Laptop/BobbyRUsed.cpp b/Laptop/BobbyRUsed.cpp index 0174667d..e3bbbeac 100644 --- a/Laptop/BobbyRUsed.cpp +++ b/Laptop/BobbyRUsed.cpp @@ -26,6 +26,8 @@ BOOLEAN EnterBobbyRUsed() { VOBJECT_DESC VObjectDesc; + //gfBigImageMouseRegionCreated = FALSE; + // load the background graphic and add it VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; FilenameForBPP("LAPTOP\\usedbackground.sti", VObjectDesc.ImageFile); @@ -38,11 +40,14 @@ BOOLEAN EnterBobbyRUsed() InitBobbyBrTitle(); - SetFirstLastPagesForUsed(); -// CalculateFirstAndLastIndexs(); + guiPrevUsedFilterMode = -1; + guiCurrentUsedFilterMode = -1; + + SetFirstLastPagesForUsed(guiCurrentUsedFilterMode); //Draw menu bar InitBobbyMenuBar( ); + InitBobbyRUsedFilterBar(); RenderBobbyRUsed( ); @@ -54,6 +59,9 @@ void ExitBobbyRUsed() DeleteVideoObjectFromIndex(guiUsedBackground); DeleteVideoObjectFromIndex(guiUsedGrid); DeleteBobbyMenuBar(); + + DeleteBobbyRUsedFilter(); + DeleteBobbyBrTitle(); DeleteMouseRegionForBigImage(); @@ -72,15 +80,17 @@ void RenderBobbyRUsed() WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiUsedBackground); //Display title at top of page - DisplayBobbyRBrTitle(); + //DisplayBobbyRBrTitle(); // GunForm GetVideoObject(&hPixHandle, guiUsedGrid); BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL); - DisplayItemInfo(BOBBYR_USED_ITEMS); + DisplayItemInfo(BOBBYR_USED_ITEMS, guiCurrentUsedFilterMode); UpdateButtonText(guiCurrentLaptopMode); + UpdateUsedFilterButtons(); + MarkButtonsDirty( ); RenderWWWProgramTitleBar( ); InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y); diff --git a/Laptop/laptop.cpp b/Laptop/laptop.cpp index 6577d7d8..7e821f3b 100644 --- a/Laptop/laptop.cpp +++ b/Laptop/laptop.cpp @@ -267,6 +267,24 @@ extern BOOLEAN fFirstTimeInGameScreen; #define LAPTOP__NEW_EMAIL_ICON_X iScreenWidthOffset + 67 #define LAPTOP__NEW_EMAIL_ICON_Y LAPTOP__NEW_FILE_ICON_Y +// WANNE +INT32 guiCurrentGunFilterMode; +INT32 guiPrevGunFilterMode; + +INT32 guiCurrentAmmoFilterMode; +INT32 guiPrevAmmoFilterMode; + +INT32 guiCurrentUsedFilterMode; +INT32 guiPrevUsedFilterMode; + +INT32 guiCurrentArmourFilterMode; +INT32 guiPrevArmourFilterMode; + +INT32 guiCurrentMiscFilterMode; +INT32 guiPrevMiscFilterMode; + +BOOLEAN gbMessageDisplayed; + // Mode values UINT32 guiCurrentLaptopMode; diff --git a/Laptop/laptop.h b/Laptop/laptop.h index 8c530862..72a874a8 100644 --- a/Laptop/laptop.h +++ b/Laptop/laptop.h @@ -47,6 +47,24 @@ void ClearOutTempLaptopFiles( void ); void HaventMadeImpMercEmailCallBack(); +// WANNE +extern INT32 guiCurrentGunFilterMode; +extern INT32 guiPrevGunFilterMode; + +extern INT32 guiCurrentAmmoFilterMode; +extern INT32 guiPrevAmmoFilterMode; + +extern INT32 guiCurrentUsedFilterMode; +extern INT32 guiPrevUsedFilterMode; + +extern INT32 guiCurrentArmourFilterMode; +extern INT32 guiPrevArmourFilterMode; + +extern INT32 guiCurrentMiscFilterMode; +extern INT32 guiPrevMiscFilterMode; + +extern BOOLEAN gbMessageDisplayed; + extern UINT32 guiCurrentLaptopMode; extern UINT32 guiPreviousLaptopMode; extern INT32 giCurrentSubPage; diff --git a/Utils/Text.h b/Utils/Text.h index 34235baa..1c94a3e5 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -746,6 +746,34 @@ enum }; extern STR16 BobbyROrderFormText[]; +// WANNE +enum +{ + // Guns + BOBBYR_FILTER_GUNS_PISTOL, + BOBBYR_FILTER_GUNS_M_PISTOL, + BOBBYR_FILTER_GUNS_SMG, + BOBBYR_FILTER_GUNS_RIFLE, + BOBBYR_FILTER_GUNS_SN_RIFLE, + BOBBYR_FILTER_GUNS_AS_RIFLE, + BOBBYR_FILTER_GUNS_LMG, + BOBBYR_FILTER_GUNS_SHOTGUN, + // Ammo + BOBBYR_FILTER_AMMO_PISTOL, + BOBBYR_FILTER_AMMO_M_PISTOL, + BOBBYR_FILTER_AMMO_SMG, + BOBBYR_FILTER_AMMO_RIFLE, + BOBBYR_FILTER_AMMO_SN_RIFLE, + BOBBYR_FILTER_AMMO_AS_RIFLE, + BOBBYR_FILTER_AMMO_LMG, + BOBBYR_FILTER_AMMO_SHOTGUN, + // Used + BOBBYR_FILTER_USED_GUNS, + BOBBYR_FILTER_USED_AMMO, + BOBBYR_FILTER_USED_ARMOR, + BOBBYR_FILTER_USED_MISC, +}; + //BobbyRGuns.c enum @@ -786,6 +814,9 @@ enum extern STR16 BobbyRText[]; +// WANNE +extern STR16 BobbyRFilter[]; + //BobbyR.c enum diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 227f7160..cfb0e838 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -2798,6 +2798,36 @@ STR16 BobbyROrderFormText[] = L"Zendingen", }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Ammo + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Used + L"Guns", + L"Ammo", + L"Armor", + L"Misc", +}; + // This text is used when on the various Bobby Ray Web site pages that sell items diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index af7749dd..7414165d 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -2798,6 +2798,36 @@ STR16 BobbyROrderFormText[] = L"Shipments", }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Ammo + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Used + L"Guns", + L"Ammo", + L"Armor", + L"Misc", +}; + // This text is used when on the various Bobby Ray Web site pages that sell items diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index c702aebb..57d935d9 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -2787,6 +2787,36 @@ STR16 BobbyROrderFormText[] = L"Envois", }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Ammo + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Used + L"Guns", + L"Ammo", + L"Armor", + L"Misc", +}; + // This text is used when on the various Bobby Ray Web site pages that sell items diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 5372ba09..3e242a8e 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -2659,6 +2659,36 @@ STR16 BobbyROrderFormText[] = L"Lieferungen", }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistole", + L"M. Pistole", + L"SMG", + L"Gewehr", + L"SS Gewehr", + L"Sturmgew.", + L"LMG", + L"Schrotfl.", + + // Ammo + L"Pistole", + L"M. Pistole", + L"SMG", + L"Gewehr", + L"SS Gewehr", + L"Sturmgew.", + L"LMG", + L"Schrotfl.", + + // Used + L"Feuerwfn.", + L"Munition", + L"Rüstung", + L"Sonstiges", +}; + // This text is used when on the various Bobby Ray Web site pages that sell items STR16 BobbyRText[] = { diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index e60bbb76..a5365941 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -2782,6 +2782,36 @@ STR16 BobbyROrderFormText[] = }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Ammo + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Used + L"Guns", + L"Ammo", + L"Armor", + L"Misc", +}; + // This text is used when on the various Bobby Ray Web site pages that sell items STR16 BobbyRText[] = diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index b03f2874..489ceb1f 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -2780,6 +2780,36 @@ STR16 BobbyROrderFormText[] = L"Dostawy", }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Ammo + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Used + L"Guns", + L"Ammo", + L"Armor", + L"Misc", +}; + // This text is used when on the various Bobby Ray Web site pages that sell items diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 22711f39..8a9a0b67 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -2789,6 +2789,37 @@ STR16 BobbyROrderFormText[] = }; +// WANNE +STR16 BobbyRFilter[] = +{ + // Guns + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Ammo + L"Pistol", + L"M. Pistol", + L"SMG", + L"Rifle", + L"SN Rifle", + L"AS Rifle", + L"LMG", + L"Shotgun", + + // Used + L"Guns", + L"Ammo", + L"Armor", + L"Misc", +}; + + // This text is used when on the various Bobby Ray Web site pages that sell items STR16 BobbyRText[] = diff --git a/gamescreen.cpp b/gamescreen.cpp index 9611481f..31cd9830 100644 --- a/gamescreen.cpp +++ b/gamescreen.cpp @@ -12,7 +12,6 @@ #include "wcheck.h" #include "worlddef.h" #include "renderworld.h" - #include "input.h" #include "font.h" #include "screenids.h" #include "screens.h"