mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
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:
+1
-1
@@ -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
@@ -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
@@ -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
File diff suppressed because it is too large
Load Diff
+19
-4
@@ -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
|
||||
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user