From fa0744a0d9c6e33c9a7bd07fedb361da59d958c6 Mon Sep 17 00:00:00 2001 From: Wanne Date: Sat, 12 Aug 2006 11:41:39 +0000 Subject: [PATCH] Bobby Rays: Added "Heavy Weapons" Filter to the Guns and Ammo. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@429 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.h | 2 ++ GameVersion.cpp | 4 ++-- JA2.suo | Bin 86016 -> 93184 bytes Laptop/BobbyRGuns.cpp | 53 ++++++++++++++++++++++++++++++----------- Utils/Text.h | 2 ++ Utils/_DutchText.cpp | 2 ++ Utils/_EnglishText.cpp | 2 ++ Utils/_FrenchText.cpp | 2 ++ Utils/_GermanText.cpp | 2 ++ Utils/_ItalianText.cpp | 2 ++ Utils/_PolishText.cpp | 2 ++ Utils/_RussianText.cpp | 2 ++ 12 files changed, 59 insertions(+), 16 deletions(-) diff --git a/GameSettings.h b/GameSettings.h index d0b9d700..702e4a9f 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -306,6 +306,8 @@ typedef struct BOOLEAN fAmmoDynamicWeight; //Pulmu BOOLEAN fEnableCrepitus; + BOOLEAN fEnableAllWeaponCaches; + BOOLEAN fEnableAllTerrorists; } GAME_EXTERNAL_OPTIONS; diff --git a/GameVersion.cpp b/GameVersion.cpp index 98458a91..2f8b4bc5 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.428" }; + INT16 zVersionLabel[256] = { L"Release v1.13.429" }; #endif -INT8 czVersionNumber[16] = { "Build 06.08.11" }; +INT8 czVersionNumber[16] = { "Build 06.08.12" }; INT16 zTrackingNumber[16] = { L"Z" }; diff --git a/JA2.suo b/JA2.suo index e272ee56abe268a28c5ff76ce39bc86ba9629072..385cf759ebfd20278f00431db0a0a32e28651a21 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B_UL_Y + 310 //LAPTOP_SCREEN_WEB_UL_Y + 340 //BOBBYR_HOME_BUTTON_Y +#define BOBBYR_PREVIOUS_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 300 //LAPTOP_SCREEN_WEB_UL_Y + 340 //BOBBYR_HOME_BUTTON_Y #define BOBBYR_NEXT_BUTTON_X LAPTOP_SCREEN_UL_X + 412 //BOBBYR_ORDER_FORM_X + BOBBYR_ORDER_FORM_WIDTH + 5 #define BOBBYR_NEXT_BUTTON_Y BOBBYR_PREVIOUS_BUTTON_Y //BOBBYR_PREVIOUS_BUTTON_Y #define BOBBYR_CATALOGUE_BUTTON_START_X BOBBYR_PREVIOUS_BUTTON_X + 92 //LAPTOP_SCREEN_UL_X + 93 - BOBBYR_CATALOGUE_BUTTON_WIDTH/2 #define BOBBYR_CATALOGUE_BUTTON_GAP ( 318 - NUM_CATALOGUE_BUTTONS * BOBBYR_CATALOGUE_BUTTON_WIDTH) / (NUM_CATALOGUE_BUTTONS + 1) + BOBBYR_CATALOGUE_BUTTON_WIDTH + 1//80 -#define BOBBYR_CATALOGUE_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 310 +#define BOBBYR_CATALOGUE_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 300 #define BOBBYR_CATALOGUE_BUTTON_WIDTH 56//75 #define BOBBYR_HOME_BUTTON_X iScreenWidthOffset + 120 @@ -139,12 +139,12 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ]; #define FILTER_BUTTONS_GUN_START_X BOBBYR_PREVIOUS_BUTTON_X #define FILTER_BUTTONS_AMMO_START_X FILTER_BUTTONS_GUN_START_X #define FILTER_BUTTONS_USED_START_X FILTER_BUTTONS_GUN_START_X + 122 -#define FILTER_BUTTONS_Y BOBBYR_PREVIOUS_BUTTON_Y + 30 +#define FILTER_BUTTONS_Y BOBBYR_PREVIOUS_BUTTON_Y + 25 // WANNE // The number of filter buttons which category uses -#define NUMBER_GUNS_FILTER_BUTTONS 8 -#define NUMBER_AMMO_FILTER_BUTTONS 8 +#define NUMBER_GUNS_FILTER_BUTTONS 9 +#define NUMBER_AMMO_FILTER_BUTTONS 9 #define NUMBER_ARMOUR_FILTER_BUTTONS 1 #define NUMBER_MISC_FILTER_BUTTONS 1 #define NUMBER_USED_FILTER_BUTTONS 4 @@ -174,6 +174,7 @@ BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType); // WANNE INT8 ubFilterGunsButtonValues[] = { + BOBBYR_FILTER_GUNS_HEAVY, BOBBYR_FILTER_GUNS_PISTOL, BOBBYR_FILTER_GUNS_M_PISTOL, BOBBYR_FILTER_GUNS_SMG, @@ -185,6 +186,7 @@ INT8 ubFilterGunsButtonValues[] = { // WANNE INT8 ubFilterAmmoButtonValues[] = { + BOBBYR_FILTER_AMMO_HEAVY, BOBBYR_FILTER_AMMO_PISTOL, BOBBYR_FILTER_AMMO_M_PISTOL, BOBBYR_FILTER_AMMO_SMG, @@ -474,7 +476,7 @@ BOOLEAN InitBobbyRGunsFilterBar() UINT8 i; UINT16 usPosX; UINT8 bCurMode; - + UINT16 usYOffset = 0; bCurMode = 0; usPosX = FILTER_BUTTONS_GUN_START_X; @@ -484,12 +486,19 @@ BOOLEAN InitBobbyRGunsFilterBar() // Loop through the filter buttons for(i=0; i 7) + { + usPosX = FILTER_BUTTONS_GUN_START_X; + usYOffset = 25; + } + // Filter buttons - guiBobbyRFilterGuns[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_GUNS_PISTOL+i], BOBBYR_GUNS_BUTTON_FONT, + guiBobbyRFilterGuns[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_GUNS_HEAVY+i], BOBBYR_GUNS_BUTTON_FONT, BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR, BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR, TEXT_CJUSTIFIED, - usPosX, FILTER_BUTTONS_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, + usPosX, FILTER_BUTTONS_Y + usYOffset, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterGunsCallback); SetButtonCursor(guiBobbyRFilterGuns[i], CURSOR_LAPTOP_SCREEN); @@ -510,6 +519,7 @@ BOOLEAN InitBobbyRAmmoFilterBar() UINT8 i; UINT16 usPosX; UINT8 bCurMode; + UINT16 usYOffset = 0; bCurMode = 0; @@ -520,12 +530,19 @@ BOOLEAN InitBobbyRAmmoFilterBar() // Loop through the filter buttons for(i=0; i 7) + { + usPosX = FILTER_BUTTONS_AMMO_START_X; + usYOffset = 25; + } + // Filter buttons - guiBobbyRFilterAmmo[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_AMMO_PISTOL+i], BOBBYR_GUNS_BUTTON_FONT, + guiBobbyRFilterAmmo[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_AMMO_HEAVY+i], BOBBYR_GUNS_BUTTON_FONT, BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR, BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR, TEXT_CJUSTIFIED, - usPosX, FILTER_BUTTONS_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, + usPosX, FILTER_BUTTONS_Y + usYOffset, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterAmmoCallback); SetButtonCursor(guiBobbyRFilterAmmo[i], CURSOR_LAPTOP_SCREEN); @@ -829,6 +846,11 @@ void BtnBobbyRFilterGunsCallback(GUI_BUTTON *btn,INT32 reason) switch (bNewValue) { + // TODO: Add a new button "Heavy Weapons" (Weapon Type = NOT_GUN + // ItemClass = IC_LAUNCHER. (IC_LAUNCHER is already included in IC_BOBBY_GUN!) + case BOBBYR_FILTER_GUNS_HEAVY: + guiCurrentGunFilterMode = NOT_GUN; + break; case BOBBYR_FILTER_GUNS_PISTOL: guiCurrentGunFilterMode = GUN_PISTOL; break; @@ -897,6 +919,9 @@ void BtnBobbyRFilterAmmoCallback(GUI_BUTTON *btn,INT32 reason) switch (bNewValue) { + case BOBBYR_FILTER_AMMO_HEAVY: + guiCurrentAmmoFilterMode = NOT_GUN; + break; case BOBBYR_FILTER_AMMO_PISTOL: guiCurrentAmmoFilterMode = GUN_PISTOL; break; @@ -2574,13 +2599,13 @@ void UpdateAmmoFilterButtons(INT32 iNewButton, INT32 iOldButton) if (iNewButton > -1) { // Disable new Button - DisableButton(guiBobbyRFilterAmmo[iNewButton - 1]); + DisableButton(guiBobbyRFilterAmmo[iNewButton]); } if (iOldButton > -1) { // Enable old Button - EnableButton(guiBobbyRFilterAmmo[iOldButton - 1]); + EnableButton(guiBobbyRFilterAmmo[iOldButton]); } } } @@ -2592,13 +2617,13 @@ void UpdateGunFilterButtons(INT32 iNewButton, INT32 iOldButton) if (iNewButton > -1) { // Disable new Button - DisableButton(guiBobbyRFilterGuns[iNewButton - 1]); + DisableButton(guiBobbyRFilterGuns[iNewButton]); } if (iOldButton > -1) { // Enable old Button - EnableButton(guiBobbyRFilterGuns[iOldButton - 1]); + EnableButton(guiBobbyRFilterGuns[iOldButton]); } } } diff --git a/Utils/Text.h b/Utils/Text.h index 1c94a3e5..8ede085a 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -750,6 +750,7 @@ extern STR16 BobbyROrderFormText[]; enum { // Guns + BOBBYR_FILTER_GUNS_HEAVY, BOBBYR_FILTER_GUNS_PISTOL, BOBBYR_FILTER_GUNS_M_PISTOL, BOBBYR_FILTER_GUNS_SMG, @@ -759,6 +760,7 @@ enum BOBBYR_FILTER_GUNS_LMG, BOBBYR_FILTER_GUNS_SHOTGUN, // Ammo + BOBBYR_FILTER_AMMO_HEAVY, BOBBYR_FILTER_AMMO_PISTOL, BOBBYR_FILTER_AMMO_M_PISTOL, BOBBYR_FILTER_AMMO_SMG, diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index cfb0e838..a62d576d 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -2802,6 +2802,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", @@ -2812,6 +2813,7 @@ STR16 BobbyRFilter[] = L"Shotgun", // Ammo + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 7414165d..3ed9d8eb 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -2802,6 +2802,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", @@ -2812,6 +2813,7 @@ STR16 BobbyRFilter[] = L"Shotgun", // Ammo + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 57d935d9..396d2f75 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -2791,6 +2791,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", @@ -2801,6 +2802,7 @@ STR16 BobbyRFilter[] = L"Shotgun", // Ammo + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 3e242a8e..ad5e2831 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -2663,6 +2663,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Schwere W.", L"Pistole", L"M. Pistole", L"SMG", @@ -2673,6 +2674,7 @@ STR16 BobbyRFilter[] = L"Schrotfl.", // Ammo + L"Schwere W.", L"Pistole", L"M. Pistole", L"SMG", diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index a5365941..f0f0be79 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -2786,6 +2786,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", @@ -2796,6 +2797,7 @@ STR16 BobbyRFilter[] = L"Shotgun", // Ammo + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 489ceb1f..c9c037d9 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -2784,6 +2784,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", @@ -2794,6 +2795,7 @@ STR16 BobbyRFilter[] = L"Shotgun", // Ammo + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 8a9a0b67..a9f11796 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -2793,6 +2793,7 @@ STR16 BobbyROrderFormText[] = STR16 BobbyRFilter[] = { // Guns + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG", @@ -2803,6 +2804,7 @@ STR16 BobbyRFilter[] = L"Shotgun", // Ammo + L"Heavy W.", L"Pistol", L"M. Pistol", L"SMG",