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
This commit is contained in:
Wanne
2006-08-11 10:21:36 +00:00
parent f3bbd1c4a4
commit c739efc56e
19 changed files with 1388 additions and 136 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -18,7 +18,7 @@ void RenderBobbyR();
#define BOBBYR_NUM_VERTICAL_TILES 4
#define BOBBYR_GRIDLOC_X LAPTOP_SCREEN_UL_X + 4
#define BOBBYR_GRIDLOC_Y LAPTOP_SCREEN_WEB_UL_Y + 45
#define BOBBYR_GRIDLOC_Y LAPTOP_SCREEN_WEB_UL_Y + 5 //LAPTOP_SCREEN_WEB_UL_Y + 45
/*
+17 -9
View File
@@ -28,6 +28,8 @@ BOOLEAN EnterBobbyRAmmo()
{
VOBJECT_DESC VObjectDesc;
//gfBigImageMouseRegionCreated = FALSE;
// load the background graphic and add it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("LAPTOP\\ammobackground.sti", VObjectDesc.ImageFile);
@@ -40,12 +42,14 @@ BOOLEAN EnterBobbyRAmmo()
InitBobbyBrTitle();
guiPrevAmmoFilterMode = -1;
guiCurrentAmmoFilterMode = -1;
SetFirstLastPagesForNew( IC_AMMO );
// CalculateFirstAndLastIndexs();
SetFirstLastPagesForNew( IC_AMMO, guiCurrentAmmoFilterMode );
//Draw menu bar
InitBobbyMenuBar( );
InitBobbyRAmmoFilterBar();
RenderBobbyRAmmo( );
@@ -58,6 +62,9 @@ void ExitBobbyRAmmo()
DeleteVideoObjectFromIndex(guiAmmoGrid);
DeleteBobbyMenuBar();
// WANNE
DeleteBobbyRAmmoFilter();
DeleteBobbyBrTitle();
DeleteMouseRegionForBigImage();
@@ -71,23 +78,24 @@ void HandleBobbyRAmmo()
void RenderBobbyRAmmo()
{
HVOBJECT hPixHandle;
HVOBJECT hPixHandle;
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiAmmoBackground);
//Display title at top of page
DisplayBobbyRBrTitle();
//DisplayBobbyRBrTitle();
// GunForm
GetVideoObject(&hPixHandle, guiAmmoGrid);
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
DisplayItemInfo(IC_AMMO);
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
DisplayItemInfo(IC_AMMO, guiCurrentAmmoFilterMode);
UpdateButtonText(guiCurrentLaptopMode);
MarkButtonsDirty( );
UpdateAmmoFilterButtons(guiCurrentAmmoFilterMode, guiPrevAmmoFilterMode);
MarkButtonsDirty( );
RenderWWWProgramTitleBar( );
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
fReDrawScreenFlag = TRUE;
fPausedReDrawScreenFlag = TRUE;
}
+11 -4
View File
@@ -38,11 +38,14 @@ BOOLEAN EnterBobbyRArmour()
CHECKF(AddVideoObject(&VObjectDesc, &guiArmourGrid));
InitBobbyBrTitle();
guiPrevArmourFilterMode = -1;
guiCurrentArmourFilterMode = -1;
//Draw menu bar
InitBobbyMenuBar( );
SetFirstLastPagesForNew( IC_ARMOUR );
// CalculateFirstAndLastIndexs();
SetFirstLastPagesForNew( IC_ARMOUR, guiCurrentArmourFilterMode );
RenderBobbyRArmour( );
@@ -74,15 +77,19 @@ void RenderBobbyRArmour()
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiArmourBackground);
//Display title at top of page
DisplayBobbyRBrTitle();
//DisplayBobbyRBrTitle();
// GunForm
GetVideoObject(&hPixHandle, guiArmourGrid);
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
DisplayItemInfo(IC_ARMOUR);
DisplayItemInfo(IC_ARMOUR, guiCurrentArmourFilterMode);
UpdateButtonText(guiCurrentLaptopMode);
// TODO
//UpdateGunFilterButtons(guiCurrentArmourFilterMode, guiPrevArmourFilterMode);
MarkButtonsDirty( );
RenderWWWProgramTitleBar( );
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
+1039 -110
View File
File diff suppressed because it is too large Load Diff
+19 -4
View File
@@ -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
+9 -3
View File
@@ -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);
+14 -4
View File
@@ -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);
+18
View File
@@ -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;
+18
View File
@@ -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;
+31
View File
@@ -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
+30
View File
@@ -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
+30
View File
@@ -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
+30
View File
@@ -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
+30
View File
@@ -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[] =
{
+30
View File
@@ -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[] =
+30
View File
@@ -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
+31
View File
@@ -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[] =
-1
View File
@@ -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"