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
This commit is contained in:
Wanne
2006-08-12 11:41:39 +00:00
parent f135291973
commit fa0744a0d9
12 changed files with 59 additions and 16 deletions
+2
View File
@@ -306,6 +306,8 @@ typedef struct
BOOLEAN fAmmoDynamicWeight; //Pulmu BOOLEAN fAmmoDynamicWeight; //Pulmu
BOOLEAN fEnableCrepitus; BOOLEAN fEnableCrepitus;
BOOLEAN fEnableAllWeaponCaches;
BOOLEAN fEnableAllTerrorists;
} GAME_EXTERNAL_OPTIONS; } GAME_EXTERNAL_OPTIONS;
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else #else
//RELEASE BUILD VERSION //RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.428" }; INT16 zVersionLabel[256] = { L"Release v1.13.429" };
#endif #endif
INT8 czVersionNumber[16] = { "Build 06.08.11" }; INT8 czVersionNumber[16] = { "Build 06.08.12" };
INT16 zTrackingNumber[16] = { L"Z" }; INT16 zTrackingNumber[16] = { L"Z" };
BIN
View File
Binary file not shown.
+39 -14
View File
@@ -59,14 +59,14 @@
#define BOBBYR_TO_ORDER_TEXT_WIDTH 330 #define BOBBYR_TO_ORDER_TEXT_WIDTH 330
#define BOBBYR_PREVIOUS_BUTTON_X LAPTOP_SCREEN_UL_X + 5 //BOBBYR_HOME_BUTTON_X + BOBBYR_CATALOGUE_BUTTON_WIDTH + 5 #define BOBBYR_PREVIOUS_BUTTON_X LAPTOP_SCREEN_UL_X + 5 //BOBBYR_HOME_BUTTON_X + BOBBYR_CATALOGUE_BUTTON_WIDTH + 5
#define BOBBYR_PREVIOUS_BUTTON_Y LAPTOP_SCREEN_WEB_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_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_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_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_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_CATALOGUE_BUTTON_WIDTH 56//75
#define BOBBYR_HOME_BUTTON_X iScreenWidthOffset + 120 #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_GUN_START_X BOBBYR_PREVIOUS_BUTTON_X
#define FILTER_BUTTONS_AMMO_START_X FILTER_BUTTONS_GUN_START_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_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 // WANNE
// The number of filter buttons which category uses // The number of filter buttons which category uses
#define NUMBER_GUNS_FILTER_BUTTONS 8 #define NUMBER_GUNS_FILTER_BUTTONS 9
#define NUMBER_AMMO_FILTER_BUTTONS 8 #define NUMBER_AMMO_FILTER_BUTTONS 9
#define NUMBER_ARMOUR_FILTER_BUTTONS 1 #define NUMBER_ARMOUR_FILTER_BUTTONS 1
#define NUMBER_MISC_FILTER_BUTTONS 1 #define NUMBER_MISC_FILTER_BUTTONS 1
#define NUMBER_USED_FILTER_BUTTONS 4 #define NUMBER_USED_FILTER_BUTTONS 4
@@ -174,6 +174,7 @@ BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType);
// WANNE // WANNE
INT8 ubFilterGunsButtonValues[] = { INT8 ubFilterGunsButtonValues[] = {
BOBBYR_FILTER_GUNS_HEAVY,
BOBBYR_FILTER_GUNS_PISTOL, BOBBYR_FILTER_GUNS_PISTOL,
BOBBYR_FILTER_GUNS_M_PISTOL, BOBBYR_FILTER_GUNS_M_PISTOL,
BOBBYR_FILTER_GUNS_SMG, BOBBYR_FILTER_GUNS_SMG,
@@ -185,6 +186,7 @@ INT8 ubFilterGunsButtonValues[] = {
// WANNE // WANNE
INT8 ubFilterAmmoButtonValues[] = { INT8 ubFilterAmmoButtonValues[] = {
BOBBYR_FILTER_AMMO_HEAVY,
BOBBYR_FILTER_AMMO_PISTOL, BOBBYR_FILTER_AMMO_PISTOL,
BOBBYR_FILTER_AMMO_M_PISTOL, BOBBYR_FILTER_AMMO_M_PISTOL,
BOBBYR_FILTER_AMMO_SMG, BOBBYR_FILTER_AMMO_SMG,
@@ -474,7 +476,7 @@ BOOLEAN InitBobbyRGunsFilterBar()
UINT8 i; UINT8 i;
UINT16 usPosX; UINT16 usPosX;
UINT8 bCurMode; UINT8 bCurMode;
UINT16 usYOffset = 0;
bCurMode = 0; bCurMode = 0;
usPosX = FILTER_BUTTONS_GUN_START_X; usPosX = FILTER_BUTTONS_GUN_START_X;
@@ -484,12 +486,19 @@ BOOLEAN InitBobbyRGunsFilterBar()
// Loop through the filter buttons // Loop through the filter buttons
for(i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++) for(i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
{ {
// Next row
if (i > 7)
{
usPosX = FILTER_BUTTONS_GUN_START_X;
usYOffset = 25;
}
// Filter buttons // 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_ON, BOBBYR_GUNS_SHADOW_COLOR,
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR, BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
TEXT_CJUSTIFIED, 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); DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterGunsCallback);
SetButtonCursor(guiBobbyRFilterGuns[i], CURSOR_LAPTOP_SCREEN); SetButtonCursor(guiBobbyRFilterGuns[i], CURSOR_LAPTOP_SCREEN);
@@ -510,6 +519,7 @@ BOOLEAN InitBobbyRAmmoFilterBar()
UINT8 i; UINT8 i;
UINT16 usPosX; UINT16 usPosX;
UINT8 bCurMode; UINT8 bCurMode;
UINT16 usYOffset = 0;
bCurMode = 0; bCurMode = 0;
@@ -520,12 +530,19 @@ BOOLEAN InitBobbyRAmmoFilterBar()
// Loop through the filter buttons // Loop through the filter buttons
for(i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++) for(i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
{ {
// Next row
if (i > 7)
{
usPosX = FILTER_BUTTONS_AMMO_START_X;
usYOffset = 25;
}
// Filter buttons // 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_ON, BOBBYR_GUNS_SHADOW_COLOR,
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR, BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
TEXT_CJUSTIFIED, 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); DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterAmmoCallback);
SetButtonCursor(guiBobbyRFilterAmmo[i], CURSOR_LAPTOP_SCREEN); SetButtonCursor(guiBobbyRFilterAmmo[i], CURSOR_LAPTOP_SCREEN);
@@ -829,6 +846,11 @@ void BtnBobbyRFilterGunsCallback(GUI_BUTTON *btn,INT32 reason)
switch (bNewValue) 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: case BOBBYR_FILTER_GUNS_PISTOL:
guiCurrentGunFilterMode = GUN_PISTOL; guiCurrentGunFilterMode = GUN_PISTOL;
break; break;
@@ -897,6 +919,9 @@ void BtnBobbyRFilterAmmoCallback(GUI_BUTTON *btn,INT32 reason)
switch (bNewValue) switch (bNewValue)
{ {
case BOBBYR_FILTER_AMMO_HEAVY:
guiCurrentAmmoFilterMode = NOT_GUN;
break;
case BOBBYR_FILTER_AMMO_PISTOL: case BOBBYR_FILTER_AMMO_PISTOL:
guiCurrentAmmoFilterMode = GUN_PISTOL; guiCurrentAmmoFilterMode = GUN_PISTOL;
break; break;
@@ -2574,13 +2599,13 @@ void UpdateAmmoFilterButtons(INT32 iNewButton, INT32 iOldButton)
if (iNewButton > -1) if (iNewButton > -1)
{ {
// Disable new Button // Disable new Button
DisableButton(guiBobbyRFilterAmmo[iNewButton - 1]); DisableButton(guiBobbyRFilterAmmo[iNewButton]);
} }
if (iOldButton > -1) if (iOldButton > -1)
{ {
// Enable old Button // Enable old Button
EnableButton(guiBobbyRFilterAmmo[iOldButton - 1]); EnableButton(guiBobbyRFilterAmmo[iOldButton]);
} }
} }
} }
@@ -2592,13 +2617,13 @@ void UpdateGunFilterButtons(INT32 iNewButton, INT32 iOldButton)
if (iNewButton > -1) if (iNewButton > -1)
{ {
// Disable new Button // Disable new Button
DisableButton(guiBobbyRFilterGuns[iNewButton - 1]); DisableButton(guiBobbyRFilterGuns[iNewButton]);
} }
if (iOldButton > -1) if (iOldButton > -1)
{ {
// Enable old Button // Enable old Button
EnableButton(guiBobbyRFilterGuns[iOldButton - 1]); EnableButton(guiBobbyRFilterGuns[iOldButton]);
} }
} }
} }
+2
View File
@@ -750,6 +750,7 @@ extern STR16 BobbyROrderFormText[];
enum enum
{ {
// Guns // Guns
BOBBYR_FILTER_GUNS_HEAVY,
BOBBYR_FILTER_GUNS_PISTOL, BOBBYR_FILTER_GUNS_PISTOL,
BOBBYR_FILTER_GUNS_M_PISTOL, BOBBYR_FILTER_GUNS_M_PISTOL,
BOBBYR_FILTER_GUNS_SMG, BOBBYR_FILTER_GUNS_SMG,
@@ -759,6 +760,7 @@ enum
BOBBYR_FILTER_GUNS_LMG, BOBBYR_FILTER_GUNS_LMG,
BOBBYR_FILTER_GUNS_SHOTGUN, BOBBYR_FILTER_GUNS_SHOTGUN,
// Ammo // Ammo
BOBBYR_FILTER_AMMO_HEAVY,
BOBBYR_FILTER_AMMO_PISTOL, BOBBYR_FILTER_AMMO_PISTOL,
BOBBYR_FILTER_AMMO_M_PISTOL, BOBBYR_FILTER_AMMO_M_PISTOL,
BOBBYR_FILTER_AMMO_SMG, BOBBYR_FILTER_AMMO_SMG,
+2
View File
@@ -2802,6 +2802,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
@@ -2812,6 +2813,7 @@ STR16 BobbyRFilter[] =
L"Shotgun", L"Shotgun",
// Ammo // Ammo
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
+2
View File
@@ -2802,6 +2802,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
@@ -2812,6 +2813,7 @@ STR16 BobbyRFilter[] =
L"Shotgun", L"Shotgun",
// Ammo // Ammo
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
+2
View File
@@ -2791,6 +2791,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
@@ -2801,6 +2802,7 @@ STR16 BobbyRFilter[] =
L"Shotgun", L"Shotgun",
// Ammo // Ammo
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
+2
View File
@@ -2663,6 +2663,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Schwere W.",
L"Pistole", L"Pistole",
L"M. Pistole", L"M. Pistole",
L"SMG", L"SMG",
@@ -2673,6 +2674,7 @@ STR16 BobbyRFilter[] =
L"Schrotfl.", L"Schrotfl.",
// Ammo // Ammo
L"Schwere W.",
L"Pistole", L"Pistole",
L"M. Pistole", L"M. Pistole",
L"SMG", L"SMG",
+2
View File
@@ -2786,6 +2786,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
@@ -2796,6 +2797,7 @@ STR16 BobbyRFilter[] =
L"Shotgun", L"Shotgun",
// Ammo // Ammo
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
+2
View File
@@ -2784,6 +2784,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
@@ -2794,6 +2795,7 @@ STR16 BobbyRFilter[] =
L"Shotgun", L"Shotgun",
// Ammo // Ammo
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
+2
View File
@@ -2793,6 +2793,7 @@ STR16 BobbyROrderFormText[] =
STR16 BobbyRFilter[] = STR16 BobbyRFilter[] =
{ {
// Guns // Guns
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",
@@ -2803,6 +2804,7 @@ STR16 BobbyRFilter[] =
L"Shotgun", L"Shotgun",
// Ammo // Ammo
L"Heavy W.",
L"Pistol", L"Pistol",
L"M. Pistol", L"M. Pistol",
L"SMG", L"SMG",