Files
source/Laptop/BobbyRUsed.cpp
T
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* More unused stuff removal

delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers

* remove mentions from vc proj files too

* remove preprocessor conditionals for unused definitions

find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'

then manually fixed a couple files the tool errored out on

* yes, the comments too

as title
2023-01-03 15:51:48 +02:00

106 lines
2.3 KiB
C++

#include "laptop.h"
#include "BobbyRUsed.h"
#include "BobbyR.h"
#include "BobbyRGuns.h"
#include "Utilities.h"
#include "WCheck.h"
#include "WordWrap.h"
#include "Text.h"
UINT32 guiUsedBackground;
UINT32 guiUsedGrid;
void GameInitBobbyRUsed()
{
}
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);
CHECKF(AddVideoObject(&VObjectDesc, &guiUsedBackground));
// load the gunsgrid graphic and add it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("LAPTOP\\usedgrid.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiUsedGrid));
InitBobbyBrTitle();
guiPrevUsedFilterMode = -1;
guiCurrentUsedFilterMode = -1;
SetFirstLastPagesForUsed(guiCurrentUsedFilterMode);
//Draw menu bar
InitBobbyMenuBar( );
InitBobbyRUsedFilterBar();
RenderBobbyRUsed( );
return(TRUE);
}
void ExitBobbyRUsed()
{
DeleteVideoObjectFromIndex(guiUsedBackground);
DeleteVideoObjectFromIndex(guiUsedGrid);
DeleteBobbyMenuBar();
DeleteBobbyRUsedFilter();
DeleteBobbyBrTitle();
DeleteMouseRegionForBigImage();
giCurrentSubPage = gusCurWeaponIndex;
guiLastBobbyRayPage = LAPTOP_MODE_BOBBY_R_USED;
}
void HandleBobbyRUsed()
{
HandleBobbyRGuns();
}
void RenderBobbyRUsed()
{
HVOBJECT hPixHandle;
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiUsedBackground);
//Display title at top of page
//DisplayBobbyRBrTitle();
// GunForm
GetVideoObject(&hPixHandle, guiUsedGrid);
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
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);
//Moa removed below. See comment above LAPTOP_SCREEN_UL_X in laptop.h
// fReDrawScreenFlag = TRUE;
//fPausedReDrawScreenFlag = TRUE;
}