mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Original Source for 1.13 Mod High Resolution version from 12/06/05
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@21 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -0,0 +1,703 @@
|
||||
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "AimArchives.h"
|
||||
#include "aim.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define AIM_ALUMNI_NAME_FILE "BINARYDATA\\AlumName.edt"
|
||||
#define AIM_ALUMNI_FILE "BINARYDATA\\Alumni.edt"
|
||||
|
||||
|
||||
#define AIM_ALUMNI_TITLE_FONT FONT14ARIAL
|
||||
#define AIM_ALUMNI_TITLE_COLOR AIM_GREEN
|
||||
|
||||
#define AIM_ALUMNI_POPUP_FONT FONT10ARIAL
|
||||
#define AIM_ALUMNI_POPUP_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define AIM_ALUMNI_POPUP_NAME_FONT FONT12ARIAL
|
||||
#define AIM_ALUMNI_POPUP_NAME_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define AIM_ALUMNI_NAME_FONT FONT12ARIAL
|
||||
#define AIM_ALUMNI_NAME_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_ALUMNI_PAGE_FONT FONT14ARIAL
|
||||
#define AIM_ALUMNI_PAGE_COLOR_UP FONT_MCOLOR_DKWHITE
|
||||
#define AIM_ALUMNI_PAGE_COLOR_DOWN 138
|
||||
|
||||
#define AIM_ALUMNI_NAME_LINESIZE 80 * 2
|
||||
#define AIM_ALUMNI_ALUMNI_LINESIZE 7 * 80 * 2
|
||||
|
||||
#define AIM_ALUMNI_NUM_FACE_COLS 5
|
||||
#define AIM_ALUMNI_NUM_FACE_ROWS 4
|
||||
#define MAX_NUMBER_OLD_MERCS_ON_PAGE AIM_ALUMNI_NUM_FACE_ROWS * AIM_ALUMNI_NUM_FACE_COLS
|
||||
|
||||
#define AIM_ALUMNI_START_GRID_X LAPTOP_SCREEN_UL_X + 37
|
||||
#define AIM_ALUMNI_START_GRID_Y LAPTOP_SCREEN_WEB_UL_Y + 68
|
||||
|
||||
#define AIM_ALUMNI_GRID_OFFSET_X 90
|
||||
#define AIM_ALUMNI_GRID_OFFSET_Y 72
|
||||
|
||||
#define AIM_ALUMNI_ALUMNI_FRAME_WIDTH 66
|
||||
#define AIM_ALUMNI_ALUMNI_FRAME_HEIGHT 64
|
||||
|
||||
#define AIM_ALUMNI_ALUMNI_FACE_WIDTH 56
|
||||
#define AIM_ALUMNI_ALUMNI_FACE_HEIGHT 50
|
||||
|
||||
#define AIM_ALUMNI_NAME_OFFSET_X 5
|
||||
#define AIM_ALUMNI_NAME_OFFSET_Y 55
|
||||
#define AIM_ALUMNI_NAME_WIDTH AIM_ALUMNI_ALUMNI_FRAME_WIDTH - AIM_ALUMNI_NAME_OFFSET_X * 2
|
||||
|
||||
#define AIM_ALUMNI_PAGE1_X LAPTOP_SCREEN_UL_X + 100
|
||||
#define AIM_ALUMNI_PAGE1_Y LAPTOP_SCREEN_WEB_UL_Y + 357
|
||||
#define AIM_ALUMNI_PAGE_GAP BOTTOM_BUTTON_START_WIDTH + 25
|
||||
|
||||
#define AIM_ALUMNI_PAGE_END_X AIM_ALUMNI_PAGE1_X + (BOTTOM_BUTTON_START_WIDTH + BOTTOM_BUTTON_START_WIDTH) * 3
|
||||
#define AIM_ALUMNI_PAGE_END_Y AIM_ALUMNI_PAGE1_Y + BOTTOM_BUTTON_START_HEIGHT
|
||||
|
||||
#define AIM_ALUMNI_TITLE_X IMAGE_OFFSET_X + 149
|
||||
#define AIM_ALUMNI_TITLE_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y // + 2
|
||||
#define AIM_ALUMNI_TITLE_WIDTH AIM_SYMBOL_WIDTH
|
||||
|
||||
#define AIM_POPUP_WIDTH 309
|
||||
#define AIM_POPUP_TEXT_WIDTH 296
|
||||
#define AIM_POPUP_SECTION_HEIGHT 9
|
||||
|
||||
#define AIM_POPUP_X LAPTOP_SCREEN_UL_X + (500-AIM_POPUP_WIDTH)/2
|
||||
#define AIM_POPUP_Y iScreenHeightOffset + 120 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_POPUP_SHADOW_GAP 4
|
||||
|
||||
#define AIM_POPUP_TEXT_X AIM_POPUP_X
|
||||
|
||||
#define AIM_ALUMNI_FACE_PANEL_X AIM_POPUP_X + 6
|
||||
#define AIM_ALUMNI_FACE_PANEL_Y AIM_POPUP_Y + 6
|
||||
#define AIM_ALUMNI_FACE_PANEL_WIDTH 58
|
||||
#define AIM_ALUMNI_FACE_PANEL_HEIGHT 52
|
||||
|
||||
#define AIM_ALUMNI_POPUP_NAME_X AIM_ALUMNI_FACE_PANEL_X + AIM_ALUMNI_FACE_PANEL_WIDTH + 10
|
||||
#define AIM_ALUMNI_POPUP_NAME_Y AIM_ALUMNI_FACE_PANEL_Y + 20
|
||||
|
||||
#define AIM_ALUMNI_POPUP_DESC_X AIM_POPUP_X + 8
|
||||
#define AIM_ALUMNI_POPUP_DESC_Y AIM_ALUMNI_FACE_PANEL_Y + AIM_ALUMNI_FACE_PANEL_HEIGHT + 5
|
||||
|
||||
#define AIM_ALUMNI_DONE_X AIM_POPUP_X + AIM_POPUP_WIDTH - AIM_ALUMNI_DONE_WIDTH - 7
|
||||
#define AIM_ALUMNI_DONE_WIDTH 36
|
||||
#define AIM_ALUMNI_DONE_HEIGHT 16
|
||||
|
||||
#define AIM_ALUMNI_NAME_SIZE 80 * 2
|
||||
#define AIM_ALUMNI_DECRIPTION_SIZE 80 * 7 * 2
|
||||
#define AIM_ALUMNI_FILE_RECORD_SIZE 80 * 8 * 2
|
||||
#define AIM_ALUMNI_FULL_NAME_SIZE 80 * 2
|
||||
|
||||
UINT32 guiAlumniFrame;
|
||||
UINT32 guiOldAim;
|
||||
UINT32 guiPageButtons;
|
||||
UINT32 guiAlumniPopUp;
|
||||
UINT32 guiPopUpPic;
|
||||
UINT32 guiDoneButton;
|
||||
|
||||
UINT8 gubPageNum;
|
||||
UINT8 gunAlumniButtonDown=255;
|
||||
BOOLEAN gfExitingAimArchives;
|
||||
UINT8 gubDrawOldMerc;
|
||||
UINT8 gfDrawPopUpBox=FALSE;
|
||||
BOOLEAN gfDestroyPopUpBox;
|
||||
BOOLEAN gfFaceMouseRegionsActive;
|
||||
//BOOLEAN gfDestroyDoneRegion;
|
||||
BOOLEAN gfReDrawScreen=FALSE;
|
||||
|
||||
BOOLEAN AimArchivesSubPagesVisitedFlag[3] = {0,0,0};
|
||||
|
||||
//Mouse Regions
|
||||
|
||||
//Face regions
|
||||
MOUSE_REGION gMercAlumniFaceMouseRegions[ MAX_NUMBER_OLD_MERCS_ON_PAGE ];
|
||||
void SelectAlumniFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Done region
|
||||
MOUSE_REGION gDoneRegion;
|
||||
void SelectAlumniDoneRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Previous Button
|
||||
void BtnAlumniPageButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiAlumniPageButton[3];
|
||||
INT32 guiAlumniPageButtonImage;
|
||||
|
||||
|
||||
void ResetAimArchiveButtons();
|
||||
void DisableAimArchiveButton();
|
||||
void DisplayAlumniOldMercPopUp();
|
||||
void DestroyPopUpBox();
|
||||
void InitAlumniFaceRegions();
|
||||
void RemoveAimAlumniFaceRegion();
|
||||
void CreateDestroyDoneMouseRegion(UINT16 usPosY);
|
||||
void ChangingAimArchiveSubPage( UINT8 ubSubPageNumber );
|
||||
|
||||
|
||||
void GameInitAimArchives()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EnterInitAimArchives()
|
||||
{
|
||||
gfDrawPopUpBox=FALSE;
|
||||
gfDestroyPopUpBox = FALSE;
|
||||
|
||||
memset( &AimArchivesSubPagesVisitedFlag, 0, 3);
|
||||
AimArchivesSubPagesVisitedFlag[0] = TRUE;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN EnterAimArchives()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT16 usPosX, i;
|
||||
|
||||
|
||||
gfExitingAimArchives = FALSE;
|
||||
// gubDrawOldMerc = 255;
|
||||
gfDrawPopUpBox=FALSE;
|
||||
gfDestroyPopUpBox=FALSE;
|
||||
|
||||
InitAimDefaults();
|
||||
InitAimMenuBar();
|
||||
|
||||
gubPageNum = (UINT8)giCurrentSubPage;
|
||||
|
||||
// load the Alumni Frame and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\AlumniFrame.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiAlumniFrame));
|
||||
|
||||
// load the 1st set of faces and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\Old_Aim.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiOldAim));
|
||||
|
||||
// load the Bottom Buttons graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BottomButton.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiPageButtons));
|
||||
|
||||
// load the PopupPic graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\PopupPicFrame.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiPopUpPic));
|
||||
|
||||
// load the AlumniPopUp graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\AlumniPopUp.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiAlumniPopUp));
|
||||
|
||||
// load the Done Button graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\DoneButton.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiDoneButton));
|
||||
|
||||
InitAlumniFaceRegions();
|
||||
|
||||
//Load graphic for buttons
|
||||
guiAlumniPageButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||
|
||||
usPosX = AIM_ALUMNI_PAGE1_X;
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
guiAlumniPageButton[i] = CreateIconAndTextButton( guiAlumniPageButtonImage, AimAlumniText[i], AIM_ALUMNI_PAGE_FONT,
|
||||
AIM_ALUMNI_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||
AIM_ALUMNI_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
usPosX, AIM_ALUMNI_PAGE1_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnAlumniPageButtonCallback);
|
||||
SetButtonCursor(guiAlumniPageButton[i], CURSOR_WWW);
|
||||
MSYS_SetBtnUserData( guiAlumniPageButton[i], 0, i);
|
||||
|
||||
usPosX += AIM_ALUMNI_PAGE_GAP;
|
||||
}
|
||||
|
||||
DisableAimArchiveButton();
|
||||
RenderAimArchives();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitAimArchives()
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
gfExitingAimArchives = TRUE;
|
||||
|
||||
DeleteVideoObjectFromIndex(guiAlumniFrame);
|
||||
DeleteVideoObjectFromIndex(guiOldAim);
|
||||
DeleteVideoObjectFromIndex(guiAlumniPopUp);
|
||||
DeleteVideoObjectFromIndex(guiPopUpPic);
|
||||
DeleteVideoObjectFromIndex(guiDoneButton);
|
||||
|
||||
|
||||
RemoveAimAlumniFaceRegion();
|
||||
|
||||
UnloadButtonImage( guiAlumniPageButtonImage );
|
||||
for(i=0; i<3; i++)
|
||||
RemoveButton( guiAlumniPageButton[i] );
|
||||
|
||||
RemoveAimDefaults();
|
||||
ExitAimMenuBar();
|
||||
giCurrentSubPage = gubPageNum;
|
||||
|
||||
CreateDestroyDoneMouseRegion(0);
|
||||
gfDestroyPopUpBox = FALSE;
|
||||
gfDrawPopUpBox = FALSE;
|
||||
}
|
||||
|
||||
void HandleAimArchives()
|
||||
{
|
||||
if( gfReDrawScreen )
|
||||
{
|
||||
// RenderAimArchives();
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
|
||||
gfReDrawScreen = FALSE;
|
||||
}
|
||||
if( gfDestroyPopUpBox )
|
||||
{
|
||||
gfDestroyPopUpBox = FALSE;
|
||||
|
||||
CreateDestroyDoneMouseRegion(0);
|
||||
InitAlumniFaceRegions();
|
||||
gfDestroyPopUpBox = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void RenderAimArchives()
|
||||
{
|
||||
HVOBJECT hFrameHandle;
|
||||
HVOBJECT hFaceHandle;
|
||||
// HVOBJECT hBottomButtonHandle;
|
||||
UINT16 usPosX, usPosY,x,y,i=0;
|
||||
UINT8 ubNumRows=0;
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sText[400];
|
||||
|
||||
|
||||
DrawAimDefaults();
|
||||
DisableAimButton();
|
||||
|
||||
//Draw Link Title
|
||||
DrawTextToScreen(AimAlumniText[AIM_ALUMNI_ALUMNI], AIM_ALUMNI_TITLE_X, AIM_ALUMNI_TITLE_Y, AIM_ALUMNI_TITLE_WIDTH, AIM_ALUMNI_TITLE_FONT, AIM_ALUMNI_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
//Draw the mug shot border and face
|
||||
GetVideoObject(&hFrameHandle, guiAlumniFrame);
|
||||
GetVideoObject(&hFaceHandle, guiOldAim);
|
||||
|
||||
switch(gubPageNum)
|
||||
{
|
||||
case 0:
|
||||
ubNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||
i=0;
|
||||
break;
|
||||
case 1:
|
||||
ubNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||
i=20;
|
||||
break;
|
||||
case 2:
|
||||
ubNumRows = 2;
|
||||
i=40;
|
||||
break;
|
||||
default:
|
||||
Assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||
usPosY = AIM_ALUMNI_START_GRID_Y;
|
||||
for(y=0; y<ubNumRows; y++)
|
||||
{
|
||||
for(x=0; x<AIM_ALUMNI_NUM_FACE_COLS; x++)
|
||||
{
|
||||
//Blt face to screen
|
||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, i,usPosX+4, usPosY+4, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Blt the alumni frame background
|
||||
BltVideoObject(FRAME_BUFFER, hFrameHandle, 0,usPosX, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Display the merc's name
|
||||
uiStartLoc = AIM_ALUMNI_NAME_LINESIZE * i;
|
||||
LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sText, uiStartLoc, AIM_ALUMNI_NAME_SIZE );
|
||||
DrawTextToScreen(sText, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
||||
i++;
|
||||
}
|
||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||
usPosY += AIM_ALUMNI_GRID_OFFSET_Y;
|
||||
}
|
||||
|
||||
//the 3rd page now has an additional row with 1 merc on it, so add a new row
|
||||
if( gubPageNum == 2 )
|
||||
{
|
||||
//Blt face to screen
|
||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, i,usPosX+4, usPosY+4, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Blt the alumni frame background
|
||||
BltVideoObject(FRAME_BUFFER, hFrameHandle, 0,usPosX, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Display the merc's name
|
||||
uiStartLoc = AIM_ALUMNI_NAME_LINESIZE * i;
|
||||
LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sText, uiStartLoc, AIM_ALUMNI_NAME_SIZE );
|
||||
DrawTextToScreen(sText, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// GetVideoObject(&hBottomButtonHandle, guiPageButtons);
|
||||
usPosX = AIM_ALUMNI_PAGE1_X;
|
||||
|
||||
if( gfDrawPopUpBox )
|
||||
{
|
||||
DisplayAlumniOldMercPopUp();
|
||||
RemoveAimAlumniFaceRegion();
|
||||
}
|
||||
|
||||
|
||||
MarkButtonsDirty( );
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void SelectAlumniFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gfDrawPopUpBox = TRUE;
|
||||
gfReDrawScreen = TRUE;
|
||||
|
||||
gubDrawOldMerc = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnAlumniPageButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
UINT8 ubRetValue = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
|
||||
gunAlumniButtonDown=ubRetValue;
|
||||
|
||||
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
RemoveAimAlumniFaceRegion();
|
||||
|
||||
ChangingAimArchiveSubPage( ubRetValue );
|
||||
|
||||
gubPageNum = ubRetValue;
|
||||
|
||||
gfReDrawScreen = TRUE;
|
||||
|
||||
gfDestroyPopUpBox = TRUE;
|
||||
|
||||
gunAlumniButtonDown=255;
|
||||
ResetAimArchiveButtons();
|
||||
DisableAimArchiveButton();
|
||||
gfDrawPopUpBox = FALSE;
|
||||
|
||||
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
gunAlumniButtonDown=255;
|
||||
DisableAimArchiveButton();
|
||||
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ResetAimArchiveButtons()
|
||||
{
|
||||
int i=0;
|
||||
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
ButtonList[ guiAlumniPageButton[i] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DisableAimArchiveButton()
|
||||
{
|
||||
if( gfExitingAimArchives == TRUE)
|
||||
return;
|
||||
|
||||
if( (gubPageNum == 0 ) )
|
||||
{
|
||||
ButtonList[ guiAlumniPageButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
else if( gubPageNum == 1 )
|
||||
{
|
||||
ButtonList[ guiAlumniPageButton[ 1 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
else if( gubPageNum == 2 )
|
||||
{
|
||||
ButtonList[ guiAlumniPageButton[ 2 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DisplayAlumniOldMercPopUp()
|
||||
{
|
||||
UINT8 i,ubNumLines=11; //17
|
||||
UINT16 usPosY, usTextPosY;
|
||||
UINT8 ubFontHeight, ubNumDescLines;
|
||||
HVOBJECT hAlumniPopUpHandle;
|
||||
HVOBJECT hDoneHandle;
|
||||
HVOBJECT hFacePaneHandle;
|
||||
HVOBJECT hFaceHandle;
|
||||
// WRAPPED_STRING *pFirstWrappedString, *pTempWrappedString;
|
||||
UINT16 usHeight = GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
||||
wchar_t sName[AIM_ALUMNI_NAME_SIZE];
|
||||
wchar_t sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
||||
UINT32 uiStartLoc;
|
||||
UINT16 usStringPixLength;
|
||||
|
||||
GetVideoObject(&hAlumniPopUpHandle, guiAlumniPopUp);
|
||||
GetVideoObject(&hDoneHandle, guiDoneButton);
|
||||
GetVideoObject(&hFacePaneHandle, guiPopUpPic);
|
||||
GetVideoObject(&hFaceHandle, guiOldAim);
|
||||
|
||||
ubFontHeight = (UINT8)GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
||||
|
||||
//Load the description
|
||||
uiStartLoc = AIM_ALUMNI_FILE_RECORD_SIZE * gubDrawOldMerc + AIM_ALUMNI_FULL_NAME_SIZE;
|
||||
LoadEncryptedDataFromFile(AIM_ALUMNI_FILE, sDesc, uiStartLoc, AIM_ALUMNI_DECRIPTION_SIZE);
|
||||
|
||||
usStringPixLength = StringPixLength( sDesc, AIM_ALUMNI_POPUP_FONT);
|
||||
ubNumDescLines = (UINT8) (usStringPixLength / AIM_POPUP_TEXT_WIDTH);
|
||||
|
||||
ubNumLines += ubNumDescLines;
|
||||
|
||||
usTextPosY = AIM_POPUP_Y + 5;
|
||||
usPosY = AIM_POPUP_Y;
|
||||
|
||||
//draw top line of the popup background
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, AIM_POPUP_X+AIM_POPUP_SHADOW_GAP, usPosY+AIM_POPUP_SHADOW_GAP, AIM_POPUP_X + AIM_POPUP_WIDTH+AIM_POPUP_SHADOW_GAP, usPosY + AIM_POPUP_SECTION_HEIGHT+AIM_POPUP_SHADOW_GAP-1);
|
||||
BltVideoObject(FRAME_BUFFER, hAlumniPopUpHandle, 0,AIM_POPUP_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
//draw mid section of the popup background
|
||||
usPosY += AIM_POPUP_SECTION_HEIGHT;
|
||||
for(i=0; i<ubNumLines; i++)
|
||||
{
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, AIM_POPUP_X+AIM_POPUP_SHADOW_GAP, usPosY+AIM_POPUP_SHADOW_GAP, AIM_POPUP_X + AIM_POPUP_WIDTH+AIM_POPUP_SHADOW_GAP, usPosY + AIM_POPUP_SECTION_HEIGHT+AIM_POPUP_SHADOW_GAP-1);
|
||||
BltVideoObject(FRAME_BUFFER, hAlumniPopUpHandle, 1,AIM_POPUP_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
usPosY += AIM_POPUP_SECTION_HEIGHT;
|
||||
}
|
||||
//draw the bottom line and done button
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, AIM_POPUP_X+AIM_POPUP_SHADOW_GAP, usPosY+AIM_POPUP_SHADOW_GAP, AIM_POPUP_X + AIM_POPUP_WIDTH+AIM_POPUP_SHADOW_GAP, usPosY + AIM_POPUP_SECTION_HEIGHT+AIM_POPUP_SHADOW_GAP-1);
|
||||
BltVideoObject(FRAME_BUFFER, hAlumniPopUpHandle, 2,AIM_POPUP_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(FRAME_BUFFER, hDoneHandle, 0,AIM_ALUMNI_DONE_X, usPosY-AIM_ALUMNI_DONE_HEIGHT, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
DrawTextToScreen(AimAlumniText[AIM_ALUMNI_DONE], (UINT16)(AIM_ALUMNI_DONE_X+1), (UINT16)(usPosY-AIM_ALUMNI_DONE_HEIGHT+3), AIM_ALUMNI_DONE_WIDTH, AIM_ALUMNI_POPUP_NAME_FONT, AIM_ALUMNI_POPUP_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
CreateDestroyDoneMouseRegion(usPosY);
|
||||
|
||||
///blt face panale and the mecs fce
|
||||
BltVideoObject(FRAME_BUFFER, hFacePaneHandle, 0,AIM_ALUMNI_FACE_PANEL_X, AIM_ALUMNI_FACE_PANEL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, gubDrawOldMerc, AIM_ALUMNI_FACE_PANEL_X+1, AIM_ALUMNI_FACE_PANEL_Y+1, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Load and display the name
|
||||
// uiStartLoc = AIM_ALUMNI_NAME_SIZE * gubDrawOldMerc;
|
||||
// LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sName, uiStartLoc, AIM_ALUMNI_NAME_SIZE);
|
||||
uiStartLoc = AIM_ALUMNI_FILE_RECORD_SIZE * gubDrawOldMerc;
|
||||
LoadEncryptedDataFromFile( AIM_ALUMNI_FILE, sName, uiStartLoc, AIM_ALUMNI_FULL_NAME_SIZE );
|
||||
|
||||
DrawTextToScreen(sName, AIM_ALUMNI_POPUP_NAME_X, AIM_ALUMNI_POPUP_NAME_Y, 0, AIM_ALUMNI_POPUP_NAME_FONT, AIM_ALUMNI_POPUP_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//Display the description
|
||||
DisplayWrappedString(AIM_ALUMNI_POPUP_DESC_X, AIM_ALUMNI_POPUP_DESC_Y, AIM_POPUP_TEXT_WIDTH, 2, AIM_ALUMNI_POPUP_FONT, AIM_ALUMNI_POPUP_COLOR, sDesc, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
void DestroyPopUpBox()
|
||||
{
|
||||
gfDestroyPopUpBox = FALSE;
|
||||
RenderAimArchives();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void InitAlumniFaceRegions()
|
||||
{
|
||||
UINT16 usPosX, usPosY,i,x,y, usNumRows;
|
||||
|
||||
if(gfFaceMouseRegionsActive)
|
||||
return;
|
||||
|
||||
if( gubPageNum == 2 )
|
||||
usNumRows = 2;
|
||||
else
|
||||
usNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||
|
||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||
usPosY = AIM_ALUMNI_START_GRID_Y;
|
||||
i=0;
|
||||
for(y=0; y<usNumRows; y++)
|
||||
{
|
||||
for(x=0; x<AIM_ALUMNI_NUM_FACE_COLS; x++)
|
||||
{
|
||||
|
||||
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
||||
// Add region
|
||||
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
||||
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
||||
|
||||
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
||||
i++;
|
||||
}
|
||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||
usPosY += AIM_ALUMNI_GRID_OFFSET_Y;
|
||||
}
|
||||
|
||||
//the 3rd page now has an additional row with 1 merc on it, so add a new row
|
||||
if( gubPageNum == 2 )
|
||||
{
|
||||
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
||||
// Add region
|
||||
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
||||
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
||||
}
|
||||
|
||||
|
||||
|
||||
gfFaceMouseRegionsActive = TRUE;
|
||||
}
|
||||
|
||||
void RemoveAimAlumniFaceRegion()
|
||||
{
|
||||
UINT16 i;
|
||||
UINT16 usNumber=0;
|
||||
|
||||
if(!gfFaceMouseRegionsActive)
|
||||
return;
|
||||
|
||||
switch(gubPageNum)
|
||||
{
|
||||
case 0:
|
||||
usNumber = AIM_ALUMNI_NUM_FACE_ROWS * AIM_ALUMNI_NUM_FACE_COLS;
|
||||
break;
|
||||
case 1:
|
||||
usNumber = AIM_ALUMNI_NUM_FACE_ROWS * AIM_ALUMNI_NUM_FACE_COLS;
|
||||
break;
|
||||
case 2:
|
||||
usNumber = 2 * AIM_ALUMNI_NUM_FACE_COLS + 1;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for(i=0; i<usNumber; i++)
|
||||
{
|
||||
MSYS_RemoveRegion( &gMercAlumniFaceMouseRegions[ i ]);
|
||||
}
|
||||
gfFaceMouseRegionsActive = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void CreateDestroyDoneMouseRegion(UINT16 usPosY)
|
||||
{
|
||||
static BOOLEAN DoneRegionCreated=FALSE;
|
||||
|
||||
if( ( !DoneRegionCreated ) && ( usPosY != 0) )
|
||||
{
|
||||
usPosY -= AIM_ALUMNI_DONE_HEIGHT;
|
||||
MSYS_DefineRegion( &gDoneRegion, AIM_ALUMNI_DONE_X-2, usPosY, (AIM_ALUMNI_DONE_X-2 + AIM_ALUMNI_DONE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_DONE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniDoneRegionCallBack);
|
||||
// Add region
|
||||
MSYS_AddRegion( &gDoneRegion );
|
||||
DoneRegionCreated = TRUE;
|
||||
}
|
||||
|
||||
if( DoneRegionCreated && usPosY == 0)
|
||||
{
|
||||
MSYS_RemoveRegion( &gDoneRegion );
|
||||
DoneRegionCreated = FALSE;
|
||||
// gfDestroyDoneRegion = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SelectAlumniDoneRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gfDestroyPopUpBox = TRUE;
|
||||
gfDrawPopUpBox = FALSE;
|
||||
gfReDrawScreen = TRUE;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void ChangingAimArchiveSubPage( UINT8 ubSubPageNumber )
|
||||
{
|
||||
fLoadPendingFlag = TRUE;
|
||||
|
||||
if( AimArchivesSubPagesVisitedFlag[ ubSubPageNumber ] == FALSE )
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = FALSE;
|
||||
|
||||
AimArchivesSubPagesVisitedFlag[ ubSubPageNumber ] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __AIMARCHIVES_H_
|
||||
#define __AIMARCHIVES_H_
|
||||
|
||||
void GameInitAimArchives();
|
||||
BOOLEAN EnterAimArchives();
|
||||
void ExitAimArchives();
|
||||
void HandleAimArchives();
|
||||
void RenderAimArchives();
|
||||
void EnterInitAimArchives();
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,338 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "AimFacialIndex.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "stdio.h"
|
||||
#include "Aim.h"
|
||||
#include "Soldier Profile.h"
|
||||
#include "email.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
extern UINT8 gubCurrentSortMode; // symbol already defined in AimSort.cpp (jonathanl)
|
||||
extern UINT8 gubCurrentListMode; // symbol already declared globally in AimSort.cpp (jonathanl)
|
||||
extern UINT8 gbCurrentIndex;
|
||||
|
||||
|
||||
UINT32 guiMugShotBorder;
|
||||
UINT32 guiAimFiFace[ MAX_NUMBER_MERCS ];
|
||||
|
||||
|
||||
|
||||
#define AIM_FI_NUM_MUHSHOTS_X 8
|
||||
#define AIM_FI_NUM_MUHSHOTS_Y 5
|
||||
|
||||
#define AIM_FI_PORTRAIT_WIDTH 52
|
||||
#define AIM_FI_PORTRAIT_HEIGHT 48
|
||||
|
||||
#define AIM_FI_FIRST_MUGSHOT_X IMAGE_OFFSET_X + 6
|
||||
#define AIM_FI_FIRST_MUGSHOT_Y IMAGE_OFFSET_Y + 69//67//70 //68 //65
|
||||
#define AIM_FI_MUGSHOT_GAP_X 10
|
||||
#define AIM_FI_MUGSHOT_GAP_Y 13
|
||||
#define AIM_FI_FACE_OFFSET 2
|
||||
|
||||
#define AIM_FI_NNAME_OFFSET_X 2
|
||||
#define AIM_FI_NNAME_OFFSET_Y AIM_FI_PORTRAIT_HEIGHT+1
|
||||
#define AIM_FI_NNAME_WIDTH AIM_FI_PORTRAIT_WIDTH+4
|
||||
|
||||
#define AIM_FI_MEMBER_TEXT_X IMAGE_OFFSET_X + 155
|
||||
#define AIM_FI_MEMBER_TEXT_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 1
|
||||
#define AIM_FI_MEMBER_TEXT_WIDTH 190
|
||||
|
||||
#define AIM_FI_AWAY_TEXT_OFFSET_X 3
|
||||
#define AIM_FI_AWAY_TEXT_OFFSET_Y 23//3//36
|
||||
#define AIM_FI_AWAY_TEXT_OFFSET_WIDTH 48
|
||||
|
||||
|
||||
//Mouse Regions
|
||||
|
||||
//Face regions
|
||||
MOUSE_REGION gMercFaceMouseRegions[ MAX_NUMBER_MERCS ];
|
||||
void SelectMercFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
void SelectMercFaceMoveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Screen region, used to right click to go back to previous page
|
||||
MOUSE_REGION gScreenMouseRegions;
|
||||
void SelectScreenRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT8 ubImage);
|
||||
|
||||
|
||||
void GameInitAimFacialIndex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterAimFacialIndex()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 i;
|
||||
UINT16 usPosX, usPosY, x,y;
|
||||
STR sFaceLoc = "FACES\\";
|
||||
char sTemp[100];
|
||||
|
||||
// load the Portait graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\MugShotBorder3.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMugShotBorder));
|
||||
|
||||
usPosX = AIM_FI_FIRST_MUGSHOT_X;
|
||||
usPosY = AIM_FI_FIRST_MUGSHOT_Y;
|
||||
i=0;
|
||||
for(y=0; y<AIM_FI_NUM_MUHSHOTS_Y; y++)
|
||||
{
|
||||
for(x=0; x<AIM_FI_NUM_MUHSHOTS_X; x++)
|
||||
{
|
||||
|
||||
MSYS_DefineRegion( &gMercFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_FI_PORTRAIT_WIDTH), (INT16)(usPosY + AIM_FI_PORTRAIT_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, SelectMercFaceMoveRegionCallBack, SelectMercFaceRegionCallBack);
|
||||
// Add region
|
||||
MSYS_AddRegion( &gMercFaceMouseRegions[ i ] );
|
||||
MSYS_SetRegionUserData( &gMercFaceMouseRegions[ i ], 0, i);
|
||||
|
||||
sprintf(sTemp, "%s%02d.sti", sFaceLoc, AimMercArray[i]);
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject(&VObjectDesc, &guiAimFiFace[i]) )
|
||||
return( FALSE );
|
||||
|
||||
|
||||
usPosX += AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X;
|
||||
i++;
|
||||
}
|
||||
usPosX = AIM_FI_FIRST_MUGSHOT_X;
|
||||
usPosY += AIM_FI_PORTRAIT_HEIGHT + AIM_FI_MUGSHOT_GAP_Y;
|
||||
}
|
||||
|
||||
MSYS_DefineRegion( &gScreenMouseRegions, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
||||
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectScreenRegionCallBack);
|
||||
// Add region
|
||||
MSYS_AddRegion( &gScreenMouseRegions );
|
||||
|
||||
|
||||
InitAimMenuBar();
|
||||
InitAimDefaults();
|
||||
|
||||
RenderAimFacialIndex();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void ExitAimFacialIndex()
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
RemoveAimDefaults();
|
||||
|
||||
DeleteVideoObjectFromIndex(guiMugShotBorder);
|
||||
|
||||
|
||||
for(i=0; i<MAX_NUMBER_MERCS; i++)
|
||||
{
|
||||
DeleteVideoObjectFromIndex( guiAimFiFace[i]);
|
||||
MSYS_RemoveRegion( &gMercFaceMouseRegions[ i ]);
|
||||
}
|
||||
ExitAimMenuBar();
|
||||
|
||||
MSYS_RemoveRegion( &gScreenMouseRegions);
|
||||
}
|
||||
|
||||
void HandleAimFacialIndex()
|
||||
{
|
||||
// if( fShowBookmarkInfo )
|
||||
// fPausedReDrawScreenFlag = TRUE;
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN RenderAimFacialIndex()
|
||||
{
|
||||
UINT16 usPosX, usPosY, x,y;
|
||||
wchar_t sString[150];
|
||||
UINT8 i;
|
||||
|
||||
DrawAimDefaults();
|
||||
|
||||
//Display the 'A.I.M. Members Sorted Ascending By Price' type string
|
||||
if( gubCurrentListMode == AIM_ASCEND )
|
||||
swprintf(sString, AimFiText[ AIM_FI_AIM_MEMBERS_SORTED_ASCENDING ], AimFiText[gubCurrentSortMode] );
|
||||
else
|
||||
swprintf(sString, AimFiText[ AIM_FI_AIM_MEMBERS_SORTED_DESCENDING ], AimFiText[gubCurrentSortMode] );
|
||||
|
||||
DrawTextToScreen(sString, AIM_FI_MEMBER_TEXT_X, AIM_FI_MEMBER_TEXT_Y, AIM_FI_MEMBER_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_MAINTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
|
||||
//Draw the mug shot border and face
|
||||
usPosX = AIM_FI_FIRST_MUGSHOT_X;
|
||||
usPosY = AIM_FI_FIRST_MUGSHOT_Y;
|
||||
|
||||
i=0;
|
||||
for(y=0; y<AIM_FI_NUM_MUHSHOTS_Y; y++)
|
||||
{
|
||||
for(x=0; x<AIM_FI_NUM_MUHSHOTS_X; x++)
|
||||
{
|
||||
DrawMercsFaceToScreen(i, usPosX, usPosY, 1);
|
||||
DrawTextToScreen(gMercProfiles[AimMercArray[i]].zNickname, (UINT16)(usPosX - AIM_FI_NNAME_OFFSET_X), (UINT16)(usPosY + AIM_FI_NNAME_OFFSET_Y), AIM_FI_NNAME_WIDTH, AIM_FONT12ARIAL, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
usPosX += AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X;
|
||||
i++;
|
||||
}
|
||||
usPosX = AIM_FI_FIRST_MUGSHOT_X;
|
||||
usPosY += AIM_FI_PORTRAIT_HEIGHT + AIM_FI_MUGSHOT_GAP_Y;
|
||||
}
|
||||
|
||||
DisableAimButton();
|
||||
|
||||
//display the 'left and right click' onscreen help msg
|
||||
DrawTextToScreen(AimFiText[AIM_FI_LEFT_CLICK], AIM_FI_LEFT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
DrawTextToScreen(AimFiText[AIM_FI_TO_SELECT], AIM_FI_LEFT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
DrawTextToScreen(AimFiText[AIM_FI_RIGHT_CLICK], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
DrawTextToScreen(AimFiText[AIM_FI_TO_ENTER_SORT_PAGE], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
MarkButtonsDirty( );
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void SelectMercFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
|
||||
gbCurrentIndex = (UINT8) MSYS_GetRegionUserData( pRegion, 0 );
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SelectScreenRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SelectMercFaceMoveRegionCallBack(MOUSE_REGION * pRegion, INT32 reason )
|
||||
{
|
||||
UINT8 ubMercNum;
|
||||
UINT16 usPosX, usPosY;
|
||||
UINT16 ty1, ty2, tx1, tx2;
|
||||
|
||||
ubMercNum = (UINT8) MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
ty1 = AIM_FI_FIRST_MUGSHOT_Y;
|
||||
ty2 = (AIM_FI_PORTRAIT_HEIGHT + AIM_FI_MUGSHOT_GAP_Y);
|
||||
|
||||
tx1 = AIM_FI_FIRST_MUGSHOT_X;
|
||||
tx2 = (AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X);
|
||||
|
||||
usPosY = ubMercNum / AIM_FI_NUM_MUHSHOTS_X;
|
||||
usPosY = AIM_FI_FIRST_MUGSHOT_Y + (AIM_FI_PORTRAIT_HEIGHT + AIM_FI_MUGSHOT_GAP_Y) * usPosY;
|
||||
|
||||
usPosX = ubMercNum % AIM_FI_NUM_MUHSHOTS_X;
|
||||
usPosX = AIM_FI_FIRST_MUGSHOT_X + (AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X) * usPosX;
|
||||
|
||||
// fReDrawNewMailFlag = TRUE;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||
{
|
||||
pRegion->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
DrawMercsFaceToScreen(ubMercNum, usPosX, usPosY, 1);
|
||||
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_GAIN_MOUSE )
|
||||
{
|
||||
pRegion->uiFlags |= BUTTON_CLICKED_ON ;
|
||||
DrawMercsFaceToScreen(ubMercNum, usPosX, usPosY, 0);
|
||||
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT8 ubImage)
|
||||
{
|
||||
HVOBJECT hMugShotBorderHandle;
|
||||
HVOBJECT hFaceHandle;
|
||||
SOLDIERTYPE *pSoldier=NULL;
|
||||
|
||||
pSoldier = FindSoldierByProfileID( AimMercArray[ubMercID], TRUE );
|
||||
|
||||
|
||||
//Blt the portrait background
|
||||
GetVideoObject(&hMugShotBorderHandle, guiMugShotBorder);
|
||||
BltVideoObject(FRAME_BUFFER, hMugShotBorderHandle, ubImage,usPosX, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Blt face to screen
|
||||
GetVideoObject(&hFaceHandle, guiAimFiFace[ubMercID]);
|
||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, 0,usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
if( IsMercDead( AimMercArray[ubMercID] ) )
|
||||
{
|
||||
//get the face object
|
||||
GetVideoObject(&hFaceHandle, guiAimFiFace[ubMercID]);
|
||||
|
||||
//if the merc is dead
|
||||
//shade the face red, (to signif that he is dead)
|
||||
hFaceHandle->pShades[ 0 ] = Create16BPPPaletteShaded( hFaceHandle->pPaletteEntry, DEAD_MERC_COLOR_RED, DEAD_MERC_COLOR_GREEN, DEAD_MERC_COLOR_BLUE, TRUE );
|
||||
|
||||
//set the red pallete to the face
|
||||
SetObjectHandleShade( guiAimFiFace[ubMercID], 0 );
|
||||
|
||||
//Blt face to screen
|
||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, 0,usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DrawTextToScreen(AimFiText[AIM_FI_DEAD], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
}
|
||||
|
||||
//else if the merc is currently a POW or, the merc was fired as a pow
|
||||
else if( gMercProfiles[ AimMercArray[ubMercID] ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||
{
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
|
||||
DrawTextToScreen( pPOWStrings[0], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
}
|
||||
|
||||
//if the merc is on our team
|
||||
else if( pSoldier != NULL )
|
||||
{
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
|
||||
DrawTextToScreen( MercInfo[MERC_FILES_ALREADY_HIRED], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
}
|
||||
|
||||
//if the merc is away, shadow his/her face and blit 'away' over top
|
||||
else if( !IsMercHireable( AimMercArray[ubMercID] ) )
|
||||
{
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
|
||||
DrawTextToScreen( AimFiText[AIM_FI_DEAD+1], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
//if not enough room use this..
|
||||
//AimFiText[AIM_FI_AWAY]
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef __AIMFACIALINDEX_H_
|
||||
#define __AIMFACIALINDEX_H_
|
||||
|
||||
#define AIM_FI_LEFT_CLICK_TEXT_X (SCREEN_WIDTH - 640) / 2 + 116
|
||||
#define AIM_FI_LEFT_CLICK_TEXT_Y (SCREEN_HEIGHT - 480) / 2 + 35 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_FI_CLICK_DESC_TEXT_Y_OFFSET 16
|
||||
|
||||
#define AIM_FI_RIGHT_CLICK_TEXT_X (SCREEN_WIDTH - 640) / 2 + 500
|
||||
|
||||
#define AIM_FI_CLICK_TEXT_WIDTH 110
|
||||
|
||||
#define AIM_FI_HELP_FONT FONT10ARIAL
|
||||
#define AIM_FI_HELP_TITLE_FONT FONT12ARIAL
|
||||
#define IM_FI_HELP_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
void GameInitAimFacialIndex();
|
||||
BOOLEAN EnterAimFacialIndex();
|
||||
void ExitAimFacialIndex();
|
||||
void HandleAimFacialIndex();
|
||||
BOOLEAN RenderAimFacialIndex();
|
||||
|
||||
BOOLEAN DisplayAimFIMugShot();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,626 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "AimHistory.h"
|
||||
#include "aim.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Defines
|
||||
|
||||
#define NUM_AIM_HISTORY_PAGES 5
|
||||
|
||||
#define AIM_HISTORY_TITLE_FONT FONT14ARIAL
|
||||
#define AIM_HISTORY_TITLE_COLOR AIM_GREEN
|
||||
#define AIM_HISTORY_TEXT_FONT FONT10ARIAL
|
||||
#define AIM_HISTORY_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_HISTORY_TOC_TEXT_FONT FONT12ARIAL
|
||||
#define AIM_HISTORY_TOC_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_HISTORY_PARAGRAPH_TITLE_FONT FONT12ARIAL
|
||||
#define AIM_HISTORY_PARAGRAPH_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
|
||||
#define AIM_HISTORY_MENU_X LAPTOP_SCREEN_UL_X + 40
|
||||
#define AIM_HISTORY_MENU_Y iScreenHeightOffset + 370 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
#define AIM_HISTORY_MENU_BUTTON_AMOUNT 4
|
||||
#define AIM_HISTORY_GAP_X 40 + BOTTOM_BUTTON_START_WIDTH
|
||||
#define AIM_HISTORY_MENU_END_X AIM_HISTORY_MENU_X + AIM_HISTORY_GAP_X * (AIM_HISTORY_MENU_BUTTON_AMOUNT+2)
|
||||
#define AIM_HISTORY_MENU_END_Y AIM_HISTORY_MENU_Y + BOTTOM_BUTTON_START_HEIGHT
|
||||
|
||||
#define AIM_HISTORY_TEXT_X IMAGE_OFFSET_X + 149
|
||||
#define AIM_HISTORY_TEXT_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 45
|
||||
#define AIM_HISTORY_TEXT_WIDTH AIM_SYMBOL_WIDTH
|
||||
|
||||
#define AIM_HISTORY_PARAGRAPH_X LAPTOP_SCREEN_UL_X + 20
|
||||
#define AIM_HISTORY_PARAGRAPH_Y AIM_HISTORY_SUBTITLE_Y + 18
|
||||
#define AIM_HISTORY_SUBTITLE_Y iScreenHeightOffset + 150 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
#define AIM_HISTORY_PARAGRAPH_WIDTH 460
|
||||
|
||||
#define AIM_HISTORY_CONTENTBUTTON_X iScreenWidthOffset + 259
|
||||
#define AIM_HISTORY_CONTENTBUTTON_Y AIM_HISTORY_SUBTITLE_Y
|
||||
|
||||
#define AIM_HISTORY_TOC_X AIM_HISTORY_CONTENTBUTTON_X
|
||||
#define AIM_HISTORY_TOC_Y 5
|
||||
#define AIM_HISTORY_TOC_GAP_Y 25
|
||||
|
||||
#define AIM_HISTORY_SPACE_BETWEEN_PARAGRAPHS 8
|
||||
|
||||
extern UINT32 guiBottomButton; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||
extern UINT32 guiBottomButton2; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||
extern UINT32 guiContentButton; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||
|
||||
extern UINT8 gubCurPageNum; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||
extern BOOLEAN gfInToc = FALSE; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||
extern UINT8 gubAimHistoryMenuButtonDown=255; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||
|
||||
BOOLEAN gfExitingAimHistory;
|
||||
BOOLEAN AimHistorySubPagesVisitedFlag[ NUM_AIM_HISTORY_PAGES ];
|
||||
|
||||
|
||||
|
||||
void ResetAimHistoryButtons();
|
||||
void DisableAimHistoryButton();
|
||||
|
||||
|
||||
MOUSE_REGION gSelectedHistoryTocMenuRegion[ NUM_AIM_HISTORY_PAGES ];
|
||||
void SelectHistoryTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Bottom Menu Buttons
|
||||
void BtnHistoryMenuButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiHistoryMenuButton[ AIM_HISTORY_MENU_BUTTON_AMOUNT ];
|
||||
INT32 guiHistoryMenuButtonImage;
|
||||
|
||||
|
||||
BOOLEAN DrawAimHistoryMenuBar(void);
|
||||
BOOLEAN ExitAimHistoryMenuBar(void);
|
||||
BOOLEAN InitAimHistoryMenuBar(void);
|
||||
BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs);
|
||||
BOOLEAN InitTocMenu();
|
||||
BOOLEAN ExitTocMenu();
|
||||
void ChangingAimHistorySubPage( UINT8 ubSubPageNumber );
|
||||
|
||||
|
||||
// These enums represent which paragraph they are located in the AimHist.edt file
|
||||
enum
|
||||
{
|
||||
IN_THE_BEGINNING =6,
|
||||
IN_THE_BEGINNING_1,
|
||||
IN_THE_BEGINNING_2,
|
||||
|
||||
THE_ISLAND_METAVIRA,
|
||||
THE_ISLAND_METAVIRA_1,
|
||||
THE_ISLAND_METAVIRA_2,
|
||||
|
||||
GUS_TARBALLS,
|
||||
GUS_TARBALLS_1,
|
||||
GUS_TARBALLS_2,
|
||||
|
||||
WORD_FROM_FOUNDER,
|
||||
WORD_FROM_FOUNDER_1,
|
||||
COLONEL_MOHANNED,
|
||||
|
||||
INCORPORATION,
|
||||
INCORPORATION_1,
|
||||
INCORPORATION_2,
|
||||
DUNN_AND_BRADROAD,
|
||||
INCORPORATION_3,
|
||||
} AimHistoryTextLocatoins;
|
||||
|
||||
|
||||
|
||||
void GameInitAimHistory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EnterInitAimHistory()
|
||||
{
|
||||
memset( &AimHistorySubPagesVisitedFlag, 0, NUM_AIM_HISTORY_PAGES);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN EnterAimHistory()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
gfExitingAimHistory = FALSE;
|
||||
InitAimDefaults();
|
||||
InitAimHistoryMenuBar();
|
||||
|
||||
// load the Content Buttons graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\ContentButton.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiContentButton));
|
||||
|
||||
gubCurPageNum = (UINT8) giCurrentSubPage;
|
||||
RenderAimHistory();
|
||||
|
||||
|
||||
DisableAimHistoryButton();
|
||||
gubAimHistoryMenuButtonDown = 255;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitAimHistory()
|
||||
{
|
||||
gfExitingAimHistory = TRUE;
|
||||
RemoveAimDefaults();
|
||||
ExitAimHistoryMenuBar();
|
||||
|
||||
DeleteVideoObjectFromIndex(guiContentButton);
|
||||
giCurrentSubPage = gubCurPageNum;
|
||||
|
||||
if(gfInToc)
|
||||
ExitTocMenu();
|
||||
|
||||
}
|
||||
|
||||
void HandleAimHistory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RenderAimHistory()
|
||||
{
|
||||
wchar_t sText[400];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usPosY;
|
||||
|
||||
DrawAimDefaults();
|
||||
// DrawAimHistoryMenuBar();
|
||||
DisplayAimSlogan();
|
||||
DisplayAimCopyright();
|
||||
|
||||
DrawTextToScreen(AimHistoryText[AIM_HISTORY_TITLE], AIM_HISTORY_TEXT_X, AIM_HISTORY_TEXT_Y, AIM_HISTORY_TEXT_WIDTH, AIM_HISTORY_TITLE_FONT, AIM_HISTORY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
|
||||
switch(gubCurPageNum)
|
||||
{
|
||||
// History Page TOC
|
||||
case 0:
|
||||
InitTocMenu();
|
||||
break;
|
||||
|
||||
//Load and Display the begining
|
||||
case 1:
|
||||
DisplayAimHistoryParagraph(IN_THE_BEGINNING, 2);
|
||||
break;
|
||||
|
||||
//Load and Display the island of metavira
|
||||
case 2:
|
||||
DisplayAimHistoryParagraph(THE_ISLAND_METAVIRA, 2);
|
||||
break;
|
||||
|
||||
//Load and Display the gus tarballs
|
||||
case 3:
|
||||
DisplayAimHistoryParagraph(GUS_TARBALLS, 2);
|
||||
break;
|
||||
|
||||
//Load and Display the founder
|
||||
case 4:
|
||||
DisplayAimHistoryParagraph(WORD_FROM_FOUNDER, 1);
|
||||
|
||||
// display coloniel Mohanned...
|
||||
usPosY = AIM_HISTORY_PARAGRAPH_Y + (GetFontHeight(AIM_HISTORY_TEXT_FONT) + 2)* 5 + LAPTOP_SCREEN_WEB_DELTA_Y;
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * COLONEL_MOHANNED;
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, iScreenHeightOffset + 210+LAPTOP_SCREEN_WEB_DELTA_Y, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
break;
|
||||
|
||||
//Load and Display the incorporation
|
||||
case 5:
|
||||
DisplayAimHistoryParagraph(INCORPORATION, 2);
|
||||
|
||||
// display dunn and bradbord...
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * DUNN_AND_BRADROAD;
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, iScreenHeightOffset + 270+LAPTOP_SCREEN_WEB_DELTA_Y, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
//AIM_HISTORY_PARAGRAPH_Y
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * INCORPORATION_3;
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, iScreenHeightOffset + 290+LAPTOP_SCREEN_WEB_DELTA_Y, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
break;
|
||||
}
|
||||
|
||||
MarkButtonsDirty( );
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN InitAimHistoryMenuBar(void)
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT16 i, usPosX;
|
||||
|
||||
// load the Bottom Buttons graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BottomButton.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomButton));
|
||||
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BottomButton2.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomButton2));
|
||||
|
||||
guiHistoryMenuButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||
usPosX = AIM_HISTORY_MENU_X;
|
||||
for(i=0; i<AIM_HISTORY_MENU_BUTTON_AMOUNT; i++)
|
||||
{
|
||||
// guiHistoryMenuButton[i] = QuickCreateButton(guiHistoryMenuButtonImage, usPosX, AIM_HISTORY_MENU_Y,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
// DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnHistoryMenuButtonCallback);
|
||||
// SetButtonCursor(guiHistoryMenuButton[i], CURSOR_WWW);
|
||||
// MSYS_SetBtnUserData( guiHistoryMenuButton[i], 0, i+1);
|
||||
|
||||
guiHistoryMenuButton[i] = CreateIconAndTextButton( guiHistoryMenuButtonImage, AimHistoryText[i+AIM_HISTORY_PREVIOUS], FONT10ARIAL,
|
||||
AIM_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||
AIM_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
usPosX, AIM_HISTORY_MENU_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnHistoryMenuButtonCallback);
|
||||
SetButtonCursor(guiHistoryMenuButton[i], CURSOR_WWW);
|
||||
MSYS_SetBtnUserData( guiHistoryMenuButton[i], 0, i+1);
|
||||
|
||||
|
||||
usPosX += AIM_HISTORY_GAP_X;
|
||||
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN ExitAimHistoryMenuBar(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// DeleteVideoObjectFromIndex(guiHistoryMenuButtonImage);
|
||||
UnloadButtonImage( guiHistoryMenuButtonImage );
|
||||
|
||||
|
||||
for(i=0; i<AIM_HISTORY_MENU_BUTTON_AMOUNT; i++)
|
||||
RemoveButton( guiHistoryMenuButton[i] );
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void SelectHistoryMenuButtonsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
UINT8 rValue;
|
||||
static BOOLEAN fOnPage=TRUE;
|
||||
|
||||
if(fOnPage)
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
rValue = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
//Previous Page
|
||||
if( rValue == 1 )
|
||||
{
|
||||
if( gubCurPageNum > 0)
|
||||
{
|
||||
gubCurPageNum--;
|
||||
ChangingAimHistorySubPage( gubCurPageNum );
|
||||
// RenderAimHistory();
|
||||
}
|
||||
}
|
||||
|
||||
// Home Page
|
||||
else if( rValue == 2 )
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
|
||||
}
|
||||
//Company policies
|
||||
else if( rValue == 3 )
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_POLICIES;
|
||||
}
|
||||
//Next Page
|
||||
else if( rValue == 4 )
|
||||
{
|
||||
if( gubCurPageNum < NUM_AIM_HISTORY_PAGES )
|
||||
{
|
||||
gubCurPageNum++;
|
||||
ChangingAimHistorySubPage( gubCurPageNum );
|
||||
|
||||
fOnPage = FALSE;
|
||||
if(gfInToc)
|
||||
{
|
||||
ExitTocMenu();
|
||||
}
|
||||
fOnPage = TRUE;
|
||||
// RenderAimHistory();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usPosY=0;
|
||||
UINT16 usNumPixels=0;
|
||||
|
||||
//title
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * ubPageNum;
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DrawTextToScreen(sText, AIM_HISTORY_PARAGRAPH_X, AIM_HISTORY_SUBTITLE_Y, 0, AIM_HISTORY_PARAGRAPH_TITLE_FONT, AIM_HISTORY_PARAGRAPH_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
if(ubNumParagraphs >= 1)
|
||||
{
|
||||
usPosY = AIM_HISTORY_PARAGRAPH_Y;
|
||||
//1st paragraph
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 1 );
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
usNumPixels = DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, usPosY, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
|
||||
if(ubNumParagraphs >= 2)
|
||||
{
|
||||
//2nd paragraph
|
||||
usPosY += usNumPixels + AIM_HISTORY_SPACE_BETWEEN_PARAGRAPHS;
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 2 );
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, usPosY, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
|
||||
if(ubNumParagraphs >= 3)
|
||||
{
|
||||
//3rd paragraph
|
||||
usPosY += usNumPixels + AIM_HISTORY_SPACE_BETWEEN_PARAGRAPHS;
|
||||
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 3 );
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, usPosY, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN InitTocMenu()
|
||||
{
|
||||
UINT16 i, usPosY;
|
||||
UINT16 usHeight;
|
||||
UINT16 usWidth=0;
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sText[400];
|
||||
UINT8 ubLocInFile[]=
|
||||
{IN_THE_BEGINNING,
|
||||
THE_ISLAND_METAVIRA,
|
||||
GUS_TARBALLS,
|
||||
WORD_FROM_FOUNDER,
|
||||
INCORPORATION};
|
||||
|
||||
HVOBJECT hContentButtonHandle;
|
||||
|
||||
GetVideoObject(&hContentButtonHandle, guiContentButton);
|
||||
|
||||
usHeight = GetFontHeight(AIM_HISTORY_TOC_TEXT_FONT);
|
||||
usPosY = AIM_HISTORY_CONTENTBUTTON_Y;
|
||||
for(i=0; i<NUM_AIM_HISTORY_PAGES; i++)
|
||||
{
|
||||
uiStartLoc = AIM_HISTORY_LINE_SIZE * ubLocInFile[i];
|
||||
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
|
||||
usWidth = StringPixLength(sText, AIM_HISTORY_TOC_TEXT_FONT);
|
||||
|
||||
//if the mouse regions havent been inited, init them
|
||||
if( !gfInToc )
|
||||
{
|
||||
//Mouse region for the history toc buttons
|
||||
MSYS_DefineRegion( &gSelectedHistoryTocMenuRegion[i], AIM_HISTORY_TOC_X, usPosY, (UINT16)(AIM_HISTORY_TOC_X + AIM_CONTENTBUTTON_WIDTH), (UINT16)(usPosY + AIM_CONTENTBUTTON_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectHistoryTocMenuRegionCallBack);
|
||||
MSYS_AddRegion(&gSelectedHistoryTocMenuRegion[i]);
|
||||
MSYS_SetRegionUserData( &gSelectedHistoryTocMenuRegion[i], 0, i+1);
|
||||
}
|
||||
|
||||
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_HISTORY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
DrawTextToScreen(sText, AIM_HISTORY_TOC_X, (UINT16)(usPosY + AIM_HISTORY_TOC_Y), AIM_CONTENTBUTTON_WIDTH, AIM_HISTORY_TOC_TEXT_FONT, AIM_HISTORY_TOC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
|
||||
usPosY += AIM_HISTORY_TOC_GAP_Y;
|
||||
}
|
||||
gfInToc = TRUE;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN ExitTocMenu()
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
if( gfInToc )
|
||||
{
|
||||
gfInToc = FALSE;
|
||||
for(i=0; i<NUM_AIM_HISTORY_PAGES; i++)
|
||||
MSYS_RemoveRegion( &gSelectedHistoryTocMenuRegion[i]);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectHistoryTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if(gfInToc)
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gubCurPageNum = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
ChangingAimHistorySubPage( gubCurPageNum );
|
||||
|
||||
ExitTocMenu();
|
||||
ResetAimHistoryButtons();
|
||||
// RenderAimHistory();
|
||||
DisableAimHistoryButton();
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnHistoryMenuButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
UINT8 ubRetValue = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
||||
gubAimHistoryMenuButtonDown = 255;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
|
||||
gubAimHistoryMenuButtonDown = ubRetValue;
|
||||
|
||||
InvalidateRegion(AIM_HISTORY_MENU_X,AIM_HISTORY_MENU_Y, AIM_HISTORY_MENU_END_X,AIM_HISTORY_MENU_END_Y);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
ResetAimHistoryButtons();
|
||||
|
||||
if( ubRetValue == 1 )
|
||||
{
|
||||
if( gubCurPageNum > 0)
|
||||
{
|
||||
gubCurPageNum--;
|
||||
ChangingAimHistorySubPage( gubCurPageNum );
|
||||
|
||||
// RenderAimHistory();
|
||||
ResetAimHistoryButtons();
|
||||
}
|
||||
else
|
||||
btn->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
|
||||
// Home Page
|
||||
else if( ubRetValue == 2 )
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
|
||||
}
|
||||
//Company policies
|
||||
else if( ubRetValue == 3 )
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_ARCHIVES;
|
||||
}
|
||||
//Next Page
|
||||
else if( ubRetValue == 4 )
|
||||
{
|
||||
if( gubCurPageNum < NUM_AIM_HISTORY_PAGES )
|
||||
{
|
||||
gubCurPageNum++;
|
||||
ChangingAimHistorySubPage( gubCurPageNum );
|
||||
|
||||
if(gfInToc)
|
||||
{
|
||||
ExitTocMenu();
|
||||
}
|
||||
// RenderAimHistory();
|
||||
}
|
||||
else
|
||||
btn->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
|
||||
}
|
||||
|
||||
DisableAimHistoryButton();
|
||||
|
||||
InvalidateRegion(AIM_HISTORY_MENU_X,AIM_HISTORY_MENU_Y, AIM_HISTORY_MENU_END_X,AIM_HISTORY_MENU_END_Y);
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
DisableAimHistoryButton();
|
||||
|
||||
InvalidateRegion(AIM_HISTORY_MENU_X,AIM_HISTORY_MENU_Y, AIM_HISTORY_MENU_END_X,AIM_HISTORY_MENU_END_Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ResetAimHistoryButtons()
|
||||
{
|
||||
int i=0;
|
||||
|
||||
for(i=0; i<AIM_HISTORY_MENU_BUTTON_AMOUNT; i++)
|
||||
{
|
||||
ButtonList[ guiHistoryMenuButton[i] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||
}
|
||||
}
|
||||
|
||||
void DisableAimHistoryButton()
|
||||
{
|
||||
if( gfExitingAimHistory == TRUE)
|
||||
return;
|
||||
|
||||
if( (gubCurPageNum == 0 ) )
|
||||
{
|
||||
ButtonList[ guiHistoryMenuButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
else if( ( gubCurPageNum == 5) )
|
||||
{
|
||||
ButtonList[ guiHistoryMenuButton[ AIM_HISTORY_MENU_BUTTON_AMOUNT-1 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ChangingAimHistorySubPage( UINT8 ubSubPageNumber )
|
||||
{
|
||||
fLoadPendingFlag = TRUE;
|
||||
|
||||
if( AimHistorySubPagesVisitedFlag[ ubSubPageNumber ] == FALSE )
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = FALSE;
|
||||
|
||||
AimHistorySubPagesVisitedFlag[ ubSubPageNumber ] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef __AIMHISTORY_H
|
||||
#define __AIMHISTORY_H
|
||||
|
||||
void GameInitAimHistory();
|
||||
BOOLEAN EnterAimHistory();
|
||||
void ExitAimHistory();
|
||||
void HandleAimHistory();
|
||||
void RenderAimHistory();
|
||||
void EnterInitAimHistory();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "AimLinks.h"
|
||||
#include "aim.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Text.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#endif
|
||||
|
||||
#define AIM_LINK_TITLE_FONT FONT14ARIAL
|
||||
#define AIM_LINK_TITLE_COLOR AIM_GREEN
|
||||
|
||||
#define AIM_LINK_FONT FONT12ARIAL
|
||||
#define AIM_LINK_COLOR AIM_FONT_GOLD
|
||||
|
||||
#define AIM_LINK_NUM_LINKS 3
|
||||
|
||||
#define AIM_LINK_LINK_OFFSET_Y 94//90
|
||||
|
||||
#define AIM_LINK_LINK_WIDTH 420
|
||||
#define AIM_LINK_LINK_HEIGHT 70
|
||||
|
||||
#define AIM_LINK_BOBBY_LINK_X LAPTOP_SCREEN_UL_X + 40
|
||||
#define AIM_LINK_BOBBY_LINK_Y LAPTOP_SCREEN_WEB_UL_Y + 91
|
||||
|
||||
#define AIM_LINK_FUNERAL_LINK_X AIM_LINK_BOBBY_LINK_X
|
||||
#define AIM_LINK_FUNERAL_LINK_Y AIM_LINK_BOBBY_LINK_Y + AIM_LINK_LINK_OFFSET_Y
|
||||
|
||||
#define AIM_LINK_INSURANCE_LINK_X AIM_LINK_BOBBY_LINK_X
|
||||
#define AIM_LINK_INSURANCE_LINK_Y AIM_LINK_FUNERAL_LINK_Y + AIM_LINK_LINK_OFFSET_Y
|
||||
|
||||
#define AIM_LINK_TITLE_X IMAGE_OFFSET_X + 149
|
||||
#define AIM_LINK_TITLE_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 10
|
||||
#define AIM_LINK_TITLE_WIDTH AIM_SYMBOL_WIDTH
|
||||
|
||||
#define AIM_LINK_LINK_TEXT_1_Y AIM_LINK_BOBBY_LINK_Y + 71
|
||||
#define AIM_LINK_LINK_TEXT_2_Y AIM_LINK_FUNERAL_LINK_Y + 36
|
||||
#define AIM_LINK_LINK_TEXT_3_Y AIM_LINK_INSURANCE_LINK_Y + 45
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UINT32 guiBobbyLink;
|
||||
UINT32 guiFuneralLink;
|
||||
UINT32 guiInsuranceLink;
|
||||
UINT8 gubLinkPages[]={
|
||||
BOBBYR_BOOKMARK,
|
||||
FUNERAL_BOOKMARK,
|
||||
INSURANCE_BOOKMARK};
|
||||
|
||||
//Clicking on guys Face
|
||||
MOUSE_REGION gSelectedLinkRegion[ AIM_LINK_NUM_LINKS ] ;
|
||||
void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
void GameInitAimLinks()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterAimLinks()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT16 usPosY;
|
||||
INT16 i;
|
||||
|
||||
InitAimDefaults();
|
||||
InitAimMenuBar();
|
||||
|
||||
// load the Bobby link graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_BOBBYRAYLINK );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyLink));
|
||||
|
||||
// load the Funeral graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_MORTUARYLINK );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiFuneralLink));
|
||||
|
||||
// load the Insurance graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_INSURANCELINK );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiInsuranceLink));
|
||||
|
||||
usPosY = AIM_LINK_BOBBY_LINK_Y;
|
||||
for(i=0; i<AIM_LINK_NUM_LINKS; i++)
|
||||
{
|
||||
MSYS_DefineRegion( &gSelectedLinkRegion[i], AIM_LINK_BOBBY_LINK_X, usPosY , AIM_LINK_BOBBY_LINK_X + AIM_LINK_LINK_WIDTH, (UINT16)(usPosY + AIM_LINK_LINK_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedLinkRegion[i]);
|
||||
MSYS_SetRegionUserData( &gSelectedLinkRegion[i], 0, gubLinkPages[i]);
|
||||
usPosY += AIM_LINK_LINK_OFFSET_Y;
|
||||
}
|
||||
|
||||
|
||||
RenderAimLinks();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitAimLinks()
|
||||
{
|
||||
INT16 i;
|
||||
|
||||
RemoveAimDefaults();
|
||||
|
||||
DeleteVideoObjectFromIndex(guiBobbyLink);
|
||||
DeleteVideoObjectFromIndex(guiFuneralLink);
|
||||
DeleteVideoObjectFromIndex(guiInsuranceLink);
|
||||
|
||||
for(i=0; i<AIM_LINK_NUM_LINKS; i++)
|
||||
MSYS_RemoveRegion( &gSelectedLinkRegion[i]);
|
||||
|
||||
ExitAimMenuBar();
|
||||
|
||||
}
|
||||
|
||||
void HandleAimLinks()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RenderAimLinks()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
DrawAimDefaults();
|
||||
DisableAimButton();
|
||||
|
||||
GetVideoObject(&hPixHandle, guiBobbyLink);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_BOBBY_LINK_X, AIM_LINK_BOBBY_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
GetVideoObject(&hPixHandle, guiFuneralLink);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_FUNERAL_LINK_X, AIM_LINK_FUNERAL_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
// DrawTextToScreen(AimLinkText[AIM_LINK_FUNERAL], AIM_LINK_BOBBY_LINK_X, AIM_LINK_LINK_TEXT_2_Y, AIM_LINK_LINK_WIDTH, AIM_LINK_FONT, AIM_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
GetVideoObject(&hPixHandle, guiInsuranceLink);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_INSURANCE_LINK_X, AIM_LINK_INSURANCE_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
// DrawTextToScreen(AimLinkText[AIM_LINK_LISTENING], AIM_LINK_BOBBY_LINK_X, AIM_LINK_LINK_TEXT_3_Y, AIM_LINK_LINK_WIDTH, AIM_LINK_FONT, AIM_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
//Draw Link Title
|
||||
DrawTextToScreen(AimLinkText[AIM_LINK_TITLE], AIM_LINK_TITLE_X, AIM_LINK_TITLE_Y, AIM_LINK_TITLE_WIDTH, AIM_LINK_TITLE_FONT, AIM_LINK_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_DWN)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
UINT32 gNextLaptopPage;
|
||||
|
||||
gNextLaptopPage = MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
GoToWebPage( gNextLaptopPage );
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __AIMLINKS_H
|
||||
#define __AIMLINKS_H
|
||||
|
||||
void GameInitAimLinks();
|
||||
BOOLEAN EnterAimLinks();
|
||||
void ExitAimLinks();
|
||||
void HandleAimLinks();
|
||||
void RenderAimLinks();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,45 @@
|
||||
#ifndef __AIMMEMBERS_H_
|
||||
#define __AIMMEMBERS_H_
|
||||
|
||||
void GameInitAIMMembers();
|
||||
BOOLEAN EnterAIMMembers();
|
||||
void ExitAIMMembers();
|
||||
void HandleAIMMembers();
|
||||
BOOLEAN RenderAIMMembers();
|
||||
|
||||
|
||||
BOOLEAN DrawNumeralsToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 usLocY, UINT32 ulFont, UINT8 ubColor);
|
||||
BOOLEAN DrawMoneyToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 usLocY, UINT32 ulFont, UINT8 ubColor);
|
||||
|
||||
void DisplayTextForMercFaceVideoPopUp(INT16 * pString);
|
||||
|
||||
BOOLEAN DisplayTalkingMercFaceForVideoPopUp(INT32 iFaceIndex);
|
||||
void EnterInitAimMembers();
|
||||
BOOLEAN RenderAIMMembersTopLevel();
|
||||
void ResetMercAnnoyanceAtPlayer( UINT8 ubMercID );
|
||||
BOOLEAN DisableNewMailMessage();
|
||||
void DisplayPopUpBoxExplainingMercArrivalLocationAndTime( );
|
||||
|
||||
|
||||
// which mode are we in during video conferencing?..0 means no video conference
|
||||
extern UINT8 gubVideoConferencingMode;
|
||||
|
||||
//TEMP!!!
|
||||
#ifdef JA2TESTVERSION
|
||||
void TempHiringOfMercs( UINT8 ubNumberOfMercs, BOOLEAN fReset );
|
||||
#endif
|
||||
|
||||
|
||||
#if defined ( JA2TESTVERSION )
|
||||
void DemoHiringOfMercs( );
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,891 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "AimPolicies.h"
|
||||
#include "aim.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
#define NUM_AIM_POLICY_PAGES 11
|
||||
#define NUM_AIM_POLICY_TOC_BUTTONS 9
|
||||
#define AIMPOLICYFILE "BINARYDATA\\AimPol.edt"
|
||||
#define AIM_POLICY_LINE_SIZE 80 * 5 * 2 // 80 columns of 5 lines that are wide chars, 800 bytes total
|
||||
|
||||
#define AIM_POLICY_TITLE_FONT FONT14ARIAL
|
||||
#define AIM_POLICY_TITLE_COLOR AIM_GREEN
|
||||
#define AIM_POLICY_TEXT_FONT FONT10ARIAL
|
||||
#define AIM_POLICY_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_POLICY_TOC_FONT FONT12ARIAL
|
||||
#define AIM_POLICY_TOC_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_POLICY_TOC_TITLE_FONT FONT12ARIAL
|
||||
#define AIM_POLICY_TOC_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_POLICY_SUBTITLE_FONT FONT12ARIAL
|
||||
#define AIM_POLICY_SUBTITLE_COLOR FONT_MCOLOR_WHITE
|
||||
#define AIM_POLICY_AGREE_TOC_COLOR_ON FONT_MCOLOR_WHITE
|
||||
#define AIM_POLICY_AGREE_TOC_COLOR_OFF FONT_MCOLOR_DKWHITE
|
||||
|
||||
#define AIM_POLICY_MENU_X LAPTOP_SCREEN_UL_X + 40
|
||||
#define AIM_POLICY_MENU_Y (SCREEN_HEIGHT - 480)/ 2 + 390 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
#define AIM_POLICY_MENU_BUTTON_AMOUNT 4
|
||||
#define AIM_POLICY_GAP_X 40 + BOTTOM_BUTTON_START_WIDTH
|
||||
|
||||
#define AIM_POLICY_TITLE_X IMAGE_OFFSET_X + 149
|
||||
#define AIM_POLICY_TITLE_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 11
|
||||
#define AIM_POLICY_TITLE_WIDTH AIM_SYMBOL_WIDTH
|
||||
|
||||
#define AIM_POLICY_TITLE_STATEMENT_WIDTH 300
|
||||
#define AIM_POLICY_TITLE_STATEMENT_X IMAGE_OFFSET_X + (500 - AIM_POLICY_TITLE_STATEMENT_WIDTH) / 2 +5//80
|
||||
#define AIM_POLICY_TITLE_STATEMENT_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 75
|
||||
|
||||
#define AIM_POLICY_SUBTITLE_NUMBER AIM_POLICY_TITLE_STATEMENT_X - 75
|
||||
#define AIM_POLICY_SUBTITLE_X AIM_POLICY_SUBTITLE_NUMBER + 20
|
||||
#define AIM_POLICY_SUBTITLE_Y iScreenHeightOffset + 115 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_POLICY_PARAGRAPH_NUMBER AIM_POLICY_SUBTITLE_X - 12
|
||||
#define AIM_POLICY_PARAGRAPH_X AIM_POLICY_PARAGRAPH_NUMBER + 23
|
||||
#define AIM_POLICY_PARAGRAPH_Y AIM_POLICY_SUBTITLE_Y + 20
|
||||
#define AIM_POLICY_PARAGRAPH_WIDTH 380
|
||||
#define AIM_POLICY_PARAGRAPH_GAP 6
|
||||
#define AIM_POLICY_SUBPARAGRAPH_NUMBER AIM_POLICY_PARAGRAPH_X
|
||||
#define AIM_POLICY_SUBPARAGRAPH_X AIM_POLICY_SUBPARAGRAPH_NUMBER + 25
|
||||
|
||||
#define AIM_POLICY_TOC_X iScreenWidthOffset + 259
|
||||
#define AIM_POLICY_TOC_Y AIM_POLICY_SUBTITLE_Y
|
||||
#define AIM_POLICY_TOC_GAP_Y 25
|
||||
#define AIM_POLICY_TOC_TEXT_OFFSET_X 5
|
||||
#define AIM_POLICY_TOC_TEXT_OFFSET_Y 5
|
||||
|
||||
|
||||
#define AIM_POLICY_AGREEMENT_X IMAGE_OFFSET_X + 150
|
||||
#define AIM_POLICY_AGREEMENT_Y iScreenHeightOffset + 350 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_POLICY_DISAGREEMENT_X AIM_POLICY_AGREEMENT_X + 125
|
||||
#define AIM_POLICY_DISAGREEMENT_Y AIM_POLICY_AGREEMENT_Y
|
||||
|
||||
#define AIM_POLICY_TOC_PAGE 1
|
||||
#define AIM_POLICY_LAST_PAGE 10
|
||||
|
||||
#define AIM_POLICY_AGREE_PAGE 0
|
||||
|
||||
// These enums represent which paragraph they are located in the AimPol.edt file
|
||||
enum
|
||||
{
|
||||
AIM_STATEMENT_OF_POLICY,
|
||||
AIM_STATEMENT_OF_POLICY_1,
|
||||
AIM_STATEMENT_OF_POLICY_2,
|
||||
|
||||
DEFINITIONS,
|
||||
DEFINITIONS_1,
|
||||
DEFINITIONS_2,
|
||||
DEFINITIONS_3,
|
||||
DEFINITIONS_4,
|
||||
|
||||
LENGTH_OF_ENGAGEMENT,
|
||||
LENGTH_OF_ENGAGEMENT_1,
|
||||
LENGTH_OF_ENGAGEMENT_1_1,
|
||||
LENGTH_OF_ENGAGEMENT_1_2,
|
||||
LENGTH_OF_ENGAGEMENT_1_3,
|
||||
LENGTH_OF_ENGAGEMENT_2,
|
||||
|
||||
LOCATION_0F_ENGAGEMENT,
|
||||
LOCATION_0F_ENGAGEMENT_1,
|
||||
LOCATION_0F_ENGAGEMENT_2,
|
||||
LOCATION_0F_ENGAGEMENT_2_1,
|
||||
LOCATION_0F_ENGAGEMENT_2_2,
|
||||
LOCATION_0F_ENGAGEMENT_2_3,
|
||||
LOCATION_0F_ENGAGEMENT_2_4,
|
||||
LOCATION_0F_ENGAGEMENT_3,
|
||||
|
||||
CONTRACT_EXTENSIONS,
|
||||
CONTRACT_EXTENSIONS_1,
|
||||
CONTRACT_EXTENSIONS_2,
|
||||
CONTRACT_EXTENSIONS_3,
|
||||
|
||||
TERMS_OF_PAYMENT,
|
||||
TERMS_OF_PAYMENT_1,
|
||||
|
||||
TERMS_OF_ENGAGEMENT,
|
||||
TERMS_OF_ENGAGEMENT_1,
|
||||
TERMS_OF_ENGAGEMENT_2A,
|
||||
TERMS_OF_ENGAGEMENT_2B,
|
||||
|
||||
ENGAGEMENT_TERMINATION,
|
||||
ENGAGEMENT_TERMINATION_1,
|
||||
ENGAGEMENT_TERMINATION_1_1,
|
||||
ENGAGEMENT_TERMINATION_1_2,
|
||||
ENGAGEMENT_TERMINATION_1_3,
|
||||
|
||||
EQUIPMENT_AND_INVENTORY,
|
||||
EQUIPMENT_AND_INVENTORY_1,
|
||||
EQUIPMENT_AND_INVENTORY_2,
|
||||
|
||||
POLICY_MEDICAL,
|
||||
POLICY_MEDICAL_1,
|
||||
POLICY_MEDICAL_2,
|
||||
POLICY_MEDICAL_3A,
|
||||
POLICY_MEDICAL_3B,
|
||||
POLICY_MEDICAL_4,
|
||||
|
||||
NUM_AIM_POLICY_LOCATIONS
|
||||
|
||||
}AimPolicyTextLocatoins;
|
||||
|
||||
|
||||
//Toc menu mouse regions
|
||||
MOUSE_REGION gSelectedPolicyTocMenuRegion[ NUM_AIM_POLICY_TOC_BUTTONS ];
|
||||
void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Agree/Disagree menu Buttons regions
|
||||
void BtnPoliciesAgreeButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiPoliciesAgreeButton[ 2 ];
|
||||
INT32 guiPoliciesButtonImage;
|
||||
|
||||
//Bottom Menu Buttons
|
||||
void BtnPoliciesMenuButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiPoliciesMenuButton[ AIM_POLICY_MENU_BUTTON_AMOUNT ];
|
||||
INT32 guiPoliciesMenuButtonImage;
|
||||
|
||||
|
||||
|
||||
|
||||
UINT32 guiBottomButton;
|
||||
UINT32 guiBottomButton2;
|
||||
UINT8 gubCurPageNum;
|
||||
BOOLEAN gfInPolicyToc = FALSE;
|
||||
BOOLEAN gfInAgreementPage = FALSE;
|
||||
BOOLEAN gfAimPolicyMenuBarLoaded = FALSE;
|
||||
UINT32 guiContentButton;
|
||||
BOOLEAN gfExitingPolicesAgreeButton;
|
||||
UINT8 gubPoliciesAgreeButtonDown;
|
||||
UINT8 gubAimPolicyMenuButtonDown=255;
|
||||
BOOLEAN gfExitingAimPolicy;
|
||||
BOOLEAN AimPoliciesSubPagesVisitedFlag[NUM_AIM_POLICY_PAGES];
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN InitAimPolicyMenuBar(void);
|
||||
BOOLEAN ExitAimPolicyMenuBar(void);
|
||||
BOOLEAN InitAimPolicyTocMenu(void);
|
||||
BOOLEAN ExitAimPolicyTocMenu(void);
|
||||
BOOLEAN DrawAimPolicyMenu();
|
||||
BOOLEAN DisplayAimPolicyStatement(void);
|
||||
BOOLEAN DisplayAimPolicyTitleText(void);
|
||||
BOOLEAN InitAgreementRegion(void);
|
||||
BOOLEAN ExitAgreementButton(void);
|
||||
void DisableAimPolicyButton();
|
||||
void ResetAimPolicyButtons();
|
||||
void ChangingAimPoliciesSubPage( UINT8 ubSubPageNumber );
|
||||
|
||||
|
||||
|
||||
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
||||
UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
||||
UINT16 DisplayAimPolicySubParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
||||
|
||||
|
||||
|
||||
void GameInitAimPolicies()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EnterInitAimPolicies()
|
||||
{
|
||||
memset( &AimPoliciesSubPagesVisitedFlag, 0, NUM_AIM_POLICY_PAGES);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN EnterAimPolicies()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
InitAimDefaults();
|
||||
|
||||
gubCurPageNum = (UINT8) giCurrentSubPage;
|
||||
|
||||
gfAimPolicyMenuBarLoaded = FALSE;
|
||||
gfExitingAimPolicy = FALSE;
|
||||
|
||||
gubPoliciesAgreeButtonDown = 255;
|
||||
gubAimPolicyMenuButtonDown = 255;
|
||||
|
||||
if( gubCurPageNum != 0)
|
||||
InitAimPolicyMenuBar();
|
||||
|
||||
gfInPolicyToc = FALSE;
|
||||
|
||||
// load the Bottom Buttons graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BottomButton.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomButton));
|
||||
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BottomButton2.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomButton2));
|
||||
|
||||
// load the Content Buttons graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\ContentButton.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiContentButton));
|
||||
|
||||
RenderAimPolicies();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitAimPolicies()
|
||||
{
|
||||
gfExitingAimPolicy = TRUE;
|
||||
|
||||
DeleteVideoObjectFromIndex(guiBottomButton);
|
||||
DeleteVideoObjectFromIndex(guiBottomButton2);
|
||||
DeleteVideoObjectFromIndex(guiContentButton);
|
||||
|
||||
if( gfAimPolicyMenuBarLoaded )
|
||||
ExitAimPolicyMenuBar();
|
||||
|
||||
if(gfInPolicyToc)
|
||||
ExitAimPolicyTocMenu();
|
||||
|
||||
if( gfInAgreementPage )
|
||||
ExitAgreementButton();
|
||||
RemoveAimDefaults();
|
||||
|
||||
giCurrentSubPage = gubCurPageNum;
|
||||
|
||||
}
|
||||
|
||||
void HandleAimPolicies()
|
||||
{
|
||||
if( (gfAimPolicyMenuBarLoaded != TRUE) && gubCurPageNum != 0)
|
||||
{
|
||||
InitAimPolicyMenuBar();
|
||||
// RenderAimPolicies();
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RenderAimPolicies()
|
||||
{
|
||||
UINT16 usNumPixles;
|
||||
|
||||
DrawAimDefaults();
|
||||
|
||||
DisplayAimPolicyTitleText();
|
||||
|
||||
if( gfInAgreementPage )
|
||||
ExitAgreementButton();
|
||||
|
||||
switch( gubCurPageNum )
|
||||
{
|
||||
case 0:
|
||||
DisplayAimPolicyStatement();
|
||||
InitAgreementRegion();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
InitAimPolicyTocMenu();
|
||||
InitAimPolicyMenuBar();
|
||||
DisableAimPolicyButton();
|
||||
DrawAimPolicyMenu();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
//Display the Definitions title
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, DEFINITIONS, (FLOAT)1.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, DEFINITIONS_1, (FLOAT)1.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, DEFINITIONS_2, (FLOAT)1.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, DEFINITIONS_3, (FLOAT)1.3) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, DEFINITIONS_4, (FLOAT)1.4);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, LENGTH_OF_ENGAGEMENT, (FLOAT)2.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, LENGTH_OF_ENGAGEMENT_1, (FLOAT)2.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LENGTH_OF_ENGAGEMENT_1_1, (FLOAT)2.11) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LENGTH_OF_ENGAGEMENT_1_2, (FLOAT)2.12) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LENGTH_OF_ENGAGEMENT_1_3, (FLOAT)2.13) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, LENGTH_OF_ENGAGEMENT_2, (FLOAT)2.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, LOCATION_0F_ENGAGEMENT, (FLOAT)3.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_1, (FLOAT)3.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_2, (FLOAT)3.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_2_1, (FLOAT)3.21) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_2_2, (FLOAT)3.22) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_2_3, (FLOAT)3.23) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
// usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_2_4, (FLOAT)3.24) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_2_4, (FLOAT)3.3) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, LOCATION_0F_ENGAGEMENT_3, (FLOAT)3.4) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, CONTRACT_EXTENSIONS, (FLOAT)4.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, CONTRACT_EXTENSIONS_1, (FLOAT)4.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, CONTRACT_EXTENSIONS_2, (FLOAT)4.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, CONTRACT_EXTENSIONS_3, (FLOAT)4.3) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, TERMS_OF_PAYMENT, (FLOAT)5.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, TERMS_OF_PAYMENT_1, (FLOAT)5.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, TERMS_OF_ENGAGEMENT, (FLOAT)6.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, TERMS_OF_ENGAGEMENT_1, (FLOAT)6.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, TERMS_OF_ENGAGEMENT_2A, (FLOAT)6.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, TERMS_OF_ENGAGEMENT_2B, (FLOAT)0.0) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, ENGAGEMENT_TERMINATION, (FLOAT)7.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, ENGAGEMENT_TERMINATION_1, (FLOAT)7.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, ENGAGEMENT_TERMINATION_1_1, (FLOAT)7.11) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, ENGAGEMENT_TERMINATION_1_2, (FLOAT)7.12) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicySubParagraph(usNumPixles, ENGAGEMENT_TERMINATION_1_3, (FLOAT)7.13) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, EQUIPMENT_AND_INVENTORY, (FLOAT)8.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, EQUIPMENT_AND_INVENTORY_1, (FLOAT)8.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, EQUIPMENT_AND_INVENTORY_2, (FLOAT)8.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
DisableAimPolicyButton();
|
||||
|
||||
DisplayAimPolicyTitle(AIM_POLICY_SUBTITLE_Y, POLICY_MEDICAL, (FLOAT)9.0);
|
||||
usNumPixles = AIM_POLICY_PARAGRAPH_Y;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, POLICY_MEDICAL_1, (FLOAT)9.1) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, POLICY_MEDICAL_2, (FLOAT)9.2) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, POLICY_MEDICAL_3A, (FLOAT)9.3) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, POLICY_MEDICAL_3B, (FLOAT)0.0) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
usNumPixles += DisplayAimPolicyParagraph(usNumPixles, POLICY_MEDICAL_4, (FLOAT)9.4) + AIM_POLICY_PARAGRAPH_GAP;
|
||||
break;
|
||||
}
|
||||
|
||||
MarkButtonsDirty( );
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN InitAimPolicyMenuBar(void)
|
||||
{
|
||||
UINT16 i, usPosX;
|
||||
|
||||
if(gfAimPolicyMenuBarLoaded)
|
||||
return(TRUE);
|
||||
|
||||
//Load graphic for buttons
|
||||
guiPoliciesMenuButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||
|
||||
usPosX = AIM_POLICY_MENU_X;
|
||||
for(i=0; i<AIM_POLICY_MENU_BUTTON_AMOUNT; i++)
|
||||
{
|
||||
|
||||
// guiPoliciesMenuButton[i] = QuickCreateButton(guiPoliciesMenuButtonImage, usPosX, AIM_POLICY_MENU_Y,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
// DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnPoliciesMenuButtonCallback);
|
||||
// SetButtonCursor(guiPoliciesMenuButton[i], CURSOR_WWW);
|
||||
// MSYS_SetBtnUserData( guiPoliciesMenuButton[i], 0, i);
|
||||
|
||||
guiPoliciesMenuButton[i] = CreateIconAndTextButton( guiPoliciesMenuButtonImage, AimPolicyText[i], FONT10ARIAL,
|
||||
AIM_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||
AIM_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
usPosX, AIM_POLICY_MENU_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnPoliciesMenuButtonCallback);
|
||||
SetButtonCursor(guiPoliciesMenuButton[i], CURSOR_WWW);
|
||||
MSYS_SetBtnUserData( guiPoliciesMenuButton[i], 0, i);
|
||||
|
||||
|
||||
|
||||
usPosX += AIM_POLICY_GAP_X;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
gfAimPolicyMenuBarLoaded = TRUE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN ExitAimPolicyMenuBar(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if( !gfAimPolicyMenuBarLoaded )
|
||||
return( FALSE );
|
||||
|
||||
for(i=0; i<AIM_POLICY_MENU_BUTTON_AMOUNT; i++)
|
||||
RemoveButton( guiPoliciesMenuButton[i]);
|
||||
|
||||
UnloadButtonImage( guiPoliciesMenuButtonImage );
|
||||
|
||||
gfAimPolicyMenuBarLoaded = FALSE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN DrawAimPolicyMenu()
|
||||
{
|
||||
UINT16 i, usPosY;
|
||||
UINT16 usHeight;
|
||||
UINT32 uiStartLoc=0;
|
||||
wchar_t sText[400];
|
||||
HVOBJECT hContentButtonHandle;
|
||||
UINT8 ubLocInFile[]=
|
||||
{ DEFINITIONS,
|
||||
LENGTH_OF_ENGAGEMENT,
|
||||
LOCATION_0F_ENGAGEMENT,
|
||||
CONTRACT_EXTENSIONS,
|
||||
TERMS_OF_PAYMENT,
|
||||
TERMS_OF_ENGAGEMENT,
|
||||
ENGAGEMENT_TERMINATION,
|
||||
EQUIPMENT_AND_INVENTORY,
|
||||
POLICY_MEDICAL};
|
||||
|
||||
GetVideoObject(&hContentButtonHandle, guiContentButton);
|
||||
|
||||
usHeight = GetFontHeight(AIM_POLICY_TOC_FONT);
|
||||
usPosY = AIM_POLICY_TOC_Y;
|
||||
for(i=0; i<NUM_AIM_POLICY_TOC_BUTTONS; i++)
|
||||
{
|
||||
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_POLICY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * ubLocInFile[i];
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||
DrawTextToScreen(sText, AIM_POLICY_TOC_X + AIM_POLICY_TOC_TEXT_OFFSET_X, (UINT16)(usPosY + AIM_POLICY_TOC_TEXT_OFFSET_Y), AIM_CONTENTBUTTON_WIDTH, AIM_POLICY_TOC_FONT, AIM_POLICY_TOC_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
usPosY += AIM_POLICY_TOC_GAP_Y;
|
||||
}
|
||||
gfInPolicyToc = TRUE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN InitAimPolicyTocMenu(void)
|
||||
{
|
||||
UINT16 i, usPosY;
|
||||
UINT16 usHeight;
|
||||
UINT32 uiStartLoc=0;
|
||||
|
||||
if(gfInPolicyToc)
|
||||
return(TRUE);
|
||||
|
||||
usHeight = GetFontHeight(AIM_POLICY_TOC_FONT);
|
||||
usPosY = AIM_POLICY_TOC_Y;
|
||||
for(i=0; i<NUM_AIM_POLICY_TOC_BUTTONS; i++)
|
||||
{
|
||||
//Mouse region for the toc buttons
|
||||
MSYS_DefineRegion( &gSelectedPolicyTocMenuRegion[i], AIM_POLICY_TOC_X, usPosY, (UINT16)(AIM_POLICY_TOC_X + AIM_CONTENTBUTTON_WIDTH), (UINT16)(usPosY + AIM_CONTENTBUTTON_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectPolicyTocMenuRegionCallBack);
|
||||
MSYS_AddRegion(&gSelectedPolicyTocMenuRegion[i]);
|
||||
MSYS_SetRegionUserData( &gSelectedPolicyTocMenuRegion[i], 0, i+2);
|
||||
|
||||
usPosY += AIM_POLICY_TOC_GAP_Y;
|
||||
}
|
||||
gfInPolicyToc = TRUE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN ExitAimPolicyTocMenu()
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
gfInPolicyToc = FALSE;
|
||||
for(i=0; i<NUM_AIM_POLICY_TOC_BUTTONS; i++)
|
||||
MSYS_RemoveRegion( &gSelectedPolicyTocMenuRegion[i]);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if(gfInPolicyToc)
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gubCurPageNum = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
ChangingAimPoliciesSubPage( gubCurPageNum );
|
||||
|
||||
ExitAimPolicyTocMenu();
|
||||
ResetAimPolicyButtons();
|
||||
DisableAimPolicyButton();
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DisplayAimPolicyTitleText(void)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
|
||||
//Load anfd display title
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY;
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
|
||||
|
||||
if(gubCurPageNum == 0)
|
||||
DrawTextToScreen(sText, AIM_POLICY_TITLE_X, AIM_POLICY_TITLE_STATEMENT_Y-25, AIM_POLICY_TITLE_WIDTH, AIM_POLICY_TITLE_FONT, AIM_POLICY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
else
|
||||
DrawTextToScreen(sText, AIM_POLICY_TITLE_X, AIM_POLICY_TITLE_Y, AIM_POLICY_TITLE_WIDTH, AIM_POLICY_TITLE_FONT, AIM_POLICY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DisplayAimPolicyStatement(void)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
UINT16 usNumPixels;
|
||||
|
||||
//load and display the statment of policies
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY_1;
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
|
||||
usNumPixels = DisplayWrappedString(AIM_POLICY_TITLE_STATEMENT_X, AIM_POLICY_TITLE_STATEMENT_Y, AIM_POLICY_TITLE_STATEMENT_WIDTH, 2, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//load and display the statment of policies
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY_2;
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
|
||||
DisplayWrappedString(AIM_POLICY_TITLE_STATEMENT_X, (UINT16)(AIM_POLICY_TITLE_STATEMENT_Y + usNumPixels+15), AIM_POLICY_TITLE_STATEMENT_WIDTH, 2, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN InitAgreementRegion(void)
|
||||
{
|
||||
UINT16 usPosX,i;
|
||||
|
||||
gfExitingPolicesAgreeButton = FALSE;
|
||||
|
||||
//Load graphic for buttons
|
||||
guiPoliciesButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||
|
||||
usPosX = AIM_POLICY_AGREEMENT_X;
|
||||
for(i=0; i < 2; i++)
|
||||
{
|
||||
// guiPoliciesAgreeButton[i] = QuickCreateButton(guiPoliciesButtonImage, usPosX, AIM_POLICY_AGREEMENT_Y,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
// BUTTON_NO_CALLBACK, (GUI_CALLBACK)BtnPoliciesAgreeButtonCallback);
|
||||
// SetButtonCursor(guiPoliciesAgreeButton[i], CURSOR_WWW);
|
||||
// MSYS_SetBtnUserData( guiPoliciesAgreeButton[i], 0, i);
|
||||
|
||||
guiPoliciesAgreeButton[i] = CreateIconAndTextButton( guiPoliciesButtonImage, AimPolicyText[i+AIM_POLICIES_DISAGREE], AIM_POLICY_TOC_FONT,
|
||||
AIM_POLICY_AGREE_TOC_COLOR_ON, DEFAULT_SHADOW,
|
||||
AIM_POLICY_AGREE_TOC_COLOR_OFF, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
usPosX, AIM_POLICY_AGREEMENT_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnPoliciesAgreeButtonCallback);
|
||||
SetButtonCursor(guiPoliciesAgreeButton[i], CURSOR_WWW);
|
||||
MSYS_SetBtnUserData( guiPoliciesAgreeButton[i], 0, i);
|
||||
|
||||
|
||||
|
||||
usPosX += 125;
|
||||
}
|
||||
gfInAgreementPage = TRUE;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN ExitAgreementButton(void)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
gfExitingPolicesAgreeButton = TRUE;
|
||||
|
||||
UnloadButtonImage( guiPoliciesButtonImage);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
RemoveButton( guiPoliciesAgreeButton[ i ]);
|
||||
|
||||
gfInAgreementPage = FALSE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
UINT32 uiStartLoc = 0;
|
||||
|
||||
//Load and display title
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
|
||||
DrawTextToScreen(sText, AIM_POLICY_SUBTITLE_NUMBER, usPosY, 0, AIM_POLICY_SUBTITLE_FONT, AIM_POLICY_SUBTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
wchar_t sTemp[20];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usNumPixels;
|
||||
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
|
||||
|
||||
if(fNumber != 0.0)
|
||||
{
|
||||
//Display the section number
|
||||
swprintf(sTemp, L"%2.1f", fNumber);
|
||||
DrawTextToScreen(sTemp, AIM_POLICY_PARAGRAPH_NUMBER, usPosY, 0, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
|
||||
//Display the text beside the section number
|
||||
usNumPixels = DisplayWrappedString(AIM_POLICY_PARAGRAPH_X, usPosY, AIM_POLICY_PARAGRAPH_WIDTH, 2, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
return(usNumPixels);
|
||||
}
|
||||
|
||||
UINT16 DisplayAimPolicySubParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||
{
|
||||
wchar_t sText[400];
|
||||
wchar_t sTemp[20];
|
||||
UINT32 uiStartLoc=0;
|
||||
UINT16 usNumPixels;
|
||||
|
||||
uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
|
||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
|
||||
|
||||
//Display the section number
|
||||
swprintf(sTemp, L"%2.2f", fNumber);
|
||||
DrawTextToScreen(sTemp, AIM_POLICY_SUBPARAGRAPH_NUMBER, usPosY, 0, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//Display the text beside the section number
|
||||
usNumPixels = DisplayWrappedString(AIM_POLICY_SUBPARAGRAPH_X, usPosY, AIM_POLICY_PARAGRAPH_WIDTH, 2, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
return(usNumPixels);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void BtnPoliciesAgreeButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
UINT8 ubRetValue;
|
||||
static BOOLEAN fOnPage=TRUE;
|
||||
if(fOnPage)
|
||||
{
|
||||
ubRetValue = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
gubPoliciesAgreeButtonDown = ubRetValue;
|
||||
}
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
//Agree
|
||||
fOnPage = FALSE;
|
||||
if(ubRetValue == 1)
|
||||
{
|
||||
gubCurPageNum++;
|
||||
ChangingAimPoliciesSubPage( gubCurPageNum );
|
||||
}
|
||||
|
||||
//Disagree
|
||||
else
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
|
||||
}
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
fOnPage = TRUE;
|
||||
gubPoliciesAgreeButtonDown = 255;
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
gubPoliciesAgreeButtonDown = 255;
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnPoliciesMenuButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
UINT8 ubRetValue;
|
||||
static BOOLEAN fOnPage=TRUE;
|
||||
if(fOnPage)
|
||||
{
|
||||
ubRetValue = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
gubAimPolicyMenuButtonDown = ubRetValue;
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
gubAimPolicyMenuButtonDown = 255;
|
||||
//If previous Page
|
||||
if( ubRetValue == 0 )
|
||||
{
|
||||
if( gubCurPageNum > 1)
|
||||
{
|
||||
gubCurPageNum--;
|
||||
ChangingAimPoliciesSubPage( gubCurPageNum );
|
||||
}
|
||||
}
|
||||
|
||||
// Home Page
|
||||
else if( ubRetValue == 1 )
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
|
||||
}
|
||||
|
||||
//Company policies index
|
||||
else if( ubRetValue == 2 )
|
||||
{
|
||||
if( gubCurPageNum != 1 )
|
||||
{
|
||||
gubCurPageNum=1;
|
||||
ChangingAimPoliciesSubPage( gubCurPageNum );
|
||||
}
|
||||
}
|
||||
|
||||
//Next Page
|
||||
else if( ubRetValue == 3 )
|
||||
{
|
||||
if( gubCurPageNum < NUM_AIM_POLICY_PAGES-1 )
|
||||
{
|
||||
gubCurPageNum++;
|
||||
ChangingAimPoliciesSubPage( gubCurPageNum );
|
||||
|
||||
fOnPage = FALSE;
|
||||
if(gfInPolicyToc)
|
||||
{
|
||||
ExitAimPolicyTocMenu();
|
||||
}
|
||||
fOnPage = TRUE;
|
||||
}
|
||||
}
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
ResetAimPolicyButtons();
|
||||
DisableAimPolicyButton();
|
||||
fOnPage = TRUE;
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
gubAimPolicyMenuButtonDown = 255;
|
||||
DisableAimPolicyButton();
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ResetAimPolicyButtons()
|
||||
{
|
||||
int i=0;
|
||||
|
||||
for(i=0; i<AIM_POLICY_MENU_BUTTON_AMOUNT; i++)
|
||||
{
|
||||
ButtonList[ guiPoliciesMenuButton[i] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DisableAimPolicyButton()
|
||||
{
|
||||
if( gfExitingAimPolicy == TRUE || gfAimPolicyMenuBarLoaded == FALSE )
|
||||
return;
|
||||
|
||||
if( (gubCurPageNum == AIM_POLICY_TOC_PAGE ) )
|
||||
{
|
||||
ButtonList[ guiPoliciesMenuButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
ButtonList[ guiPoliciesMenuButton[ 2 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
else if( ( gubCurPageNum == AIM_POLICY_LAST_PAGE ) )
|
||||
{
|
||||
ButtonList[ guiPoliciesMenuButton[ 3 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChangingAimPoliciesSubPage( UINT8 ubSubPageNumber )
|
||||
{
|
||||
fLoadPendingFlag = TRUE;
|
||||
|
||||
if( AimPoliciesSubPagesVisitedFlag[ ubSubPageNumber ] == FALSE )
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = FALSE;
|
||||
|
||||
AimPoliciesSubPagesVisitedFlag[ ubSubPageNumber ] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef __AIMPOLICIES_H
|
||||
#define __AIMPOLICIES_H
|
||||
|
||||
void GameInitAimPolicies();
|
||||
BOOLEAN EnterAimPolicies();
|
||||
void ExitAimPolicies();
|
||||
void HandleAimPolicies();
|
||||
void RenderAimPolicies();
|
||||
void EnterInitAimPolicies();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,751 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "AimSort.h"
|
||||
#include "Aim.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Soldier Profile.h"
|
||||
#include "stdlib.h"
|
||||
#include "Game Clock.h"
|
||||
#include "Text.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#endif
|
||||
|
||||
//#define
|
||||
|
||||
#define AIM_SORT_FONT_TITLE FONT14ARIAL
|
||||
#define AIM_SORT_FONT_SORT_TEXT FONT10ARIAL
|
||||
|
||||
#define AIM_SORT_COLOR_SORT_TEXT AIM_FONT_MCOLOR_WHITE
|
||||
#define AIM_SORT_SORT_BY_COLOR 146
|
||||
#define AIM_SORT_LINK_TEXT_COLOR 146
|
||||
|
||||
#define AIM_SORT_GAP_BN_ICONS 60
|
||||
#define AIM_SORT_CHECKBOX_SIZE 10
|
||||
#define AIM_SORT_ON 0
|
||||
#define AIM_SORT_OFF 1
|
||||
|
||||
#define AIM_SORT_TO_MUGSHOTS_X IMAGE_OFFSET_X + 89
|
||||
#define AIM_SORT_TO_MUGSHOTS_Y IMAGE_OFFSET_Y + 184
|
||||
#define AIM_SORT_TO_MUGSHOTS_SIZE 54
|
||||
|
||||
#define AIM_SORT_TO_STATS_X AIM_SORT_TO_MUGSHOTS_X
|
||||
#define AIM_SORT_TO_STATS_Y AIM_SORT_TO_MUGSHOTS_Y + AIM_SORT_GAP_BN_ICONS
|
||||
#define AIM_SORT_TO_STATS_SIZE AIM_SORT_TO_MUGSHOTS_SIZE
|
||||
|
||||
#define AIM_SORT_TO_ALUMNI_X AIM_SORT_TO_MUGSHOTS_X
|
||||
#define AIM_SORT_TO_ALUMNI_Y AIM_SORT_TO_STATS_Y + AIM_SORT_GAP_BN_ICONS
|
||||
#define AIM_SORT_TO_ALUMNI_SIZE AIM_SORT_TO_MUGSHOTS_SIZE
|
||||
|
||||
#define AIM_SORT_AIM_MEMBER_X AIM_SORT_SORT_BY_X
|
||||
#define AIM_SORT_AIM_MEMBER_Y iScreenHeightOffset + 105 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
#define AIM_SORT_AIM_MEMBER_WIDTH AIM_SORT_SORT_BY_WIDTH
|
||||
|
||||
#define AIM_SORT_SORT_BY_TEXT_X AIM_SORT_SORT_BY_X + 9
|
||||
#define AIM_SORT_SORT_BY_TEXT_Y AIM_SORT_SORT_BY_Y + 8
|
||||
|
||||
#define AIM_SORT_PRICE_TEXT_X AIM_SORT_SORT_BY_X + 22
|
||||
#define AIM_SORT_PRICE_TEXT_Y AIM_SORT_SORT_BY_Y + 36
|
||||
|
||||
#define AIM_SORT_EXP_TEXT_X AIM_SORT_PRICE_TEXT_X
|
||||
#define AIM_SORT_EXP_TEXT_Y AIM_SORT_PRICE_TEXT_Y + 13
|
||||
|
||||
#define AIM_SORT_MARKMNSHP_TEXT_X AIM_SORT_PRICE_TEXT_X
|
||||
#define AIM_SORT_MARKMNSHP_TEXT_Y AIM_SORT_EXP_TEXT_Y + 13
|
||||
|
||||
#define AIM_SORT_MEDICAL_X AIM_SORT_SORT_BY_X + 125
|
||||
#define AIM_SORT_MEDICAL_Y AIM_SORT_PRICE_TEXT_Y
|
||||
|
||||
#define AIM_SORT_EXPLOSIVES_X AIM_SORT_MEDICAL_X
|
||||
#define AIM_SORT_EXPLOSIVES_Y AIM_SORT_EXP_TEXT_Y
|
||||
|
||||
#define AIM_SORT_MECHANICAL_X AIM_SORT_MEDICAL_X
|
||||
#define AIM_SORT_MECHANICAL_Y AIM_SORT_MARKMNSHP_TEXT_Y
|
||||
|
||||
#define AIM_SORT_ASC_DESC_WIDTH 100
|
||||
#define AIM_SORT_ASCEND_TEXT_X AIM_SORT_SORT_BY_X + 154 - AIM_SORT_ASC_DESC_WIDTH - 4 + 18
|
||||
#define AIM_SORT_ASCEND_TEXT_Y iScreenHeightOffset + 128 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_SORT_DESCEND_TEXT_X AIM_SORT_ASCEND_TEXT_X
|
||||
#define AIM_SORT_DESCEND_TEXT_Y iScreenHeightOffset + 141 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
|
||||
#define AIM_SORT_MUGSHOT_TEXT_X iScreenWidthOffset + 266
|
||||
#define AIM_SORT_MUGSHOT_TEXT_Y iScreenHeightOffset + 230 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_SORT_MERC_STATS_TEXT_X AIM_SORT_MUGSHOT_TEXT_X
|
||||
#define AIM_SORT_MERC_STATS_TEXT_Y iScreenHeightOffset + 293 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_SORT_ALUMNI_TEXT_X AIM_SORT_MUGSHOT_TEXT_X
|
||||
#define AIM_SORT_ALUMNI_TEXT_Y iScreenHeightOffset + 351 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||
|
||||
#define AIM_SORT_FIRST_SORT_CLOUMN_GAP 22
|
||||
|
||||
|
||||
#define AIM_SORT_SORT_BY_X IMAGE_OFFSET_X + 155
|
||||
#define AIM_SORT_SORT_BY_Y IMAGE_OFFSET_Y + 96
|
||||
#define AIM_SORT_SORT_BY_WIDTH 190
|
||||
#define AIM_SORT_SORT_BY_HEIGHT 81
|
||||
|
||||
UINT16 AimSortCheckBoxLoc[]={
|
||||
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 34),
|
||||
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 47),
|
||||
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 60),
|
||||
(AIM_SORT_SORT_BY_X + 111), (AIM_SORT_SORT_BY_Y + 34),
|
||||
(AIM_SORT_SORT_BY_X + 111), (AIM_SORT_SORT_BY_Y + 47),
|
||||
(AIM_SORT_SORT_BY_X + 111), (AIM_SORT_SORT_BY_Y + 60),
|
||||
(AIM_SORT_SORT_BY_X + 172), (AIM_SORT_SORT_BY_Y + 4),
|
||||
(AIM_SORT_SORT_BY_X + 172), (AIM_SORT_SORT_BY_Y + 17)};
|
||||
|
||||
UINT8 gubCurrentSortMode;
|
||||
UINT8 gubOldSortMode;
|
||||
UINT8 gubCurrentListMode;
|
||||
UINT8 gubOldListMode;
|
||||
|
||||
// Mouse stuff
|
||||
//Clicking on To Mugshot
|
||||
MOUSE_REGION gSelectedToMugShotRegion;
|
||||
void SelectToMugShotRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Clicking on ToStats
|
||||
MOUSE_REGION gSelectedToStatsRegion;
|
||||
void SelectToStatsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Clicking on ToStats
|
||||
MOUSE_REGION gSelectedToArchiveRegion;
|
||||
void SelectToArchiveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Clicking on Price Check Box
|
||||
MOUSE_REGION gSelectedPriceBoxRegion;
|
||||
void SelectPriceBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Explosive Check Box
|
||||
MOUSE_REGION gSelectedExpBoxRegion;
|
||||
void SelectExpBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Markmanship Check Box
|
||||
MOUSE_REGION gSelectedMarkBoxRegion;
|
||||
void SelectMarkBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Medical Check box
|
||||
MOUSE_REGION gSelectedMedicalBoxRegion;
|
||||
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Explosive Check Box
|
||||
MOUSE_REGION gSelectedExplosiveBoxRegion;
|
||||
void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Mechanical Check Box
|
||||
MOUSE_REGION gSelectedMechanicalBoxRegion;
|
||||
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Ascending Check Box
|
||||
MOUSE_REGION gSelectedAscendBoxRegion;
|
||||
void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
//Clicking on Descending Check Box
|
||||
MOUSE_REGION gSelectedDescendBoxRegion;
|
||||
void SelectDescendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
|
||||
void DrawSelectLight(UINT8 ubMode, UINT8 ubImage);
|
||||
INT32 QsortCompare( const void *pNum1, const void *pNum2);
|
||||
INT32 CompareValue(const INT32 Num1, const INT32 Num2);
|
||||
BOOLEAN SortMercArray(void);
|
||||
|
||||
|
||||
UINT32 guiSortByBox;
|
||||
UINT32 guiToAlumni;
|
||||
UINT32 guiToMugShots;
|
||||
UINT32 guiToStats;
|
||||
UINT32 guiSelectLight;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void GameInitAimSort()
|
||||
{
|
||||
gubCurrentSortMode=0;
|
||||
gubOldSortMode=0;
|
||||
gubCurrentListMode=AIM_DESCEND;
|
||||
gubOldListMode=AIM_DESCEND;
|
||||
}
|
||||
|
||||
BOOLEAN EnterAimSort()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 ubCurNumber=0;
|
||||
UINT16 ubWidth;
|
||||
UINT8 i;
|
||||
|
||||
AimSortCheckBoxLoc[0] = AIM_SORT_SORT_BY_X + 9;
|
||||
AimSortCheckBoxLoc[1] = AIM_SORT_SORT_BY_Y + 34;
|
||||
AimSortCheckBoxLoc[2] = AIM_SORT_SORT_BY_X + 9;
|
||||
AimSortCheckBoxLoc[3] = AIM_SORT_SORT_BY_Y + 47;
|
||||
AimSortCheckBoxLoc[4] = AIM_SORT_SORT_BY_X + 9;
|
||||
AimSortCheckBoxLoc[5] = AIM_SORT_SORT_BY_Y + 60;
|
||||
AimSortCheckBoxLoc[6] = AIM_SORT_SORT_BY_X + 111;
|
||||
AimSortCheckBoxLoc[7] = AIM_SORT_SORT_BY_Y + 34;
|
||||
AimSortCheckBoxLoc[8] = AIM_SORT_SORT_BY_X + 111;
|
||||
AimSortCheckBoxLoc[9] = AIM_SORT_SORT_BY_Y + 47;
|
||||
AimSortCheckBoxLoc[10] = AIM_SORT_SORT_BY_X + 111;
|
||||
AimSortCheckBoxLoc[11] = AIM_SORT_SORT_BY_Y + 60;
|
||||
AimSortCheckBoxLoc[12] = AIM_SORT_SORT_BY_X + 172;
|
||||
AimSortCheckBoxLoc[13] = AIM_SORT_SORT_BY_Y + 4;
|
||||
AimSortCheckBoxLoc[14] = AIM_SORT_SORT_BY_X + 172;
|
||||
AimSortCheckBoxLoc[15] = AIM_SORT_SORT_BY_Y + 17;
|
||||
|
||||
//Everytime into Aim Sort, reset array.
|
||||
for(i=0; i<MAX_NUMBER_MERCS; i++)
|
||||
{
|
||||
AimMercArray[i] = i;
|
||||
}
|
||||
|
||||
InitAimDefaults();
|
||||
|
||||
// load the SortBy box graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\SortBy.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiSortByBox));
|
||||
|
||||
// load the ToAlumni graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_TOALUMNI );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiToAlumni));
|
||||
|
||||
// load the ToMugShots graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_TOMUGSHOTS );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiToMugShots));
|
||||
|
||||
// load the ToStats graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_TOSTATS );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiToStats));
|
||||
|
||||
// load the SelectLight graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\SelectLight.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiSelectLight));
|
||||
|
||||
|
||||
//** Mouse Regions **
|
||||
|
||||
//Mouse region for the ToMugShotRegion
|
||||
MSYS_DefineRegion( &gSelectedToMugShotRegion, AIM_SORT_TO_MUGSHOTS_X, AIM_SORT_TO_MUGSHOTS_Y, (AIM_SORT_TO_MUGSHOTS_X + AIM_SORT_TO_MUGSHOTS_SIZE), (AIM_SORT_TO_MUGSHOTS_Y + AIM_SORT_TO_MUGSHOTS_SIZE), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToMugShotRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedToMugShotRegion);
|
||||
|
||||
//Mouse region for the ToStatsRegion
|
||||
MSYS_DefineRegion( &gSelectedToStatsRegion, AIM_SORT_TO_STATS_X, AIM_SORT_TO_STATS_Y, (AIM_SORT_TO_STATS_X + AIM_SORT_TO_STATS_SIZE), (AIM_SORT_TO_STATS_Y + AIM_SORT_TO_STATS_SIZE), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToStatsRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedToStatsRegion);
|
||||
|
||||
//Mouse region for the ToArhciveRegion
|
||||
MSYS_DefineRegion( &gSelectedToArchiveRegion, AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, (AIM_SORT_TO_ALUMNI_X + AIM_SORT_TO_ALUMNI_SIZE), (AIM_SORT_TO_ALUMNI_Y + AIM_SORT_TO_ALUMNI_SIZE), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToArchiveRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedToArchiveRegion);
|
||||
|
||||
|
||||
|
||||
//CURSOR_WWW MSYS_NO_CURSOR
|
||||
ubCurNumber = 0;
|
||||
//Mouse region for the Price Check Box
|
||||
ubWidth = StringPixLength( AimSortText[PRICE], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||
MSYS_DefineRegion( &gSelectedPriceBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectPriceBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedPriceBoxRegion);
|
||||
|
||||
ubCurNumber+=2;
|
||||
ubWidth = StringPixLength( AimSortText[EXPERIENCE], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||
//Mouse region for the Experience Check Box
|
||||
MSYS_DefineRegion( &gSelectedExpBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExpBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedExpBoxRegion);
|
||||
|
||||
ubCurNumber+=2;
|
||||
ubWidth = StringPixLength( AimSortText[AIMMARKSMANSHIP], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||
//Mouse region for the Markmanship Check Box
|
||||
MSYS_DefineRegion( &gSelectedMarkBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMarkBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedMarkBoxRegion);
|
||||
|
||||
ubCurNumber+=2;
|
||||
ubWidth = StringPixLength( AimSortText[AIMMEDICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||
//Mouse region for the Medical Check Box
|
||||
MSYS_DefineRegion( &gSelectedMedicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMedicalBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedMedicalBoxRegion);
|
||||
|
||||
ubCurNumber+=2;
|
||||
ubWidth = StringPixLength( AimSortText[EXPLOSIVES], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||
//Mouse region for the Explosive Check Box
|
||||
MSYS_DefineRegion( &gSelectedExplosiveBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExplosiveBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedExplosiveBoxRegion);
|
||||
|
||||
ubCurNumber+=2;
|
||||
ubWidth = StringPixLength( AimSortText[AIMMECHANICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||
//Mouse region for the Mechanical Check Box
|
||||
MSYS_DefineRegion( &gSelectedMechanicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMechanicalBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedMechanicalBoxRegion);
|
||||
|
||||
|
||||
ubCurNumber+=2;
|
||||
|
||||
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[ASCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
|
||||
//Mouse region for the Ascend Check Box
|
||||
MSYS_DefineRegion( &gSelectedAscendBoxRegion, ubWidth , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectAscendBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedAscendBoxRegion);
|
||||
|
||||
ubCurNumber+=2;
|
||||
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[DESCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
|
||||
|
||||
//Mouse region for the Descend Check Box
|
||||
MSYS_DefineRegion( &gSelectedDescendBoxRegion, ubWidth, AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectDescendBoxRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedDescendBoxRegion);
|
||||
|
||||
|
||||
InitAimMenuBar();
|
||||
|
||||
|
||||
RenderAimSort();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void ExitAimSort()
|
||||
{
|
||||
// Sort the merc array
|
||||
SortMercArray();
|
||||
RemoveAimDefaults();
|
||||
|
||||
DeleteVideoObjectFromIndex(guiSortByBox);
|
||||
DeleteVideoObjectFromIndex(guiToAlumni);
|
||||
DeleteVideoObjectFromIndex(guiToMugShots);
|
||||
DeleteVideoObjectFromIndex(guiToStats);
|
||||
DeleteVideoObjectFromIndex(guiSelectLight);
|
||||
|
||||
MSYS_RemoveRegion( &gSelectedToMugShotRegion);
|
||||
MSYS_RemoveRegion( &gSelectedToStatsRegion);
|
||||
MSYS_RemoveRegion( &gSelectedToArchiveRegion);
|
||||
|
||||
MSYS_RemoveRegion( &gSelectedPriceBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedExpBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedMarkBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedMedicalBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedExplosiveBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedMechanicalBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedAscendBoxRegion);
|
||||
MSYS_RemoveRegion( &gSelectedDescendBoxRegion);
|
||||
ExitAimMenuBar();
|
||||
|
||||
}
|
||||
|
||||
void HandleAimSort()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RenderAimSort()
|
||||
{
|
||||
HVOBJECT hSortByHandle;
|
||||
HVOBJECT hToAlumniHandle;
|
||||
HVOBJECT hToMugShotHandle;
|
||||
HVOBJECT hToStatsHandle;
|
||||
|
||||
DrawAimDefaults();
|
||||
// SortBy
|
||||
GetVideoObject(&hSortByHandle, guiSortByBox);
|
||||
BltVideoObject(FRAME_BUFFER, hSortByHandle, 0,AIM_SORT_SORT_BY_X, AIM_SORT_SORT_BY_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// To MugShots
|
||||
GetVideoObject(&hToMugShotHandle, guiToMugShots);
|
||||
BltVideoObject(FRAME_BUFFER, hToMugShotHandle, 0,AIM_SORT_TO_MUGSHOTS_X, AIM_SORT_TO_MUGSHOTS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// To stats
|
||||
GetVideoObject(&hToStatsHandle, guiToStats);
|
||||
BltVideoObject(FRAME_BUFFER, hToStatsHandle, 0,AIM_SORT_TO_STATS_X, AIM_SORT_TO_STATS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// To Alumni
|
||||
GetVideoObject(&hToAlumniHandle, guiToAlumni);
|
||||
BltVideoObject(FRAME_BUFFER, hToAlumniHandle, 0,AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// Draw the aim slogan under the symbol
|
||||
DisplayAimSlogan();
|
||||
|
||||
//Display AIM Member text
|
||||
DrawTextToScreen(AimSortText[AIM_AIMMEMBERS], AIM_SORT_AIM_MEMBER_X, AIM_SORT_AIM_MEMBER_Y, AIM_SORT_AIM_MEMBER_WIDTH, AIM_MAINTITLE_FONT, AIM_MAINTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
//Display sort title
|
||||
DrawTextToScreen(AimSortText[SORT_BY], AIM_SORT_SORT_BY_TEXT_X, AIM_SORT_SORT_BY_TEXT_Y, 0, AIM_SORT_FONT_TITLE, AIM_SORT_SORT_BY_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
//Display all the sort by text
|
||||
DrawTextToScreen(AimSortText[PRICE], AIM_SORT_PRICE_TEXT_X, AIM_SORT_PRICE_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[EXPERIENCE], AIM_SORT_EXP_TEXT_X, AIM_SORT_EXP_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[AIMMARKSMANSHIP], AIM_SORT_MARKMNSHP_TEXT_X, AIM_SORT_MARKMNSHP_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[AIMMEDICAL], AIM_SORT_MEDICAL_X, AIM_SORT_MEDICAL_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[EXPLOSIVES], AIM_SORT_EXPLOSIVES_X, AIM_SORT_EXPLOSIVES_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[AIMMECHANICAL], AIM_SORT_MECHANICAL_X, AIM_SORT_MECHANICAL_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
DrawTextToScreen(AimSortText[ASCENDING], AIM_SORT_ASCEND_TEXT_X, AIM_SORT_ASCEND_TEXT_Y, AIM_SORT_ASC_DESC_WIDTH, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[DESCENDING], AIM_SORT_DESCEND_TEXT_X, AIM_SORT_DESCEND_TEXT_Y, AIM_SORT_ASC_DESC_WIDTH, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
|
||||
// Display text for the 3 icons
|
||||
DrawTextToScreen(AimSortText[MUGSHOT_INDEX], AIM_SORT_MUGSHOT_TEXT_X, AIM_SORT_MUGSHOT_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_LINK_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[MERCENARY_FILES], AIM_SORT_MERC_STATS_TEXT_X, AIM_SORT_MERC_STATS_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_LINK_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(AimSortText[ALUMNI_GALLERY], AIM_SORT_ALUMNI_TEXT_X, AIM_SORT_ALUMNI_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_LINK_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
|
||||
|
||||
DisableAimButton();
|
||||
|
||||
MarkButtonsDirty( );
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SelectToMugShotRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SelectToStatsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectToArchiveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_ARCHIVES;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectPriceBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentSortMode != 0)
|
||||
{
|
||||
gubCurrentSortMode = 0;
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
|
||||
gubOldSortMode = gubCurrentSortMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectExpBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentSortMode != 1)
|
||||
{
|
||||
gubCurrentSortMode = 1;
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
|
||||
gubOldSortMode = gubCurrentSortMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SelectMarkBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentSortMode != 2)
|
||||
{
|
||||
gubCurrentSortMode = 2;
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
|
||||
gubOldSortMode = gubCurrentSortMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentSortMode != 3)
|
||||
{
|
||||
gubCurrentSortMode = 3;
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
|
||||
gubOldSortMode = gubCurrentSortMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentSortMode != 4)
|
||||
{
|
||||
gubCurrentSortMode = 4;
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
|
||||
gubOldSortMode = gubCurrentSortMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentSortMode != 5)
|
||||
{
|
||||
gubCurrentSortMode = 5;
|
||||
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
|
||||
gubOldSortMode = gubCurrentSortMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentListMode != AIM_ASCEND)
|
||||
{
|
||||
gubCurrentListMode = AIM_ASCEND;
|
||||
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldListMode, AIM_SORT_OFF);
|
||||
gubOldListMode = gubCurrentListMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectDescendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if(gubCurrentListMode != AIM_DESCEND )
|
||||
{
|
||||
gubCurrentListMode = AIM_DESCEND;
|
||||
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
|
||||
DrawSelectLight(gubOldListMode, AIM_SORT_OFF);
|
||||
gubOldListMode = gubCurrentListMode;
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DrawSelectLight(UINT8 ubMode, UINT8 ubImage)
|
||||
{
|
||||
HVOBJECT hSelectLightHandle;
|
||||
|
||||
ubMode *= 2;
|
||||
|
||||
GetVideoObject(&hSelectLightHandle, guiSelectLight);
|
||||
BltVideoObject(FRAME_BUFFER, hSelectLightHandle, ubImage, (AimSortCheckBoxLoc[ubMode] ), ( AimSortCheckBoxLoc[ubMode + 1] ), VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
|
||||
InvalidateRegion(AimSortCheckBoxLoc[ubMode],AimSortCheckBoxLoc[ubMode+1], (AimSortCheckBoxLoc[ubMode] + AIM_SORT_CHECKBOX_SIZE), (AimSortCheckBoxLoc[ubMode+1] + AIM_SORT_CHECKBOX_SIZE) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN SortMercArray(void)
|
||||
{
|
||||
qsort( (LPVOID)AimMercArray, (size_t) MAX_NUMBER_MERCS, sizeof(UINT8), QsortCompare);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
INT32 QsortCompare( const void *pNum1, const void *pNum2)
|
||||
{
|
||||
UINT8 Num1 = *(UINT8*)pNum1;
|
||||
UINT8 Num2 = *(UINT8*)pNum2;
|
||||
|
||||
switch( gubCurrentSortMode )
|
||||
{
|
||||
//Price INT16 uiWeeklySalary
|
||||
case 0:
|
||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].uiWeeklySalary, (INT32)gMercProfiles[Num2].uiWeeklySalary ) );
|
||||
break;
|
||||
//Experience INT16 bExpLevel
|
||||
case 1:
|
||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExpLevel, (INT32)gMercProfiles[Num2].bExpLevel) );
|
||||
break;
|
||||
//Marksmanship INT16 bMarksmanship
|
||||
case 2:
|
||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMarksmanship, (INT32)gMercProfiles[Num2].bMarksmanship ) );
|
||||
break;
|
||||
//Medical INT16 bMedical
|
||||
case 3:
|
||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMedical, (INT32)gMercProfiles[Num2].bMedical ) );
|
||||
break;
|
||||
//Explosives INT16 bExplosive
|
||||
case 4:
|
||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExplosive, (INT32)gMercProfiles[Num2].bExplosive ) );
|
||||
break;
|
||||
//Mechanical INT16 bMechanical
|
||||
case 5:
|
||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMechanical, (INT32)gMercProfiles[Num2].bMechanical ) );
|
||||
break;
|
||||
|
||||
default:
|
||||
Assert( 0 );
|
||||
return( 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
INT32 CompareValue(const INT32 Num1, const INT32 Num2)
|
||||
{
|
||||
// Ascending
|
||||
if( gubCurrentListMode == AIM_ASCEND)
|
||||
{
|
||||
if( Num1 < Num2)
|
||||
return(-1);
|
||||
else if( Num1 == Num2)
|
||||
return(0);
|
||||
else
|
||||
return(1);
|
||||
}
|
||||
|
||||
// Descending
|
||||
else if( gubCurrentListMode == AIM_DESCEND )
|
||||
{
|
||||
if( Num1 > Num2)
|
||||
return(-1);
|
||||
else if( Num1 == Num2)
|
||||
return(0);
|
||||
else
|
||||
return(1);
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef __AIMSORT_H_
|
||||
#define __AIMSORT_H_
|
||||
|
||||
extern UINT8 gubCurrentSortMode;
|
||||
extern UINT8 gubCurrentListMode;
|
||||
|
||||
|
||||
|
||||
#define AIM_ASCEND 6
|
||||
#define AIM_DESCEND 7
|
||||
|
||||
|
||||
void GameInitAimSort();
|
||||
BOOLEAN EnterAimSort();
|
||||
void ExitAimSort();
|
||||
void HandleAimSort();
|
||||
void RenderAimSort();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,923 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "BobbyR.h"
|
||||
#include "BobbyRGuns.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "interface items.h"
|
||||
#include "Weapons.h"
|
||||
#include "Store Inventory.h"
|
||||
#include "Game Event Hook.h"
|
||||
#include "Game Clock.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "Random.h"
|
||||
#include "Text.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#include "Utility.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef JA2TESTVERSION
|
||||
#define BR_INVENTORY_TURNOVER_DEBUG
|
||||
#endif
|
||||
|
||||
|
||||
#define BOBBIES_SIGN_FONT FONT14ARIAL
|
||||
#define BOBBIES_SIGN_COLOR 2
|
||||
#define BOBBIES_SIGN_BACKCOLOR FONT_MCOLOR_BLACK
|
||||
#define BOBBIES_SIGN_BACKGROUNDCOLOR 78
|
||||
|
||||
#define BOBBIES_NUMBER_SIGNS 5
|
||||
|
||||
#define BOBBIES_SENTENCE_FONT FONT12ARIAL
|
||||
#define BOBBIES_SENTENCE_COLOR FONT_MCOLOR_WHITE
|
||||
#define BOBBIES_SENTENCE_BACKGROUNDCOLOR 2
|
||||
|
||||
#define BOBBY_WOOD_BACKGROUND_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBY_WOOD_BACKGROUND_Y LAPTOP_SCREEN_WEB_UL_Y
|
||||
#define BOBBY_WOOD_BACKGROUND_WIDTH 125
|
||||
#define BOBBY_WOOD_BACKGROUND_HEIGHT 100
|
||||
|
||||
#define BOBBY_RAYS_NAME_X LAPTOP_SCREEN_UL_X + 77
|
||||
#define BOBBY_RAYS_NAME_Y LAPTOP_SCREEN_WEB_UL_Y + 0
|
||||
#define BOBBY_RAYS_NAME_WIDTH 344
|
||||
#define BOBBY_RAYS_NAME_HEIGHT 66
|
||||
|
||||
#define BOBBYS_PLAQUES_X LAPTOP_SCREEN_UL_X + 39
|
||||
#define BOBBYS_PLAQUES_Y LAPTOP_SCREEN_WEB_UL_Y + 174
|
||||
#define BOBBYS_PLAQUES_WIDTH 414
|
||||
#define BOBBYS_PLAQUES_HEIGHT 190
|
||||
|
||||
#define BOBBIES_TOPHINGE_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBIES_TOPHINGE_Y LAPTOP_SCREEN_WEB_UL_Y + 42
|
||||
|
||||
#define BOBBIES_BOTTOMHINGE_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBIES_BOTTOMHINGE_Y LAPTOP_SCREEN_WEB_UL_Y + 338
|
||||
|
||||
#define BOBBIES_STORE_PLAQUE_X LAPTOP_SCREEN_UL_X + 148
|
||||
#define BOBBIES_STORE_PLAQUE_Y LAPTOP_SCREEN_WEB_UL_Y + 66
|
||||
#define BOBBIES_STORE_PLAQUE_HEIGHT 93
|
||||
|
||||
#define BOBBIES_HANDLE_X LAPTOP_SCREEN_UL_X + 457
|
||||
#define BOBBIES_HANDLE_Y LAPTOP_SCREEN_WEB_UL_Y + 147
|
||||
|
||||
#define BOBBIES_FIRST_SENTENCE_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBIES_FIRST_SENTENCE_Y BOBBIES_STORE_PLAQUE_Y + BOBBIES_STORE_PLAQUE_HEIGHT - 3
|
||||
#define BOBBIES_FIRST_SENTENCE_WIDTH 500
|
||||
|
||||
#define BOBBIES_2ND_SENTENCE_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBIES_2ND_SENTENCE_Y BOBBIES_FIRST_SENTENCE_Y + 13
|
||||
#define BOBBIES_2ND_SENTENCE_WIDTH 500
|
||||
|
||||
#define BOBBIES_CENTER_SIGN_OFFSET_Y 23
|
||||
|
||||
#define BOBBIES_USED_SIGN_X BOBBYS_PLAQUES_X + 93
|
||||
#define BOBBIES_USED_SIGN_Y BOBBYS_PLAQUES_Y + 32
|
||||
#define BOBBIES_USED_SIGN_WIDTH 92
|
||||
#define BOBBIES_USED_SIGN_HEIGHT 50
|
||||
#define BOBBIES_USED_SIGN_TEXT_OFFSET BOBBIES_USED_SIGN_Y + 10
|
||||
|
||||
#define BOBBIES_MISC_SIGN_X BOBBYS_PLAQUES_X + 238
|
||||
#define BOBBIES_MISC_SIGN_Y BOBBYS_PLAQUES_Y + 27
|
||||
#define BOBBIES_MISC_SIGN_WIDTH 103
|
||||
#define BOBBIES_MISC_SIGN_HEIGHT 57
|
||||
#define BOBBIES_MISC_SIGN_TEXT_OFFSET BOBBIES_MISC_SIGN_Y + BOBBIES_CENTER_SIGN_OFFSET_Y
|
||||
|
||||
#define BOBBIES_GUNS_SIGN_X BOBBYS_PLAQUES_X + 3
|
||||
#define BOBBIES_GUNS_SIGN_Y BOBBYS_PLAQUES_Y + 102
|
||||
#define BOBBIES_GUNS_SIGN_WIDTH 116
|
||||
#define BOBBIES_GUNS_SIGN_HEIGHT 75
|
||||
#define BOBBIES_GUNS_SIGN_TEXT_OFFSET BOBBIES_GUNS_SIGN_Y + BOBBIES_CENTER_SIGN_OFFSET_Y
|
||||
|
||||
#define BOBBIES_AMMO_SIGN_X BOBBYS_PLAQUES_X + 150
|
||||
#define BOBBIES_AMMO_SIGN_Y BOBBYS_PLAQUES_Y + 105
|
||||
#define BOBBIES_AMMO_SIGN_WIDTH 112
|
||||
#define BOBBIES_AMMO_SIGN_HEIGHT 71
|
||||
#define BOBBIES_AMMO_SIGN_TEXT_OFFSET BOBBIES_AMMO_SIGN_Y + BOBBIES_CENTER_SIGN_OFFSET_Y
|
||||
|
||||
#define BOBBIES_ARMOUR_SIGN_X BOBBYS_PLAQUES_X + 290
|
||||
#define BOBBIES_ARMOUR_SIGN_Y BOBBYS_PLAQUES_Y + 108
|
||||
#define BOBBIES_ARMOUR_SIGN_WIDTH 114
|
||||
#define BOBBIES_ARMOUR_SIGN_HEIGHT 70
|
||||
#define BOBBIES_ARMOUR_SIGN_TEXT_OFFSET BOBBIES_ARMOUR_SIGN_Y + BOBBIES_CENTER_SIGN_OFFSET_Y
|
||||
|
||||
#define BOBBIES_3RD_SENTENCE_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBIES_3RD_SENTENCE_Y BOBBIES_BOTTOMHINGE_Y + 40
|
||||
#define BOBBIES_3RD_SENTENCE_WIDTH 500
|
||||
|
||||
#define BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME (1 * 60 * 24) // minutes in 1 day
|
||||
|
||||
#define BOBBY_R_USED_PURCHASE_OFFSET 1000
|
||||
|
||||
#define BOBBYR_UNDERCONSTRUCTION_ANI_DELAY 150
|
||||
#define BOBBYR_UNDERCONSTRUCTION_NUM_FRAMES 5
|
||||
|
||||
#define BOBBYR_UNDERCONSTRUCTION_X iScreenWidthOffset + 111 + ( 613 - 111 - BOBBYR_UNDERCONSTRUCTION_WIDTH) / 2
|
||||
#define BOBBYR_UNDERCONSTRUCTION_Y iScreenHeightOffset + 175
|
||||
#define BOBBYR_UNDERCONSTRUCTION1_Y iScreenHeightOffset + 378
|
||||
|
||||
#define BOBBYR_UNDERCONSTRUCTION_WIDTH 414
|
||||
#define BOBBYR_UNDERCONSTRUCTION_HEIGHT 64
|
||||
|
||||
#define BOBBYR_UNDER_CONSTRUCTION_TEXT_X LAPTOP_SCREEN_UL_X
|
||||
#define BOBBYR_UNDER_CONSTRUCTION_TEXT_Y BOBBYR_UNDERCONSTRUCTION_Y + 62 + 60
|
||||
#define BOBBYR_UNDER_CONSTRUCTION_TEXT_WIDTH 613 - 111
|
||||
|
||||
|
||||
|
||||
UINT32 guiBobbyName;
|
||||
UINT32 guiPlaque;
|
||||
UINT32 guiTopHinge;
|
||||
UINT32 guiBottomHinge;
|
||||
UINT32 guiStorePlaque;
|
||||
UINT32 guiHandle;
|
||||
UINT32 guiWoodBackground;
|
||||
UINT32 guiUnderConstructionImage;
|
||||
|
||||
/*
|
||||
UINT16 gusFirstGunIndex;
|
||||
UINT16 gusLastGunIndex;
|
||||
UINT8 gubNumGunPages;
|
||||
|
||||
UINT16 gusFirstAmmoIndex;
|
||||
UINT16 gusLastAmmoIndex;
|
||||
UINT8 gubNumAmmoPages;
|
||||
|
||||
UINT16 gusFirstMiscIndex;
|
||||
UINT16 gusLastMiscIndex;
|
||||
UINT8 gubNumMiscPages;
|
||||
|
||||
UINT16 gusFirstArmourIndex;
|
||||
UINT16 gusLastArmourIndex;
|
||||
UINT8 gubNumArmourPages;
|
||||
|
||||
UINT16 gusFirstUsedIndex;
|
||||
UINT16 gusLastUsedIndex;
|
||||
UINT8 gubNumUsedPages;
|
||||
*/
|
||||
|
||||
UINT32 guiLastBobbyRayPage;
|
||||
|
||||
|
||||
|
||||
UINT8 gubBobbyRPages[]={
|
||||
LAPTOP_MODE_BOBBY_R_USED,
|
||||
LAPTOP_MODE_BOBBY_R_MISC,
|
||||
LAPTOP_MODE_BOBBY_R_GUNS,
|
||||
LAPTOP_MODE_BOBBY_R_AMMO,
|
||||
LAPTOP_MODE_BOBBY_R_ARMOR};
|
||||
|
||||
|
||||
//Bobby's Sign menu mouse regions
|
||||
MOUSE_REGION gSelectedBobbiesSignMenuRegion[ BOBBIES_NUMBER_SIGNS ];
|
||||
void SelectBobbiesSignMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
BOOLEAN InitBobbiesMouseRegion(UINT8 ubNumerRegions, UINT16 *usMouseRegionPosArray, MOUSE_REGION *MouseRegion);
|
||||
BOOLEAN RemoveBobbiesMouseRegion(UINT8 ubNumberRegions, MOUSE_REGION *Mouse_Region);
|
||||
void HandleBobbyRUnderConstructionAni( BOOLEAN fReset );
|
||||
|
||||
void SimulateBobbyRayCustomer(STORE_INVENTORY *pInventoryArray, BOOLEAN fUsed);
|
||||
|
||||
|
||||
|
||||
void GameInitBobbyR()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN EnterBobbyR()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 i;
|
||||
|
||||
// an array of mouse regions for the bobbies signs. Top Left corner, bottom right corner
|
||||
UINT16 usMouseRegionPosArray[] = {BOBBIES_USED_SIGN_X, BOBBIES_USED_SIGN_Y, BOBBIES_USED_SIGN_X+BOBBIES_USED_SIGN_WIDTH, BOBBIES_USED_SIGN_Y+BOBBIES_USED_SIGN_HEIGHT,
|
||||
BOBBIES_MISC_SIGN_X, BOBBIES_MISC_SIGN_Y, BOBBIES_MISC_SIGN_X+BOBBIES_MISC_SIGN_WIDTH, BOBBIES_MISC_SIGN_Y+BOBBIES_MISC_SIGN_HEIGHT,
|
||||
BOBBIES_GUNS_SIGN_X, BOBBIES_GUNS_SIGN_Y, BOBBIES_GUNS_SIGN_X+BOBBIES_GUNS_SIGN_WIDTH, BOBBIES_GUNS_SIGN_Y+BOBBIES_GUNS_SIGN_HEIGHT,
|
||||
BOBBIES_AMMO_SIGN_X, BOBBIES_AMMO_SIGN_Y, BOBBIES_AMMO_SIGN_X+BOBBIES_AMMO_SIGN_WIDTH, BOBBIES_AMMO_SIGN_Y+BOBBIES_AMMO_SIGN_HEIGHT,
|
||||
BOBBIES_ARMOUR_SIGN_X, BOBBIES_ARMOUR_SIGN_Y, BOBBIES_ARMOUR_SIGN_X+BOBBIES_ARMOUR_SIGN_WIDTH, BOBBIES_ARMOUR_SIGN_Y+BOBBIES_ARMOUR_SIGN_HEIGHT};
|
||||
|
||||
InitBobbyRWoodBackground();
|
||||
|
||||
// load the Bobbyname graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_BOBBYNAME );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyName));
|
||||
|
||||
// load the plaque graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BobbyPlaques.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiPlaque));
|
||||
|
||||
// load the TopHinge graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BobbyTopHinge.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiTopHinge));
|
||||
|
||||
// load the BottomHinge graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BobbyBottomHinge.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomHinge));
|
||||
|
||||
// load the Store Plaque graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_STOREPLAQUE );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiStorePlaque));
|
||||
|
||||
// load the Handle graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BobbyHandle.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiHandle));
|
||||
|
||||
|
||||
InitBobbiesMouseRegion(BOBBIES_NUMBER_SIGNS, usMouseRegionPosArray, gSelectedBobbiesSignMenuRegion);
|
||||
|
||||
|
||||
if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
{
|
||||
// load the Handle graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\UnderConstruction.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiUnderConstructionImage));
|
||||
|
||||
for(i=0; i<BOBBIES_NUMBER_SIGNS; i++)
|
||||
{
|
||||
MSYS_DisableRegion( &gSelectedBobbiesSignMenuRegion[i] );
|
||||
}
|
||||
|
||||
LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction = BOBBYR_BEEN_TO_SITE_ONCE;
|
||||
}
|
||||
|
||||
|
||||
SetBookMark(BOBBYR_BOOKMARK);
|
||||
HandleBobbyRUnderConstructionAni( TRUE );
|
||||
|
||||
RenderBobbyR();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void ExitBobbyR()
|
||||
{
|
||||
|
||||
DeleteVideoObjectFromIndex(guiBobbyName);
|
||||
DeleteVideoObjectFromIndex(guiPlaque);
|
||||
DeleteVideoObjectFromIndex(guiTopHinge);
|
||||
DeleteVideoObjectFromIndex(guiBottomHinge);
|
||||
DeleteVideoObjectFromIndex(guiStorePlaque);
|
||||
DeleteVideoObjectFromIndex(guiHandle);
|
||||
|
||||
if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
{
|
||||
DeleteVideoObjectFromIndex(guiUnderConstructionImage);
|
||||
}
|
||||
|
||||
|
||||
DeleteBobbyRWoodBackground();
|
||||
|
||||
RemoveBobbiesMouseRegion(BOBBIES_NUMBER_SIGNS, gSelectedBobbiesSignMenuRegion);
|
||||
|
||||
guiLastBobbyRayPage = LAPTOP_MODE_BOBBY_R;
|
||||
}
|
||||
|
||||
void HandleBobbyR()
|
||||
{
|
||||
HandleBobbyRUnderConstructionAni( FALSE );
|
||||
}
|
||||
|
||||
void RenderBobbyR()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
HVOBJECT hStorePlaqueHandle;
|
||||
|
||||
DrawBobbyRWoodBackground();
|
||||
|
||||
// Bobby's Name
|
||||
GetVideoObject(&hPixHandle, guiBobbyName);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBY_RAYS_NAME_X, BOBBY_RAYS_NAME_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Plaque
|
||||
GetVideoObject(&hPixHandle, guiPlaque);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBYS_PLAQUES_X, BOBBYS_PLAQUES_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Top Hinge
|
||||
GetVideoObject(&hPixHandle, guiTopHinge);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_TOPHINGE_X, BOBBIES_TOPHINGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Bottom Hinge
|
||||
GetVideoObject(&hPixHandle, guiBottomHinge);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_BOTTOMHINGE_X, BOBBIES_BOTTOMHINGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// StorePlaque
|
||||
GetVideoObject(&hStorePlaqueHandle, guiStorePlaque);
|
||||
BltVideoObject(FRAME_BUFFER, hStorePlaqueHandle, 0,BOBBIES_STORE_PLAQUE_X, BOBBIES_STORE_PLAQUE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Handle
|
||||
GetVideoObject(&hPixHandle, guiHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_HANDLE_X, BOBBIES_HANDLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
/*
|
||||
if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
{
|
||||
// The undercontsruction graphic
|
||||
GetVideoObject(&hPixHandle, guiUnderConstructionImage );
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_FIRST_SENTENCE_X, BOBBIES_FIRST_SENTENCE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_3RD_SENTENCE_X, BOBBIES_3RD_SENTENCE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
*/
|
||||
|
||||
SetFontShadow(BOBBIES_SENTENCE_BACKGROUNDCOLOR);
|
||||
|
||||
|
||||
if( LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
{
|
||||
//Bobbys first sentence
|
||||
// ShadowText( FRAME_BUFFER, BobbyRaysFrontText[BOBBYR_ADVERTISMENT_1], BOBBIES_SENTENCE_FONT, BOBBIES_FIRST_SENTENCE_X, BOBBIES_FIRST_SENTENCE_Y );
|
||||
DrawTextToScreen(BobbyRaysFrontText[BOBBYR_ADVERTISMENT_1], BOBBIES_FIRST_SENTENCE_X, BOBBIES_FIRST_SENTENCE_Y, BOBBIES_FIRST_SENTENCE_WIDTH, BOBBIES_SENTENCE_FONT, BOBBIES_SENTENCE_COLOR, BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED | TEXT_SHADOWED );
|
||||
|
||||
//Bobbys second sentence
|
||||
DrawTextToScreen(BobbyRaysFrontText[BOBBYR_ADVERTISMENT_2], BOBBIES_2ND_SENTENCE_X, BOBBIES_2ND_SENTENCE_Y, BOBBIES_2ND_SENTENCE_WIDTH, BOBBIES_SENTENCE_FONT, BOBBIES_SENTENCE_COLOR, BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED | TEXT_SHADOWED );
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
}
|
||||
|
||||
|
||||
SetFontShadow(BOBBIES_SIGN_BACKGROUNDCOLOR);
|
||||
//Text on the Used Sign
|
||||
DisplayWrappedString(BOBBIES_USED_SIGN_X, BOBBIES_USED_SIGN_TEXT_OFFSET, BOBBIES_USED_SIGN_WIDTH-5, 2, BOBBIES_SIGN_FONT, BOBBIES_SIGN_COLOR, BobbyRaysFrontText[BOBBYR_USED], BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED);
|
||||
//Text on the Misc Sign
|
||||
DisplayWrappedString(BOBBIES_MISC_SIGN_X, BOBBIES_MISC_SIGN_TEXT_OFFSET, BOBBIES_MISC_SIGN_WIDTH, 2, BOBBIES_SIGN_FONT, BOBBIES_SIGN_COLOR, BobbyRaysFrontText[BOBBYR_MISC], BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED);
|
||||
//Text on the Guns Sign
|
||||
DisplayWrappedString(BOBBIES_GUNS_SIGN_X, BOBBIES_GUNS_SIGN_TEXT_OFFSET, BOBBIES_GUNS_SIGN_WIDTH, 2, BOBBIES_SIGN_FONT, BOBBIES_SIGN_COLOR, BobbyRaysFrontText[BOBBYR_GUNS], BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED);
|
||||
//Text on the Ammo Sign
|
||||
DisplayWrappedString(BOBBIES_AMMO_SIGN_X, BOBBIES_AMMO_SIGN_TEXT_OFFSET, BOBBIES_AMMO_SIGN_WIDTH, 2, BOBBIES_SIGN_FONT, BOBBIES_SIGN_COLOR, BobbyRaysFrontText[BOBBYR_AMMO], BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED);
|
||||
//Text on the Armour Sign
|
||||
DisplayWrappedString(BOBBIES_ARMOUR_SIGN_X, BOBBIES_ARMOUR_SIGN_TEXT_OFFSET, BOBBIES_ARMOUR_SIGN_WIDTH, 2, BOBBIES_SIGN_FONT, BOBBIES_SIGN_COLOR, BobbyRaysFrontText[BOBBYR_ARMOR], BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED);
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
|
||||
|
||||
if( LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
{
|
||||
//Bobbys Third sentence
|
||||
SetFontShadow(BOBBIES_SENTENCE_BACKGROUNDCOLOR);
|
||||
DrawTextToScreen(BobbyRaysFrontText[BOBBYR_ADVERTISMENT_3], BOBBIES_3RD_SENTENCE_X, BOBBIES_3RD_SENTENCE_Y, BOBBIES_3RD_SENTENCE_WIDTH, BOBBIES_SENTENCE_FONT, BOBBIES_SENTENCE_COLOR, BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED | TEXT_SHADOWED );
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
}
|
||||
|
||||
//if we cant go to any sub pages, darken the page out
|
||||
if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
{
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y );
|
||||
}
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN InitBobbyRWoodBackground()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// load the Wood bacground graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BobbyWood.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiWoodBackground));
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN DeleteBobbyRWoodBackground()
|
||||
{
|
||||
DeleteVideoObjectFromIndex(guiWoodBackground);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DrawBobbyRWoodBackground()
|
||||
{
|
||||
HVOBJECT hWoodBackGroundHandle;
|
||||
UINT16 x,y, uiPosX, uiPosY;
|
||||
|
||||
// Blt the Wood background
|
||||
GetVideoObject(&hWoodBackGroundHandle, guiWoodBackground);
|
||||
|
||||
uiPosY = BOBBY_WOOD_BACKGROUND_Y;
|
||||
for(y=0; y<4; y++)
|
||||
{
|
||||
uiPosX = BOBBY_WOOD_BACKGROUND_X;
|
||||
for(x=0; x<4; x++)
|
||||
{
|
||||
BltVideoObject(FRAME_BUFFER, hWoodBackGroundHandle, 0,uiPosX, uiPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
uiPosX += BOBBY_WOOD_BACKGROUND_WIDTH;
|
||||
}
|
||||
uiPosY += BOBBY_WOOD_BACKGROUND_HEIGHT;
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN InitBobbiesMouseRegion(UINT8 ubNumerRegions, UINT16 *usMouseRegionPosArray, MOUSE_REGION *MouseRegion)
|
||||
{
|
||||
UINT8 i,ubCount=0;
|
||||
|
||||
for(i=0; i<ubNumerRegions; i++)
|
||||
{
|
||||
//Mouse region for the toc buttons
|
||||
MSYS_DefineRegion( &MouseRegion[i], usMouseRegionPosArray[ubCount], usMouseRegionPosArray[ubCount+1], usMouseRegionPosArray[ubCount+2], usMouseRegionPosArray[ubCount+3], MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectBobbiesSignMenuRegionCallBack);
|
||||
MSYS_AddRegion(&MouseRegion[i]);
|
||||
MSYS_SetRegionUserData( &MouseRegion[i], 0, gubBobbyRPages[i]);
|
||||
|
||||
ubCount +=4;
|
||||
}
|
||||
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN RemoveBobbiesMouseRegion(UINT8 ubNumberRegions, MOUSE_REGION *Mouse_Region)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
for(i=0; i<ubNumberRegions; i++)
|
||||
MSYS_RemoveRegion( &Mouse_Region[i]);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SelectBobbiesSignMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
UINT8 ubNewPage = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||
guiCurrentLaptopMode = ubNewPage;
|
||||
// FindLastItemIndex(ubNewPage);
|
||||
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16 usHeight, UINT32 uiBackground)
|
||||
{
|
||||
HVOBJECT hBackGroundHandle;
|
||||
UINT16 x,y, uiPosX, uiPosY;
|
||||
|
||||
// Blt the Wood background
|
||||
GetVideoObject(&hBackGroundHandle, uiBackground);
|
||||
|
||||
uiPosY = LAPTOP_SCREEN_WEB_UL_Y;
|
||||
for(y=0; y<ubNumY; y++)
|
||||
{
|
||||
uiPosX = LAPTOP_SCREEN_UL_X;
|
||||
for(x=0; x<ubNumX; x++)
|
||||
{
|
||||
BltVideoObject(FRAME_BUFFER, hBackGroundHandle, 0,uiPosX, uiPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
uiPosX += usWidth;
|
||||
}
|
||||
uiPosY += usHeight;
|
||||
}
|
||||
return(TRUE);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void HandleBobbyRUnderConstructionAni( BOOLEAN fReset )
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
static UINT32 uiLastTime=1;
|
||||
static UINT16 usCount=0;
|
||||
UINT32 uiCurTime=GetJA2Clock();
|
||||
|
||||
|
||||
if( LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||
return;
|
||||
|
||||
if( fReset )
|
||||
usCount =1;
|
||||
|
||||
if( fShowBookmarkInfo )
|
||||
{
|
||||
fReDrawBookMarkInfo = TRUE;
|
||||
}
|
||||
|
||||
if( ( ( uiCurTime - uiLastTime ) > BOBBYR_UNDERCONSTRUCTION_ANI_DELAY )||( fReDrawScreenFlag ) )
|
||||
{
|
||||
// The undercontsruction graphic
|
||||
GetVideoObject(&hPixHandle, guiUnderConstructionImage );
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, usCount, BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
BltVideoObject( FRAME_BUFFER, hPixHandle, usCount, BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION1_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
DrawTextToScreen( BobbyRaysFrontText[ BOBBYR_UNDER_CONSTRUCTION ], BOBBYR_UNDER_CONSTRUCTION_TEXT_X, BOBBYR_UNDER_CONSTRUCTION_TEXT_Y, BOBBYR_UNDER_CONSTRUCTION_TEXT_WIDTH, FONT16ARIAL, BOBBIES_SENTENCE_COLOR, BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED | INVALIDATE_TEXT );
|
||||
|
||||
InvalidateRegion( BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION_Y, BOBBYR_UNDERCONSTRUCTION_X+BOBBYR_UNDERCONSTRUCTION_WIDTH, BOBBYR_UNDERCONSTRUCTION_Y+BOBBYR_UNDERCONSTRUCTION_HEIGHT );
|
||||
InvalidateRegion( BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION1_Y, BOBBYR_UNDERCONSTRUCTION_X+BOBBYR_UNDERCONSTRUCTION_WIDTH, BOBBYR_UNDERCONSTRUCTION1_Y+BOBBYR_UNDERCONSTRUCTION_HEIGHT );
|
||||
|
||||
uiLastTime = GetJA2Clock();
|
||||
|
||||
usCount++;
|
||||
|
||||
if( usCount >= BOBBYR_UNDERCONSTRUCTION_NUM_FRAMES )
|
||||
usCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void InitBobbyRayInventory()
|
||||
{
|
||||
//Initializes which NEW items can be bought at Bobby Rays
|
||||
InitBobbyRayNewInventory();
|
||||
|
||||
//Initializes the starting values for Bobby Rays NEW Inventory
|
||||
SetupStoreInventory( LaptopSaveInfo.BobbyRayInventory, FALSE );
|
||||
|
||||
//Initializes which USED items can be bought at Bobby Rays
|
||||
InitBobbyRayUsedInventory();
|
||||
|
||||
//Initializes the starting values for Bobby Rays USED Inventory
|
||||
SetupStoreInventory( LaptopSaveInfo.BobbyRayUsedInventory, TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN InitBobbyRayNewInventory()
|
||||
{
|
||||
UINT16 i;
|
||||
UINT16 usBobbyrIndex = 0;
|
||||
|
||||
|
||||
memset( LaptopSaveInfo.BobbyRayInventory, 0, sizeof(STORE_INVENTORY) * MAXITEMS);
|
||||
|
||||
// add all the NEW items he can ever sell into his possible inventory list, for now in order by item #
|
||||
for( i = 0; i < MAXITEMS; i++ )
|
||||
{
|
||||
if ( Item[i].usItemClass == 0 )
|
||||
break;
|
||||
//if Bobby Ray sells this, it can be sold, and it's allowed into this game (some depend on e.g. gun-nut option)
|
||||
// if( ( StoreInventory[ i ][ BOBBY_RAY_NEW ] != 0) && !( Item[ i ].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ) )
|
||||
if( ( StoreInventory[ i ][ BOBBY_RAY_NEW ] != 0) && !( Item[ i ].notbuyable ) && ItemIsLegal( i ) )
|
||||
{
|
||||
LaptopSaveInfo.BobbyRayInventory[ usBobbyrIndex ].usItemIndex = i;
|
||||
usBobbyrIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( usBobbyrIndex > 1 )
|
||||
{
|
||||
// sort this list by object category, and by ascending price within each category
|
||||
qsort( LaptopSaveInfo.BobbyRayInventory, usBobbyrIndex, sizeof( STORE_INVENTORY ), BobbyRayItemQsortCompare );
|
||||
}
|
||||
|
||||
|
||||
// remember how many entries in the list are valid
|
||||
LaptopSaveInfo.usInventoryListLength[ BOBBY_RAY_NEW ] = usBobbyrIndex;
|
||||
// also mark the end of the list of valid item entries
|
||||
LaptopSaveInfo.BobbyRayInventory[ usBobbyrIndex ].usItemIndex = BOBBYR_NO_ITEMS;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN InitBobbyRayUsedInventory()
|
||||
{
|
||||
UINT16 i;
|
||||
UINT16 usBobbyrIndex = 0;
|
||||
|
||||
|
||||
memset( LaptopSaveInfo.BobbyRayUsedInventory, 0, sizeof(STORE_INVENTORY) * MAXITEMS);
|
||||
|
||||
// add all the NEW items he can ever sell into his possible inventory list, for now in order by item #
|
||||
for( i = 0; i < MAXITEMS; i++ )
|
||||
{
|
||||
if ( Item[i].usItemClass == 0 )
|
||||
break;
|
||||
//if Bobby Ray sells this, it can be sold, and it's allowed into this game (some depend on e.g. gun-nut option)
|
||||
// if( ( StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[ i ].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ) )
|
||||
if( ( StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[ i ].notbuyable ) && ItemIsLegal( i ) )
|
||||
{
|
||||
// if( (StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[i].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ))
|
||||
if( (StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[i].notbuyable ) && ItemIsLegal( i ))
|
||||
// in case his store inventory list is wrong, make sure this category of item can be sold used
|
||||
if ( CanDealerItemBeSoldUsed( i ) )
|
||||
{
|
||||
LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyrIndex ].usItemIndex = i;
|
||||
usBobbyrIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( usBobbyrIndex > 1 )
|
||||
{
|
||||
// sort this list by object category, and by ascending price within each category
|
||||
qsort( LaptopSaveInfo.BobbyRayUsedInventory, usBobbyrIndex, sizeof( STORE_INVENTORY ), BobbyRayItemQsortCompare );
|
||||
}
|
||||
|
||||
// remember how many entries in the list are valid
|
||||
LaptopSaveInfo.usInventoryListLength[BOBBY_RAY_USED] = usBobbyrIndex;
|
||||
// also mark the end of the list of valid item entries
|
||||
LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyrIndex ].usItemIndex = BOBBYR_NO_ITEMS;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DailyUpdateOfBobbyRaysNewInventory()
|
||||
{
|
||||
INT16 i;
|
||||
UINT16 usItemIndex;
|
||||
BOOLEAN fPrevElig;
|
||||
|
||||
|
||||
//simulate other buyers by reducing the current quantity on hand
|
||||
SimulateBobbyRayCustomer(LaptopSaveInfo.BobbyRayInventory, BOBBY_RAY_NEW);
|
||||
|
||||
//loop through all items BR can stock to see what needs reordering
|
||||
for(i = 0; i < LaptopSaveInfo.usInventoryListLength[BOBBY_RAY_NEW]; i++)
|
||||
{
|
||||
// the index is NOT the item #, get that from the table
|
||||
usItemIndex = LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex;
|
||||
|
||||
Assert(usItemIndex < MAXITEMS);
|
||||
|
||||
// make sure this item is still sellable in the latest version of the store inventory
|
||||
if ( StoreInventory[ usItemIndex ][ BOBBY_RAY_NEW ] == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//if the item isn't already on order
|
||||
if( LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnOrder == 0)
|
||||
{
|
||||
//if the qty on hand is half the desired amount or fewer
|
||||
if( LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnHand <= (StoreInventory[ usItemIndex ][ BOBBY_RAY_NEW ] / 2 ) )
|
||||
{
|
||||
// remember value of the "previously eligible" flag
|
||||
fPrevElig = LaptopSaveInfo.BobbyRayInventory[ i ].fPreviouslyEligible;
|
||||
|
||||
//determine if any can/should be ordered, and how many
|
||||
LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnOrder = HowManyBRItemsToOrder( usItemIndex, LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnHand, BOBBY_RAY_NEW);
|
||||
|
||||
//if he found some to buy
|
||||
if( LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnOrder > 0 )
|
||||
{
|
||||
// if this is the first day the player is eligible to have access to this thing
|
||||
if ( !fPrevElig || gGameOptions.ubBobbyRay == BR_AWESOME )
|
||||
{
|
||||
// eliminate the ordering delay and stock the items instantly!
|
||||
// This is just a way to reward the player right away for making progress without the reordering lag...
|
||||
AddFreshBobbyRayInventory( usItemIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
OrderBobbyRItem(usItemIndex);
|
||||
|
||||
#ifdef BR_INVENTORY_TURNOVER_DEBUG
|
||||
if ( usItemIndex == ROCKET_LAUNCHER )
|
||||
MapScreenMessage( 0, MSG_DEBUG, L"%s: BR Ordered %d, Has %d", WORLDTIMESTR, LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnOrder, LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnHand );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DailyUpdateOfBobbyRaysUsedInventory()
|
||||
{
|
||||
INT16 i;
|
||||
UINT16 usItemIndex;
|
||||
BOOLEAN fPrevElig;
|
||||
|
||||
|
||||
//simulate other buyers by reducing the current quantity on hand
|
||||
SimulateBobbyRayCustomer(LaptopSaveInfo.BobbyRayUsedInventory, BOBBY_RAY_USED);
|
||||
|
||||
for(i = 0; i < LaptopSaveInfo.usInventoryListLength[BOBBY_RAY_USED]; i++)
|
||||
{
|
||||
//if the used item isn't already on order
|
||||
if( LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnOrder == 0 )
|
||||
{
|
||||
//if we don't have ANY
|
||||
if( LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnHand == 0 )
|
||||
{
|
||||
// the index is NOT the item #, get that from the table
|
||||
usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ i ].usItemIndex;
|
||||
Assert(usItemIndex < MAXITEMS);
|
||||
|
||||
// make sure this item is still sellable in the latest version of the store inventory
|
||||
if ( StoreInventory[ usItemIndex ][ BOBBY_RAY_USED ] == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// remember value of the "previously eligible" flag
|
||||
fPrevElig = LaptopSaveInfo.BobbyRayUsedInventory[ i ].fPreviouslyEligible;
|
||||
|
||||
//determine if any can/should be ordered, and how many
|
||||
LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnOrder = HowManyBRItemsToOrder(usItemIndex, LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnHand, BOBBY_RAY_USED);
|
||||
|
||||
//if he found some to buy
|
||||
if( LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnOrder > 0 )
|
||||
{
|
||||
// if this is the first day the player is eligible to have access to this thing
|
||||
if ( !fPrevElig || gGameOptions.ubBobbyRay == BR_AWESOME )
|
||||
{
|
||||
// eliminate the ordering delay and stock the items instantly!
|
||||
// This is just a way to reward the player right away for making progress without the reordering lag...
|
||||
AddFreshBobbyRayInventory( usItemIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
OrderBobbyRItem((INT16) (usItemIndex + BOBBY_R_USED_PURCHASE_OFFSET));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//returns the number of items to order
|
||||
UINT8 HowManyBRItemsToOrder(UINT16 usItemIndex, UINT8 ubCurrentlyOnHand, UINT8 ubBobbyRayNewUsed )
|
||||
{
|
||||
UINT8 ubItemsOrdered = 0;
|
||||
|
||||
|
||||
Assert(usItemIndex < MAXITEMS);
|
||||
// formulas below will fail if there are more items already in stock than optimal
|
||||
Assert(ubCurrentlyOnHand <= StoreInventory[ usItemIndex ][ ubBobbyRayNewUsed ]);
|
||||
Assert(ubBobbyRayNewUsed < BOBBY_RAY_LISTS);
|
||||
|
||||
|
||||
// decide if he can get stock for this item (items are reordered an entire batch at a time)
|
||||
if (ItemTransactionOccurs( -1, usItemIndex, DEALER_BUYING, ubBobbyRayNewUsed ))
|
||||
{
|
||||
if (ubBobbyRayNewUsed == BOBBY_RAY_NEW)
|
||||
{
|
||||
ubItemsOrdered = HowManyItemsToReorder(StoreInventory[ usItemIndex ][ ubBobbyRayNewUsed ] * gGameOptions.ubBobbyRay, ubCurrentlyOnHand);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Since these are used items we only should order 1 of each type
|
||||
ubItemsOrdered = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// can't obtain this item from suppliers
|
||||
ubItemsOrdered = 0;
|
||||
}
|
||||
|
||||
|
||||
return(ubItemsOrdered);
|
||||
}
|
||||
|
||||
|
||||
void OrderBobbyRItem(UINT16 usItemIndex)
|
||||
{
|
||||
UINT32 uiArrivalTime;
|
||||
|
||||
//add the new item to the queue. The new item will arrive in 'uiArrivalTime' minutes.
|
||||
uiArrivalTime = BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME + Random( BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME / 2 );
|
||||
uiArrivalTime += GetWorldTotalMin();
|
||||
AddStrategicEvent( EVENT_UPDATE_BOBBY_RAY_INVENTORY, uiArrivalTime, usItemIndex);
|
||||
}
|
||||
|
||||
|
||||
void AddFreshBobbyRayInventory( UINT16 usItemIndex )
|
||||
{
|
||||
INT16 sInventorySlot;
|
||||
STORE_INVENTORY *pInventoryArray;
|
||||
BOOLEAN fUsed;
|
||||
UINT8 ubItemQuality;
|
||||
|
||||
|
||||
if( usItemIndex >= BOBBY_R_USED_PURCHASE_OFFSET )
|
||||
{
|
||||
usItemIndex -= BOBBY_R_USED_PURCHASE_OFFSET;
|
||||
pInventoryArray = LaptopSaveInfo.BobbyRayUsedInventory;
|
||||
fUsed = BOBBY_RAY_USED;
|
||||
ubItemQuality = 20 + (UINT8) Random( 60 );
|
||||
}
|
||||
else
|
||||
{
|
||||
pInventoryArray = LaptopSaveInfo.BobbyRayInventory;
|
||||
fUsed = BOBBY_RAY_NEW;
|
||||
ubItemQuality = 100;
|
||||
}
|
||||
|
||||
|
||||
// find out which inventory slot that item is stored in
|
||||
sInventorySlot = GetInventorySlotForItem(pInventoryArray, usItemIndex, fUsed);
|
||||
if (sInventorySlot == -1)
|
||||
{
|
||||
AssertMsg( FALSE, String( "AddFreshBobbyRayInventory(), Item %d not found. AM-0.", usItemIndex ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
pInventoryArray[ sInventorySlot ].ubQtyOnHand += pInventoryArray[ sInventorySlot ].ubQtyOnOrder;
|
||||
pInventoryArray[ sInventorySlot ].ubItemQuality = ubItemQuality;
|
||||
|
||||
#ifdef BR_INVENTORY_TURNOVER_DEBUG
|
||||
if ( usItemIndex == ROCKET_LAUNCHER && !fUsed )
|
||||
MapScreenMessage( 0, MSG_DEBUG, L"%s: BR Bought %d, Has %d", WORLDTIMESTR, pInventoryArray[ sInventorySlot ].ubQtyOnOrder, pInventoryArray[ sInventorySlot ].ubQtyOnHand );
|
||||
#endif
|
||||
|
||||
// cancel order
|
||||
pInventoryArray[ sInventorySlot ].ubQtyOnOrder = 0;
|
||||
}
|
||||
|
||||
|
||||
INT16 GetInventorySlotForItem(STORE_INVENTORY *pInventoryArray, UINT16 usItemIndex, BOOLEAN fUsed)
|
||||
{
|
||||
INT16 i;
|
||||
|
||||
for(i = 0; i < LaptopSaveInfo.usInventoryListLength[fUsed]; i++)
|
||||
{
|
||||
//if we have some of this item in stock
|
||||
if( pInventoryArray[ i ].usItemIndex == usItemIndex)
|
||||
{
|
||||
return(i);
|
||||
}
|
||||
}
|
||||
|
||||
// not found!
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
void SimulateBobbyRayCustomer(STORE_INVENTORY *pInventoryArray, BOOLEAN fUsed)
|
||||
{
|
||||
INT16 i;
|
||||
UINT8 ubItemsSold;
|
||||
|
||||
//loop through all items BR can stock to see what gets sold
|
||||
for(i = 0; i < LaptopSaveInfo.usInventoryListLength[fUsed]; i++)
|
||||
{
|
||||
//if we have some of this item in stock
|
||||
if( pInventoryArray[ i ].ubQtyOnHand > 0)
|
||||
{
|
||||
ubItemsSold = HowManyItemsAreSold( -1, pInventoryArray[ i ].usItemIndex, pInventoryArray[ i ].ubQtyOnHand, fUsed);
|
||||
pInventoryArray[ i ].ubQtyOnHand -= ubItemsSold;
|
||||
|
||||
#ifdef BR_INVENTORY_TURNOVER_DEBUG
|
||||
if (ubItemsSold > 0 )
|
||||
{
|
||||
if ( i == ROCKET_LAUNCHER && !fUsed )
|
||||
MapScreenMessage( 0, MSG_DEBUG, L"%s: BR Sold %d, Has %d", WORLDTIMESTR, ubItemsSold, pInventoryArray[ i ].ubQtyOnHand );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CancelAllPendingBRPurchaseOrders(void)
|
||||
{
|
||||
INT16 i;
|
||||
|
||||
// remove all the BR-Order events off the event queue
|
||||
DeleteAllStrategicEventsOfType( EVENT_UPDATE_BOBBY_RAY_INVENTORY );
|
||||
|
||||
// zero out all the quantities on order
|
||||
for(i = 0; i < MAXITEMS; i++)
|
||||
{
|
||||
if ( Item[i].usItemClass == 0 )
|
||||
break;
|
||||
LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnOrder = 0;
|
||||
LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnOrder = 0;
|
||||
}
|
||||
|
||||
// do an extra daily update immediately to create new reorders ASAP
|
||||
DailyUpdateOfBobbyRaysNewInventory();
|
||||
DailyUpdateOfBobbyRaysUsedInventory();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
#ifndef __BOBBYR_H
|
||||
#define __BOBBYR_H
|
||||
|
||||
#include "Item Types.h"
|
||||
#include "Store Inventory.h"
|
||||
|
||||
|
||||
void GameInitBobbyR();
|
||||
BOOLEAN EnterBobbyR();
|
||||
void ExitBobbyR();
|
||||
void HandleBobbyR();
|
||||
void RenderBobbyR();
|
||||
|
||||
|
||||
#define BOBBYR_BACKGROUND_WIDTH 125
|
||||
#define BOBBYR_BACKGROUND_HEIGHT 100
|
||||
#define BOBBYR_NUM_HORIZONTAL_TILES 4
|
||||
#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
|
||||
|
||||
|
||||
/*
|
||||
extern UINT16 gusFirstGunIndex;
|
||||
extern UINT16 gusLastGunIndex;
|
||||
extern UINT8 gubNumGunPages;
|
||||
|
||||
extern UINT16 gusFirstAmmoIndex;
|
||||
extern UINT16 gusLastAmmoIndex;
|
||||
extern UINT8 gubNumAmmoPages;
|
||||
|
||||
extern UINT16 gusFirstMiscIndex;
|
||||
extern UINT16 gusLastMiscIndex;
|
||||
extern UINT8 gubNumMiscPages;
|
||||
|
||||
extern UINT16 gusFirstArmourIndex;
|
||||
extern UINT16 gusLastArmourIndex;
|
||||
extern UINT8 gubNumArmourPages;
|
||||
|
||||
extern UINT16 gusFirstUsedIndex;
|
||||
extern UINT16 gusLastUsedIndex;
|
||||
extern UINT8 gubNumUsedPages;
|
||||
*/
|
||||
|
||||
extern UINT32 guiLastBobbyRayPage;
|
||||
|
||||
|
||||
//BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16 usHeight, UINT32 uiBackGround);
|
||||
BOOLEAN DrawBobbyRWoodBackground();
|
||||
BOOLEAN DeleteBobbyRWoodBackground();
|
||||
BOOLEAN InitBobbyRWoodBackground();
|
||||
void DailyUpdateOfBobbyRaysNewInventory();
|
||||
void DailyUpdateOfBobbyRaysUsedInventory();
|
||||
void OrderBobbyRItem(UINT16 usItemIndex);
|
||||
void AddFreshBobbyRayInventory( UINT16 usItemIndex );
|
||||
void InitBobbyRayInventory();
|
||||
BOOLEAN InitBobbyRayNewInventory();
|
||||
BOOLEAN InitBobbyRayUsedInventory();
|
||||
UINT8 HowManyBRItemsToOrder(UINT16 usItemIndex, UINT8 ubCurrentlyOnHand, UINT8 ubBobbyRayNewUsed);
|
||||
void CancelAllPendingBRPurchaseOrders(void);
|
||||
INT16 GetInventorySlotForItem(STORE_INVENTORY *pInventoryArray, UINT16 usItemIndex, BOOLEAN fUsed);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "BobbyRAmmo.h"
|
||||
#include "BobbyRGuns.h"
|
||||
#include "BobbyR.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "interface items.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "text.h"
|
||||
#endif
|
||||
|
||||
UINT32 guiAmmoBackground;
|
||||
UINT32 guiAmmoGrid;
|
||||
|
||||
BOOLEAN DisplayAmmoInfo();
|
||||
|
||||
|
||||
void GameInitBobbyRAmmo()
|
||||
{
|
||||
}
|
||||
|
||||
BOOLEAN EnterBobbyRAmmo()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// load the background graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\ammobackground.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiAmmoBackground));
|
||||
|
||||
// load the gunsgrid graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\ammogrid.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiAmmoGrid));
|
||||
|
||||
InitBobbyBrTitle();
|
||||
|
||||
|
||||
SetFirstLastPagesForNew( IC_AMMO );
|
||||
// CalculateFirstAndLastIndexs();
|
||||
|
||||
//Draw menu bar
|
||||
InitBobbyMenuBar( );
|
||||
|
||||
RenderBobbyRAmmo( );
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitBobbyRAmmo()
|
||||
{
|
||||
DeleteVideoObjectFromIndex(guiAmmoBackground);
|
||||
DeleteVideoObjectFromIndex(guiAmmoGrid);
|
||||
DeleteBobbyMenuBar();
|
||||
|
||||
DeleteBobbyBrTitle();
|
||||
DeleteMouseRegionForBigImage();
|
||||
|
||||
giCurrentSubPage = gusCurWeaponIndex;
|
||||
guiLastBobbyRayPage = LAPTOP_MODE_BOBBY_R_AMMO;
|
||||
}
|
||||
|
||||
void HandleBobbyRAmmo()
|
||||
{
|
||||
}
|
||||
|
||||
void RenderBobbyRAmmo()
|
||||
{
|
||||
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();
|
||||
|
||||
// GunForm
|
||||
GetVideoObject(&hPixHandle, guiAmmoGrid);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DisplayItemInfo(IC_AMMO);
|
||||
|
||||
UpdateButtonText(guiCurrentLaptopMode);
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef __BOBBYRAMMO_H
|
||||
#define __BOBBYRAMMO_H
|
||||
|
||||
void GameInitBobbyRAmmo();
|
||||
BOOLEAN EnterBobbyRAmmo();
|
||||
void ExitBobbyRAmmo();
|
||||
void HandleBobbyRAmmo();
|
||||
void RenderBobbyRAmmo();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "BobbyRArmour.h"
|
||||
#include "BobbyRGuns.h"
|
||||
#include "BobbyR.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
UINT32 guiArmourBackground;
|
||||
UINT32 guiArmourGrid;
|
||||
|
||||
|
||||
|
||||
void GameInitBobbyRArmour()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterBobbyRArmour()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// load the background graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\Armourbackground.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiArmourBackground));
|
||||
|
||||
// load the gunsgrid graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\Armourgrid.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiArmourGrid));
|
||||
|
||||
InitBobbyBrTitle();
|
||||
//Draw menu bar
|
||||
InitBobbyMenuBar( );
|
||||
|
||||
SetFirstLastPagesForNew( IC_ARMOUR );
|
||||
// CalculateFirstAndLastIndexs();
|
||||
|
||||
RenderBobbyRArmour( );
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitBobbyRArmour()
|
||||
{
|
||||
DeleteVideoObjectFromIndex(guiArmourBackground);
|
||||
DeleteVideoObjectFromIndex(guiArmourGrid);
|
||||
DeleteBobbyMenuBar();
|
||||
|
||||
DeleteBobbyBrTitle();
|
||||
DeleteMouseRegionForBigImage();
|
||||
|
||||
giCurrentSubPage = gusCurWeaponIndex;
|
||||
guiLastBobbyRayPage = LAPTOP_MODE_BOBBY_R_ARMOR;
|
||||
}
|
||||
|
||||
void HandleBobbyRArmour()
|
||||
{
|
||||
}
|
||||
|
||||
void RenderBobbyRArmour()
|
||||
{
|
||||
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiArmourBackground);
|
||||
|
||||
//Display title at top of page
|
||||
DisplayBobbyRBrTitle();
|
||||
|
||||
// GunForm
|
||||
GetVideoObject(&hPixHandle, guiArmourGrid);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DisplayItemInfo(IC_ARMOUR);
|
||||
|
||||
UpdateButtonText(guiCurrentLaptopMode);
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef __BOBBYRARMOUR_H
|
||||
#define __BOBBYRARMOUR_H
|
||||
|
||||
void GameInitBobbyRArmour();
|
||||
BOOLEAN EnterBobbyRArmour();
|
||||
void ExitBobbyRArmour();
|
||||
void HandleBobbyRArmour();
|
||||
void RenderBobbyRArmour();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
||||
#ifndef __BOBBYRGUNS_H
|
||||
#define __BOBBYRGUNS_H
|
||||
|
||||
//#include "LaptopSave.h"
|
||||
|
||||
|
||||
#define BOBBYRDESCFILE "BINARYDATA\\BrayDesc.edt"
|
||||
|
||||
#define BOBBYR_ITEM_DESC_NAME_SIZE 160
|
||||
#define BOBBYR_ITEM_DESC_INFO_SIZE 640
|
||||
#define BOBBYR_ITEM_DESC_FILE_SIZE 800
|
||||
|
||||
#define BOBBYR_USED_ITEMS 0xFFFFFFFF
|
||||
|
||||
|
||||
#define BOBBYR_GUNS_BUTTON_FONT FONT10ARIAL
|
||||
#define BOBBYR_GUNS_TEXT_COLOR_ON FONT_NEARBLACK
|
||||
#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
|
||||
|
||||
#define BOBBYR_GUNS_SHADOW_COLOR 169
|
||||
|
||||
#define BOBBYR_NO_ITEMS 65535
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern UINT16 gusCurWeaponIndex;
|
||||
extern UINT8 gubLastGunIndex;
|
||||
|
||||
|
||||
|
||||
void GameInitBobbyRGuns();
|
||||
BOOLEAN EnterBobbyRGuns();
|
||||
void ExitBobbyRGuns();
|
||||
void HandleBobbyRGuns();
|
||||
void RenderBobbyRGuns();
|
||||
|
||||
|
||||
BOOLEAN DisplayBobbyRBrTitle();
|
||||
BOOLEAN DeleteBobbyBrTitle();
|
||||
BOOLEAN InitBobbyBrTitle();
|
||||
BOOLEAN InitBobbyMenuBar( );
|
||||
BOOLEAN DeleteBobbyMenuBar();
|
||||
|
||||
//BOOLEAN DisplayWeaponInfo();
|
||||
BOOLEAN DisplayItemInfo(UINT32 uiItemClass);
|
||||
void DeleteMouseRegionForBigImage();
|
||||
void UpdateButtonText(UINT32 uiCurPage);
|
||||
void EnterInitBobbyRGuns();
|
||||
void DailyUpdateOfBobbyRaysUsedInventory();
|
||||
UINT16 CalcBobbyRayCost( UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
||||
//void CalculateFirstAndLastIndexs();
|
||||
void SetFirstLastPagesForUsed();
|
||||
void SetFirstLastPagesForNew( UINT32 uiClass );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,87 @@
|
||||
#ifndef __BOBBYRMAILORDER_H
|
||||
#define __BOBBYRMAILORDER_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//enums for the various destinations that are available in the bobbyR dest drop down box
|
||||
enum
|
||||
{
|
||||
BR_AUSTIN,
|
||||
BR_BAGHDAD,
|
||||
BR_DRASSEN,
|
||||
BR_HONG_KONG,
|
||||
BR_BEIRUT,
|
||||
BR_LONDON,
|
||||
BR_LOS_ANGELES,
|
||||
BR_MEDUNA,
|
||||
BR_METAVIRA,
|
||||
BR_MIAMI,
|
||||
BR_MOSCOW,
|
||||
BR_NEW_YORK,
|
||||
BR_OTTAWA,
|
||||
BR_PARIS,
|
||||
BR_TRIPOLI,
|
||||
BR_TOKYO,
|
||||
BR_VANCOUVER,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void GameInitBobbyRMailOrder();
|
||||
BOOLEAN EnterBobbyRMailOrder();
|
||||
void ExitBobbyRMailOrder();
|
||||
void HandleBobbyRMailOrder();
|
||||
void RenderBobbyRMailOrder();
|
||||
|
||||
void BobbyRayMailOrderEndGameShutDown();
|
||||
void EnterInitBobbyRayOrder();
|
||||
void AddJohnsGunShipment();
|
||||
|
||||
BOOLEAN CreateBobbyRayOrderTitle();
|
||||
void DestroyBobbyROrderTitle();
|
||||
void DrawBobbyROrderTitle();
|
||||
|
||||
void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16 usGridY, BobbyRayPurchaseStruct *pBobbyRayPurchase, BOOLEAN fJustDisplayTitles, INT32 iOrderNum );
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOLEAN fActive;
|
||||
UINT8 ubDeliveryLoc; // the city the shipment is going to
|
||||
UINT8 ubDeliveryMethod; // type of delivery: next day, 2 days ...
|
||||
BobbyRayPurchaseStruct BobbyRayPurchase[ MAX_PURCHASE_AMOUNT ];
|
||||
UINT8 ubNumberPurchases;
|
||||
|
||||
UINT32 uiPackageWeight;
|
||||
UINT32 uiOrderedOnDayNum;
|
||||
|
||||
BOOLEAN fDisplayedInShipmentPage;
|
||||
|
||||
UINT8 ubFiller[7];
|
||||
} NewBobbyRayOrderStruct;
|
||||
|
||||
|
||||
extern NewBobbyRayOrderStruct *gpNewBobbyrShipments;
|
||||
extern INT32 giNumberOfNewBobbyRShipment;
|
||||
|
||||
BOOLEAN AddNewBobbyRShipment( BobbyRayPurchaseStruct *pPurchaseStruct, UINT8 ubDeliveryLoc, UINT8 ubDeliveryMethod, BOOLEAN fPruchasedFromBobbyR, UINT32 uiPackageWeight );
|
||||
|
||||
UINT16 CountNumberOfBobbyPurchasesThatAreInTransit();
|
||||
|
||||
BOOLEAN NewWayOfLoadingBobbyRMailOrdersToSaveGameFile( HWFILE hFile );
|
||||
BOOLEAN NewWayOfSavingBobbyRMailOrdersToSaveGameFile( HWFILE hFile );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "BobbyRMisc.h"
|
||||
#include "BobbyR.h"
|
||||
#include "BobbyRGuns.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
UINT32 guiMiscBackground;
|
||||
UINT32 guiMiscGrid;
|
||||
|
||||
|
||||
|
||||
void GameInitBobbyRMisc()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterBobbyRMisc()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// load the background graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\miscbackground.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMiscBackground));
|
||||
|
||||
// load the gunsgrid graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\miscgrid.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMiscGrid));
|
||||
|
||||
InitBobbyBrTitle();
|
||||
//Draw menu bar
|
||||
InitBobbyMenuBar( );
|
||||
|
||||
SetFirstLastPagesForNew( IC_BOBBY_MISC );
|
||||
// CalculateFirstAndLastIndexs();
|
||||
|
||||
RenderBobbyRMisc( );
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitBobbyRMisc()
|
||||
{
|
||||
DeleteVideoObjectFromIndex(guiMiscBackground);
|
||||
DeleteVideoObjectFromIndex(guiMiscGrid);
|
||||
DeleteBobbyBrTitle();
|
||||
DeleteMouseRegionForBigImage();
|
||||
DeleteBobbyMenuBar();
|
||||
|
||||
guiLastBobbyRayPage = LAPTOP_MODE_BOBBY_R_MISC;
|
||||
}
|
||||
|
||||
void HandleBobbyRMisc()
|
||||
{
|
||||
}
|
||||
|
||||
void RenderBobbyRMisc()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiMiscBackground);
|
||||
|
||||
//Display title at top of page
|
||||
DisplayBobbyRBrTitle();
|
||||
|
||||
// GunForm
|
||||
GetVideoObject(&hPixHandle, guiMiscGrid);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DisplayItemInfo(IC_BOBBY_MISC);
|
||||
|
||||
UpdateButtonText(guiCurrentLaptopMode);
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef __BOBBYRMISC_H
|
||||
#define __BOBBYRMISC_H
|
||||
|
||||
void GameInitBobbyRMisc();
|
||||
BOOLEAN EnterBobbyRMisc();
|
||||
void ExitBobbyRMisc();
|
||||
void HandleBobbyRMisc();
|
||||
void RenderBobbyRMisc();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,417 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#include "BobbyRShipments.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "BobbyRShipments.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define BOBBYR_SHIPMENT_TITLE_TEXT_FONT FONT14ARIAL
|
||||
#define BOBBYR_SHIPMENT_TITLE_TEXT_COLOR 157
|
||||
|
||||
#define BOBBYR_SHIPMENT_STATIC_TEXT_FONT FONT12ARIAL
|
||||
#define BOBBYR_SHIPMENT_STATIC_TEXT_COLOR 145
|
||||
|
||||
|
||||
#define BOBBYR_BOBBY_RAY_TITLE_X LAPTOP_SCREEN_UL_X + 171
|
||||
#define BOBBYR_BOBBY_RAY_TITLE_Y LAPTOP_SCREEN_WEB_UL_Y + 3
|
||||
|
||||
#define BOBBYR_ORDER_FORM_TITLE_X BOBBYR_BOBBY_RAY_TITLE_X
|
||||
#define BOBBYR_ORDER_FORM_TITLE_Y BOBBYR_BOBBY_RAY_TITLE_Y + 37
|
||||
#define BOBBYR_ORDER_FORM_TITLE_WIDTH 159
|
||||
|
||||
#define BOBBYR_SHIPMENT_DELIVERY_GRID_X LAPTOP_SCREEN_UL_X + 2
|
||||
#define BOBBYR_SHIPMENT_DELIVERY_GRID_Y BOBBYR_SHIPMENT_ORDER_GRID_Y
|
||||
#define BOBBYR_SHIPMENT_DELIVERY_GRID_WIDTH 183
|
||||
|
||||
#define BOBBYR_SHIPMENT_ORDER_GRID_X LAPTOP_SCREEN_UL_X + 223
|
||||
#define BOBBYR_SHIPMENT_ORDER_GRID_Y LAPTOP_SCREEN_WEB_UL_Y + 62
|
||||
|
||||
|
||||
#define BOBBYR_SHIPMENT_BACK_BUTTON_X iScreenWidthOffset + 130
|
||||
#define BOBBYR_SHIPMENT_BACK_BUTTON_Y iScreenHeightOffset + 400 + LAPTOP_SCREEN_WEB_DELTA_Y + 4
|
||||
|
||||
#define BOBBYR_SHIPMENT_HOME_BUTTON_X iScreenWidthOffset + 515
|
||||
#define BOBBYR_SHIPMENT_HOME_BUTTON_Y BOBBYR_SHIPMENT_BACK_BUTTON_Y
|
||||
|
||||
#define BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS 13
|
||||
|
||||
|
||||
|
||||
#define BOBBYR_SHIPMENT_ORDER_NUM_X iScreenWidthOffset + 116//LAPTOP_SCREEN_UL_X + 9
|
||||
#define BOBBYR_SHIPMENT_ORDER_NUM_START_Y iScreenHeightOffset + 144
|
||||
#define BOBBYR_SHIPMENT_ORDER_NUM_WIDTH 64
|
||||
|
||||
#define BOBBYR_SHIPMENT_GAP_BTN_LINES 20
|
||||
|
||||
|
||||
#define BOBBYR_SHIPMENT_SHIPMENT_ORDER_NUM_X BOBBYR_SHIPMENT_ORDER_NUM_X
|
||||
#define BOBBYR_SHIPMENT_SHIPMENT_ORDER_NUM_Y iScreenHeightOffset + 117
|
||||
|
||||
#define BOBBYR_SHIPMENT_NUM_ITEMS_X iScreenWidthOffset + 183//BOBBYR_SHIPMENT_ORDER_NUM_X+BOBBYR_SHIPMENT_ORDER_NUM_WIDTH+2
|
||||
#define BOBBYR_SHIPMENT_NUM_ITEMS_Y BOBBYR_SHIPMENT_SHIPMENT_ORDER_NUM_Y
|
||||
#define BOBBYR_SHIPMENT_NUM_ITEMS_WIDTH 116
|
||||
|
||||
//#define BOBBYR_SHIPMENT_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UINT32 guiBobbyRShipmentGrid;
|
||||
|
||||
BOOLEAN gfBobbyRShipmentsDirty = FALSE;
|
||||
|
||||
INT32 giBobbyRShipmentSelectedShipment = -1;
|
||||
|
||||
//Back Button
|
||||
void BtnBobbyRShipmentBackCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiBobbyRShipmetBack;
|
||||
INT32 guiBobbyRShipmentBackImage;
|
||||
|
||||
//Home Button
|
||||
void BtnBobbyRShipmentHomeCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiBobbyRShipmentHome;
|
||||
INT32 giBobbyRShipmentHomeImage;
|
||||
|
||||
|
||||
|
||||
MOUSE_REGION gSelectedPreviousShipmentsRegion[BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS];
|
||||
void SelectPreviousShipmentsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
|
||||
void DisplayShipmentGrid();
|
||||
void DisplayPreviousShipments();
|
||||
void DisplayShipmentTitles();
|
||||
void RemovePreviousShipmentsMouseRegions();
|
||||
void CreatePreviousShipmentsMouseRegions();
|
||||
INT32 CountNumberValidShipmentForTheShipmentsPage();
|
||||
//ppp
|
||||
|
||||
|
||||
//
|
||||
// Function
|
||||
//
|
||||
|
||||
void GameInitBobbyRShipments()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN EnterBobbyRShipments()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
InitBobbyRWoodBackground();
|
||||
|
||||
// load the Order Grid graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\BobbyRay_OnOrder.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyRShipmentGrid));
|
||||
|
||||
|
||||
guiBobbyRShipmentBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
||||
guiBobbyRShipmetBack = CreateIconAndTextButton( guiBobbyRShipmentBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||
TEXT_CJUSTIFIED,
|
||||
BOBBYR_SHIPMENT_BACK_BUTTON_X, BOBBYR_SHIPMENT_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRShipmentBackCallback);
|
||||
SetButtonCursor( guiBobbyRShipmetBack, CURSOR_LAPTOP_SCREEN);
|
||||
|
||||
|
||||
giBobbyRShipmentHomeImage = UseLoadedButtonImage( guiBobbyRShipmentBackImage, -1,0,-1,1,-1 );
|
||||
guiBobbyRShipmentHome = CreateIconAndTextButton( giBobbyRShipmentHomeImage, BobbyROrderFormText[BOBBYR_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||
TEXT_CJUSTIFIED,
|
||||
BOBBYR_SHIPMENT_HOME_BUTTON_X, BOBBYR_SHIPMENT_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRShipmentHomeCallback);
|
||||
SetButtonCursor( guiBobbyRShipmentHome, CURSOR_LAPTOP_SCREEN);
|
||||
|
||||
CreateBobbyRayOrderTitle();
|
||||
|
||||
giBobbyRShipmentSelectedShipment = -1;
|
||||
|
||||
//if there are shipments
|
||||
if( giNumberOfNewBobbyRShipment != 0 )
|
||||
{
|
||||
INT32 iCnt;
|
||||
|
||||
//get the first shipment #
|
||||
for( iCnt=0; iCnt<giNumberOfNewBobbyRShipment; iCnt++ )
|
||||
{
|
||||
if( gpNewBobbyrShipments[iCnt].fActive )
|
||||
giBobbyRShipmentSelectedShipment = iCnt;
|
||||
}
|
||||
}
|
||||
|
||||
CreatePreviousShipmentsMouseRegions();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void ExitBobbyRShipments()
|
||||
{
|
||||
DeleteBobbyRWoodBackground();
|
||||
DestroyBobbyROrderTitle();
|
||||
|
||||
DeleteVideoObjectFromIndex(guiBobbyRShipmentGrid);
|
||||
|
||||
UnloadButtonImage( guiBobbyRShipmentBackImage );
|
||||
UnloadButtonImage( giBobbyRShipmentHomeImage );
|
||||
RemoveButton( guiBobbyRShipmetBack );
|
||||
RemoveButton( guiBobbyRShipmentHome );
|
||||
|
||||
RemovePreviousShipmentsMouseRegions();
|
||||
}
|
||||
|
||||
void HandleBobbyRShipments()
|
||||
{
|
||||
if( gfBobbyRShipmentsDirty )
|
||||
{
|
||||
gfBobbyRShipmentsDirty = FALSE;
|
||||
|
||||
RenderBobbyRShipments();
|
||||
}
|
||||
}
|
||||
|
||||
void RenderBobbyRShipments()
|
||||
{
|
||||
// HVOBJECT hPixHandle;
|
||||
|
||||
DrawBobbyRWoodBackground();
|
||||
|
||||
DrawBobbyROrderTitle();
|
||||
|
||||
//Output the title
|
||||
DrawTextToScreen(gzBobbyRShipmentText[ BOBBYR_SHIPMENT__TITLE ], BOBBYR_ORDER_FORM_TITLE_X, BOBBYR_ORDER_FORM_TITLE_Y, BOBBYR_ORDER_FORM_TITLE_WIDTH, BOBBYR_SHIPMENT_TITLE_TEXT_FONT, BOBBYR_SHIPMENT_TITLE_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
DisplayShipmentGrid();
|
||||
|
||||
if( giBobbyRShipmentSelectedShipment != -1 &&
|
||||
gpNewBobbyrShipments[ giBobbyRShipmentSelectedShipment ].fActive &&
|
||||
gpNewBobbyrShipments[ giBobbyRShipmentSelectedShipment ].fDisplayedInShipmentPage )
|
||||
{
|
||||
// DisplayPurchasedItems( FALSE, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, &LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[giBobbyRShipmentSelectedShipment].BobbyRayPurchase[0], FALSE );
|
||||
DisplayPurchasedItems( FALSE, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, &gpNewBobbyrShipments[giBobbyRShipmentSelectedShipment].BobbyRayPurchase[0], FALSE, giBobbyRShipmentSelectedShipment );
|
||||
}
|
||||
else
|
||||
{
|
||||
// DisplayPurchasedItems( FALSE, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, &LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[giBobbyRShipmentSelectedShipment].BobbyRayPurchase[0], TRUE );
|
||||
DisplayPurchasedItems( FALSE, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, NULL, TRUE, giBobbyRShipmentSelectedShipment );
|
||||
}
|
||||
|
||||
DisplayShipmentTitles();
|
||||
DisplayPreviousShipments();
|
||||
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
void BtnBobbyRShipmentBackCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R_MAILORDER;
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnBobbyRShipmentHomeCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DisplayShipmentGrid()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
GetVideoObject(&hPixHandle, guiBobbyRShipmentGrid);
|
||||
|
||||
// Shipment Order Grid
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_SHIPMENT_DELIVERY_GRID_X, BOBBYR_SHIPMENT_DELIVERY_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Order Grid
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 1, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DisplayShipmentTitles()
|
||||
{
|
||||
//output the order #
|
||||
DrawTextToScreen( gzBobbyRShipmentText[BOBBYR_SHIPMENT__ORDERED_ON], BOBBYR_SHIPMENT_SHIPMENT_ORDER_NUM_X, BOBBYR_SHIPMENT_SHIPMENT_ORDER_NUM_Y, BOBBYR_SHIPMENT_ORDER_NUM_WIDTH, BOBBYR_SHIPMENT_STATIC_TEXT_FONT, BOBBYR_SHIPMENT_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
//Output the # of items
|
||||
DrawTextToScreen( gzBobbyRShipmentText[BOBBYR_SHIPMENT__NUM_ITEMS], BOBBYR_SHIPMENT_NUM_ITEMS_X, BOBBYR_SHIPMENT_NUM_ITEMS_Y, BOBBYR_SHIPMENT_NUM_ITEMS_WIDTH, BOBBYR_SHIPMENT_STATIC_TEXT_FONT, BOBBYR_SHIPMENT_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
}
|
||||
|
||||
void DisplayPreviousShipments()
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
CHAR16 zText[512];
|
||||
UINT16 usPosY = BOBBYR_SHIPMENT_ORDER_NUM_START_Y;
|
||||
UINT32 uiNumItems = CountNumberValidShipmentForTheShipmentsPage();
|
||||
UINT32 uiNumberItemsInShipments = 0;
|
||||
UINT32 uiItemCnt;
|
||||
UINT8 ubFontColor = BOBBYR_SHIPMENT_STATIC_TEXT_COLOR;
|
||||
|
||||
//loop through all the shipments
|
||||
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
||||
{
|
||||
//if it is a valid shipment, and can be displayed at bobby r
|
||||
if( gpNewBobbyrShipments[ uiCnt ].fActive &&
|
||||
gpNewBobbyrShipments[ giBobbyRShipmentSelectedShipment ].fDisplayedInShipmentPage )
|
||||
{
|
||||
if( uiCnt == (UINT32)giBobbyRShipmentSelectedShipment )
|
||||
{
|
||||
ubFontColor = FONT_MCOLOR_WHITE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ubFontColor = BOBBYR_SHIPMENT_STATIC_TEXT_COLOR;
|
||||
}
|
||||
|
||||
//Display the "ordered on day num"
|
||||
swprintf( zText, L"%s %d", gpGameClockString[0], gpNewBobbyrShipments[ uiCnt ].uiOrderedOnDayNum );
|
||||
DrawTextToScreen( zText, BOBBYR_SHIPMENT_ORDER_NUM_X, usPosY, BOBBYR_SHIPMENT_ORDER_NUM_WIDTH, BOBBYR_SHIPMENT_STATIC_TEXT_FONT, ubFontColor, 0, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
uiNumberItemsInShipments = 0;
|
||||
|
||||
// for( uiItemCnt=0; uiItemCnt<LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ uiCnt ].ubNumberPurchases; uiItemCnt++ )
|
||||
for( uiItemCnt=0; uiItemCnt<gpNewBobbyrShipments[ uiCnt ].ubNumberPurchases; uiItemCnt++ )
|
||||
{
|
||||
// uiNumberItemsInShipments += LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ uiCnt ].BobbyRayPurchase[uiItemCnt].ubNumberPurchased;
|
||||
uiNumberItemsInShipments += gpNewBobbyrShipments[ uiCnt ].BobbyRayPurchase[uiItemCnt].ubNumberPurchased;
|
||||
}
|
||||
|
||||
//Display the # of items
|
||||
swprintf( zText, L"%d", uiNumberItemsInShipments );
|
||||
DrawTextToScreen( zText, BOBBYR_SHIPMENT_NUM_ITEMS_X, usPosY, BOBBYR_SHIPMENT_NUM_ITEMS_WIDTH, BOBBYR_SHIPMENT_STATIC_TEXT_FONT, ubFontColor, 0, FALSE, CENTER_JUSTIFIED );
|
||||
usPosY += BOBBYR_SHIPMENT_GAP_BTN_LINES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CreatePreviousShipmentsMouseRegions()
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
UINT16 usPosY = BOBBYR_SHIPMENT_ORDER_NUM_START_Y;
|
||||
UINT16 usWidth = BOBBYR_SHIPMENT_DELIVERY_GRID_WIDTH;
|
||||
UINT16 usHeight = GetFontHeight( BOBBYR_SHIPMENT_STATIC_TEXT_FONT );
|
||||
UINT32 uiNumItems = CountNumberOfBobbyPurchasesThatAreInTransit();
|
||||
|
||||
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
||||
{
|
||||
MSYS_DefineRegion( &gSelectedPreviousShipmentsRegion[uiCnt], BOBBYR_SHIPMENT_ORDER_NUM_X, usPosY, (UINT16)(BOBBYR_SHIPMENT_ORDER_NUM_X+usWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectPreviousShipmentsRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedPreviousShipmentsRegion[uiCnt]);
|
||||
MSYS_SetRegionUserData( &gSelectedPreviousShipmentsRegion[uiCnt], 0, uiCnt);
|
||||
|
||||
usPosY += BOBBYR_SHIPMENT_GAP_BTN_LINES;
|
||||
}
|
||||
}
|
||||
|
||||
void RemovePreviousShipmentsMouseRegions()
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
UINT32 uiNumItems = CountNumberOfBobbyPurchasesThatAreInTransit();
|
||||
|
||||
|
||||
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
||||
{
|
||||
MSYS_RemoveRegion( &gSelectedPreviousShipmentsRegion[uiCnt] );
|
||||
}
|
||||
}
|
||||
|
||||
void SelectPreviousShipmentsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
INT32 iSlotID = MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
|
||||
if( CountNumberOfBobbyPurchasesThatAreInTransit() > iSlotID )
|
||||
{
|
||||
INT32 iCnt;
|
||||
INT32 iValidShipmentCounter=0;
|
||||
|
||||
giBobbyRShipmentSelectedShipment = -1;
|
||||
|
||||
//loop through and get the "x" iSlotID shipment
|
||||
for( iCnt=0; iCnt<giNumberOfNewBobbyRShipment; iCnt++ )
|
||||
{
|
||||
if( gpNewBobbyrShipments[iCnt].fActive )
|
||||
{
|
||||
if( iValidShipmentCounter == iSlotID )
|
||||
{
|
||||
giBobbyRShipmentSelectedShipment = iCnt;
|
||||
}
|
||||
|
||||
iValidShipmentCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gfBobbyRShipmentsDirty = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
INT32 CountNumberValidShipmentForTheShipmentsPage()
|
||||
{
|
||||
if( giNumberOfNewBobbyRShipment > BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS )
|
||||
return( BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS );
|
||||
else
|
||||
return( giNumberOfNewBobbyRShipment );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef _BOBBYR_SHIPMENTS__H_
|
||||
#define _BOBBYR_SHIPMENTS__H_
|
||||
|
||||
|
||||
|
||||
void GameInitBobbyRShipments();
|
||||
BOOLEAN EnterBobbyRShipments();
|
||||
void ExitBobbyRShipments();
|
||||
void HandleBobbyRShipments();
|
||||
void RenderBobbyRShipments();
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "BobbyRUsed.h"
|
||||
#include "BobbyR.h"
|
||||
#include "BobbyRGuns.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "Text.h"
|
||||
#include "LaptopSave.h"
|
||||
#endif
|
||||
|
||||
UINT32 guiUsedBackground;
|
||||
UINT32 guiUsedGrid;
|
||||
|
||||
|
||||
void GameInitBobbyRUsed()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterBobbyRUsed()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// 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();
|
||||
|
||||
SetFirstLastPagesForUsed();
|
||||
// CalculateFirstAndLastIndexs();
|
||||
|
||||
//Draw menu bar
|
||||
InitBobbyMenuBar( );
|
||||
|
||||
RenderBobbyRUsed( );
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitBobbyRUsed()
|
||||
{
|
||||
DeleteVideoObjectFromIndex(guiUsedBackground);
|
||||
DeleteVideoObjectFromIndex(guiUsedGrid);
|
||||
DeleteBobbyMenuBar();
|
||||
DeleteBobbyBrTitle();
|
||||
DeleteMouseRegionForBigImage();
|
||||
|
||||
giCurrentSubPage = gusCurWeaponIndex;
|
||||
guiLastBobbyRayPage = LAPTOP_MODE_BOBBY_R_USED;
|
||||
}
|
||||
|
||||
void HandleBobbyRUsed()
|
||||
{
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
UpdateButtonText(guiCurrentLaptopMode);
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef __BOBBYRUSED_H
|
||||
#define __BOBBYRUSED_H
|
||||
|
||||
void GameInitBobbyRUsed();
|
||||
BOOLEAN EnterBobbyRUsed();
|
||||
void ExitBobbyRUsed();
|
||||
void HandleBobbyRUsed();
|
||||
void RenderBobbyRUsed();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#include "BrokenLink.h"
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
#define BROKEN_LINK__FONT FONT12ARIAL
|
||||
#define BROKEN_LINK__COLOR FONT_MCOLOR_BLACK
|
||||
|
||||
#define BROKEN_LINK__MESSAGE_X LAPTOP_SCREEN_UL_X + 20
|
||||
#define BROKEN_LINK__MESSAGE_Y LAPTOP_SCREEN_UL_Y + 50
|
||||
#define BROKEN_LINK__MESSAGE_WIDTH (LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X)
|
||||
|
||||
#define BROKEN_LINK__SITE_NOT_FOUND_Y LAPTOP_SCREEN_UL_Y + 65
|
||||
|
||||
|
||||
void DrawBrokenLinkWhiteBackground();
|
||||
|
||||
|
||||
|
||||
BOOLEAN EnterBrokenLink()
|
||||
{
|
||||
// RenderBrokenLink();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitBrokenLink()
|
||||
{
|
||||
}
|
||||
|
||||
void HandleBrokenLink()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RenderBrokenLink()
|
||||
{
|
||||
//Color fill the laptop white
|
||||
DrawBrokenLinkWhiteBackground();
|
||||
|
||||
SetFontShadow( NO_SHADOW );
|
||||
|
||||
//Put up a message saying the link is dead
|
||||
DisplayWrappedString(BROKEN_LINK__MESSAGE_X, BROKEN_LINK__MESSAGE_Y, BROKEN_LINK__MESSAGE_WIDTH, 2, BROKEN_LINK__FONT, BROKEN_LINK__COLOR, BrokenLinkText[ BROKEN_LINK_TXT_ERROR_404 ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//Put up a message saying the link is dead
|
||||
DisplayWrappedString(BROKEN_LINK__MESSAGE_X, BROKEN_LINK__SITE_NOT_FOUND_Y, BROKEN_LINK__MESSAGE_WIDTH, 2, BROKEN_LINK__FONT, BROKEN_LINK__COLOR, BrokenLinkText[ BROKEN_LINK_TXT_SITE_NOT_FOUND ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
|
||||
InvalidateRegion(0,0,SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
|
||||
void DrawBrokenLinkWhiteBackground()
|
||||
{
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, Get16BPPColor( FROMRGB( 255, 255, 255) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _BROKEN_LINK__H_
|
||||
#define _BROKEN_LINK__H_
|
||||
|
||||
|
||||
|
||||
extern void RenderBrokenLink();
|
||||
extern void HandleBrokenLink();
|
||||
extern void ExitBrokenLink();
|
||||
extern BOOLEAN EnterBrokenLink();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,729 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#include "IMP Skill Trait.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "cursors.h"
|
||||
#include "CharProfile.h"
|
||||
#include "IMP AboutUs.h"
|
||||
#include "IMP Attribute Entrance.h"
|
||||
#include "IMP Attribute Finish.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Finish.h"
|
||||
#include "IMP Skill Trait.h"
|
||||
#include "IMP Portraits.h"
|
||||
#include "IMP Voices.h"
|
||||
#include "IMP Personality Entrance.h"
|
||||
#include "IMP Attribute Selection.h"
|
||||
#include "IMP Personality Quiz.h"
|
||||
#include "IMP Begin Screen.h"
|
||||
#include "IMP Personality Finish.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "IMP Confirm.h"
|
||||
#include "messageboxscreen.h"
|
||||
#endif
|
||||
|
||||
|
||||
//BOOLEAN fIMPCompletedFlag = FALSE;
|
||||
BOOLEAN fReDrawCharProfile = FALSE;
|
||||
BOOLEAN fButtonPendingFlag = FALSE;
|
||||
BOOLEAN fAddCreatedCharToPlayersTeam = FALSE;
|
||||
BOOLEAN fReEnterIMP = FALSE;
|
||||
|
||||
INT32 iCurrentImpPage = IMP_HOME_PAGE;
|
||||
INT32 iPreviousImpPage = -1;
|
||||
|
||||
|
||||
// attributes
|
||||
INT32 iStrength = 55;
|
||||
INT32 iDexterity = 55;
|
||||
INT32 iAgility = 55;
|
||||
INT32 iWisdom = 55;
|
||||
INT32 iLeadership =55;
|
||||
INT32 iHealth = 55;
|
||||
|
||||
// skills
|
||||
INT32 iMarksmanship = 55;
|
||||
INT32 iMedical = 55;
|
||||
INT32 iExplosives = 55;
|
||||
INT32 iMechanical = 55;
|
||||
|
||||
// gender
|
||||
BOOLEAN fCharacterIsMale = TRUE;
|
||||
|
||||
// name and nick name
|
||||
CHAR16 pFullName[ 32 ];
|
||||
CHAR16 pNickName[ 32 ];
|
||||
|
||||
// skills
|
||||
INT32 iSkillA = 0;
|
||||
INT32 iSkillB = 0;
|
||||
|
||||
// personality
|
||||
INT32 iPersonality = 0;
|
||||
|
||||
// attitude
|
||||
INT32 iAttitude = 0;
|
||||
|
||||
|
||||
// additives, but no preservatives
|
||||
INT32 iAddStrength = 0;
|
||||
INT32 iAddDexterity = 0;
|
||||
INT32 iAddAgility= 0;
|
||||
INT32 iAddWisdom= 0;
|
||||
INT32 iAddHealth = 0;
|
||||
INT32 iAddLeadership = 0;
|
||||
|
||||
INT32 iAddMarksmanship = 0;
|
||||
INT32 iAddMedical = 0;
|
||||
INT32 iAddExplosives = 0;
|
||||
INT32 iAddMechanical = 0;
|
||||
|
||||
|
||||
// IMP global buttons
|
||||
INT32 giIMPButton[1];
|
||||
INT32 giIMPButtonImage[1];
|
||||
|
||||
// visted subpages
|
||||
BOOLEAN fVisitedIMPSubPages[ IMP_NUM_PAGES ];
|
||||
extern INT32 iCurrentPortrait;
|
||||
extern iCurrentVoices;
|
||||
extern INT32 giMaxPersonalityQuizQuestion;
|
||||
extern BOOLEAN fStartOverFlag;
|
||||
|
||||
void ExitOldIMPMode( void );
|
||||
void EnterNewIMPMode( void );
|
||||
void LoadImpGraphics( void );
|
||||
void RemoveImpGraphics( void );
|
||||
void CreateIMPButtons( void );
|
||||
void DestroyIMPButtons( void );
|
||||
void BtnIMPCancelCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
BOOLEAN HasTheCurrentIMPPageBeenVisited( void );
|
||||
extern void SetAttributes( void );
|
||||
|
||||
|
||||
void GameInitCharProfile()
|
||||
{
|
||||
LaptopSaveInfo.iVoiceId = 0;
|
||||
iCurrentPortrait = 0;
|
||||
iCurrentVoices = 0;
|
||||
iPortraitNumber = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void EnterCharProfile()
|
||||
{
|
||||
// reset previous page
|
||||
iPreviousImpPage = -1;
|
||||
|
||||
// grab the graphics
|
||||
LoadImpGraphics( );
|
||||
}
|
||||
|
||||
void ExitCharProfile()
|
||||
{
|
||||
// get rid of graphics
|
||||
RemoveImpGraphics( );
|
||||
|
||||
// clean up past mode
|
||||
ExitOldIMPMode( );
|
||||
}
|
||||
|
||||
void HandleCharProfile()
|
||||
{
|
||||
if( fReDrawCharProfile )
|
||||
{
|
||||
// re draw
|
||||
RenderCharProfile( );
|
||||
fReDrawCharProfile = FALSE;
|
||||
|
||||
}
|
||||
|
||||
// button pending, but not changing mode, still need a rernder, but under different circumstances
|
||||
if( ( fButtonPendingFlag == TRUE )&&( iCurrentImpPage == iPreviousImpPage ) )
|
||||
{
|
||||
RenderCharProfile( );
|
||||
}
|
||||
|
||||
// page has changed, handle the fact..get rid of old page, load up new, and re render
|
||||
if( ( iCurrentImpPage != iPreviousImpPage ) )
|
||||
{
|
||||
if( fDoneLoadPending == FALSE )
|
||||
{
|
||||
//make sure we are not hosing memory
|
||||
Assert( iCurrentImpPage <= IMP_NUM_PAGES );
|
||||
|
||||
|
||||
fFastLoadFlag = HasTheCurrentIMPPageBeenVisited( );
|
||||
fVisitedIMPSubPages[ iCurrentImpPage ] = TRUE;
|
||||
fConnectingToSubPage = TRUE;
|
||||
|
||||
if( iPreviousImpPage != -1 )
|
||||
{
|
||||
fLoadPendingFlag = TRUE;
|
||||
MarkButtonsDirty();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
fDoneLoadPending = TRUE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
fVisitedIMPSubPages[ iCurrentImpPage ] = TRUE;
|
||||
|
||||
if( fButtonPendingFlag == TRUE )
|
||||
{
|
||||
// render screen
|
||||
RenderCharProfile( );
|
||||
return;
|
||||
}
|
||||
|
||||
// exity old mode
|
||||
ExitOldIMPMode( );
|
||||
|
||||
// set previous page
|
||||
iPreviousImpPage = iCurrentImpPage;
|
||||
|
||||
// enter new
|
||||
EnterNewIMPMode( );
|
||||
|
||||
|
||||
// render screen
|
||||
RenderCharProfile( );
|
||||
|
||||
// render title bar
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// handle
|
||||
switch( iCurrentImpPage )
|
||||
{
|
||||
case( IMP_HOME_PAGE ):
|
||||
HandleImpHomePage( );
|
||||
break;
|
||||
case( IMP_BEGIN ):
|
||||
HandleIMPBeginScreen( );
|
||||
break;
|
||||
case( IMP_PERSONALITY ):
|
||||
HandleIMPPersonalityEntrance( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_QUIZ ):
|
||||
HandleIMPSkillTrait( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_FINISH ):
|
||||
HandleIMPPersonalityFinish( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||
HandleIMPAttributeEntrance( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_PAGE ):
|
||||
HandleIMPAttributeSelection( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_FINISH ):
|
||||
HandleIMPAttributeFinish( );
|
||||
break;
|
||||
case( IMP_PORTRAIT ):
|
||||
HandleIMPPortraits( );
|
||||
break;
|
||||
case( IMP_VOICE ):
|
||||
HandleIMPVoices( );
|
||||
break;
|
||||
case( IMP_FINISH ):
|
||||
HandleIMPFinish( );
|
||||
break;
|
||||
case( IMP_ABOUT_US ):
|
||||
HandleIMPAboutUs( );
|
||||
break;
|
||||
case( IMP_MAIN_PAGE ):
|
||||
HandleIMPMainPage( );
|
||||
break;
|
||||
case( IMP_CONFIRM ):
|
||||
HandleIMPConfirm( );
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderCharProfile()
|
||||
{
|
||||
// button is waiting to go up?...do nothing,
|
||||
|
||||
if( fButtonPendingFlag )
|
||||
{
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
fButtonPendingFlag = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
switch( iCurrentImpPage )
|
||||
{
|
||||
case( IMP_HOME_PAGE ):
|
||||
RenderImpHomePage( );
|
||||
break;
|
||||
case( IMP_BEGIN ):
|
||||
RenderIMPBeginScreen( );
|
||||
break;
|
||||
case( IMP_PERSONALITY ):
|
||||
RenderIMPPersonalityEntrance( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_QUIZ ):
|
||||
RenderIMPSkillTrait( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_FINISH ):
|
||||
RenderIMPPersonalityFinish( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||
RenderIMPAttributeEntrance( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_PAGE ):
|
||||
RenderIMPAttributeSelection( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_FINISH ):
|
||||
RenderIMPAttributeFinish( );
|
||||
break;
|
||||
case( IMP_PORTRAIT ):
|
||||
RenderIMPPortraits( );
|
||||
break;
|
||||
case( IMP_VOICE ):
|
||||
RenderIMPVoices( );
|
||||
break;
|
||||
case( IMP_FINISH ):
|
||||
RenderIMPFinish( );
|
||||
break;
|
||||
case( IMP_ABOUT_US ):
|
||||
RenderIMPAboutUs( );
|
||||
break;
|
||||
case( IMP_MAIN_PAGE ):
|
||||
RenderIMPMainPage( );
|
||||
break;
|
||||
case( IMP_CONFIRM ):
|
||||
RenderIMPConfirm( );
|
||||
break;
|
||||
}
|
||||
|
||||
// render title bar
|
||||
//RenderWWWProgramTitleBar( );
|
||||
|
||||
// render the text
|
||||
PrintImpText( );
|
||||
|
||||
RenderWWWProgramTitleBar( );
|
||||
|
||||
DisplayProgramBoundingBox( TRUE );
|
||||
|
||||
//InvalidateRegion( 0, 0, 640, 480 );
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ExitOldIMPMode( void )
|
||||
{
|
||||
// exit old mode
|
||||
|
||||
if( iPreviousImpPage == -1 )
|
||||
{
|
||||
// don't both, leave
|
||||
return;
|
||||
|
||||
}
|
||||
// remove old mode
|
||||
switch( iPreviousImpPage )
|
||||
{
|
||||
case( IMP_HOME_PAGE ):
|
||||
ExitImpHomePage( );
|
||||
break;
|
||||
case( IMP_BEGIN ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPBeginScreen( );
|
||||
break;
|
||||
case( IMP_FINISH ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPFinish( );
|
||||
break;
|
||||
case( IMP_PERSONALITY ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPPersonalityEntrance( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_QUIZ ):
|
||||
DestroyIMPButtons( );
|
||||
// ExitIMPPersonalityQuiz( );
|
||||
ExitIMPSkillTrait( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_FINISH ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPPersonalityFinish( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPAttributeEntrance( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_PAGE ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPAttributeSelection( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_FINISH ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPAttributeFinish( );
|
||||
break;
|
||||
case( IMP_PORTRAIT ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPPortraits( );
|
||||
break;
|
||||
case( IMP_VOICE ):
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPVoices( );
|
||||
break;
|
||||
case( IMP_ABOUT_US ):
|
||||
ExitIMPAboutUs( );
|
||||
break;
|
||||
case( IMP_MAIN_PAGE ):
|
||||
ExitIMPMainPage( );
|
||||
break;
|
||||
case( IMP_CONFIRM ):
|
||||
ExitIMPConfirm( );
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void EnterNewIMPMode( void )
|
||||
{
|
||||
// enter new mode
|
||||
|
||||
switch( iCurrentImpPage )
|
||||
{
|
||||
case( IMP_HOME_PAGE ):
|
||||
EnterImpHomePage( );
|
||||
break;
|
||||
case( IMP_BEGIN ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPBeginScreen( );
|
||||
break;
|
||||
case( IMP_FINISH ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPFinish( );
|
||||
break;
|
||||
case( IMP_PERSONALITY ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPPersonalityEntrance( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_QUIZ ):
|
||||
CreateIMPButtons( );
|
||||
// EnterIMPPersonalityQuiz( );
|
||||
EnterIMPSkillTrait( );
|
||||
break;
|
||||
case( IMP_PERSONALITY_FINISH ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPPersonalityFinish( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPAttributeEntrance( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_PAGE ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPAttributeSelection( );
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_FINISH ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPAttributeFinish( );
|
||||
break;
|
||||
case( IMP_PORTRAIT ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPPortraits( );
|
||||
break;
|
||||
case( IMP_VOICE ):
|
||||
CreateIMPButtons( );
|
||||
EnterIMPVoices( );
|
||||
break;
|
||||
case( IMP_ABOUT_US ):
|
||||
EnterIMPAboutUs( );
|
||||
break;
|
||||
case( IMP_MAIN_PAGE ):
|
||||
EnterIMPMainPage( );
|
||||
break;
|
||||
case( IMP_CONFIRM ):
|
||||
EnterIMPConfirm( );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ResetCharacterStats( void )
|
||||
{
|
||||
// attributes
|
||||
iStrength = 55;
|
||||
iDexterity = 55;
|
||||
iAgility = 55;
|
||||
iWisdom = 55;
|
||||
iLeadership =55;
|
||||
iHealth = 55;
|
||||
|
||||
// skills
|
||||
iMarksmanship = 55;
|
||||
iMedical = 55;
|
||||
iExplosives = 55;
|
||||
iMechanical = 55;
|
||||
|
||||
// skills
|
||||
iSkillA = 0;
|
||||
iSkillB = 0;
|
||||
|
||||
// personality
|
||||
iPersonality = 0;
|
||||
|
||||
// attitude
|
||||
iAttitude = 0;
|
||||
|
||||
// names
|
||||
memset( &pFullName, 0 , sizeof( pFullName) );
|
||||
memset( &pNickName, 0 , sizeof( pNickName) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LoadImpGraphics( void )
|
||||
{
|
||||
// load all graphics needed for IMP
|
||||
|
||||
LoadProfileBackGround( );
|
||||
LoadIMPSymbol( );
|
||||
LoadBeginIndent( );
|
||||
LoadActivationIndent( );
|
||||
LoadFrontPageIndent( );
|
||||
LoadAnalyse( );
|
||||
LoadAttributeGraph( );
|
||||
LoadAttributeGraphBar( );
|
||||
|
||||
LoadFullNameIndent( );
|
||||
LoadNameIndent( );
|
||||
LoadGenderIndent( );
|
||||
LoadNickNameIndent( );
|
||||
|
||||
//LoadSmallFrame( );
|
||||
|
||||
LoadSmallSilhouette( );
|
||||
LoadLargeSilhouette( );
|
||||
|
||||
LoadAttributeFrame( );
|
||||
LoadSliderBar( );
|
||||
|
||||
LoadButton2Image( );
|
||||
LoadButton4Image( );
|
||||
LoadButton1Image( );
|
||||
|
||||
LoadPortraitFrame( );
|
||||
LoadMainIndentFrame( );
|
||||
|
||||
LoadQtnLongIndentFrame( );
|
||||
LoadQtnShortIndentFrame( );
|
||||
LoadQtnLongIndentHighFrame( );
|
||||
LoadQtnShortIndentHighFrame( );
|
||||
LoadQtnShort2IndentFrame( );
|
||||
LoadQtnShort2IndentHighFrame( );
|
||||
|
||||
LoadQtnIndentFrame( );
|
||||
LoadAttrib1IndentFrame( );
|
||||
LoadAttrib2IndentFrame( );
|
||||
LoadAvgMercIndentFrame( );
|
||||
LoadAboutUsIndentFrame( );
|
||||
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void RemoveImpGraphics( void )
|
||||
{
|
||||
// remove all graphics needed for IMP
|
||||
|
||||
RemoveProfileBackGround( );
|
||||
DeleteIMPSymbol( );
|
||||
DeleteBeginIndent( );
|
||||
DeleteActivationIndent( );
|
||||
DeleteFrontPageIndent( );
|
||||
DeleteAnalyse( );
|
||||
DeleteAttributeGraph( );
|
||||
DeleteAttributeBarGraph( );
|
||||
|
||||
DeleteFullNameIndent( );
|
||||
DeleteNameIndent( );
|
||||
DeleteGenderIndent( );
|
||||
DeleteNickNameIndent( );
|
||||
|
||||
//DeleteSmallFrame( );
|
||||
|
||||
DeleteSmallSilhouette( );
|
||||
DeleteLargeSilhouette( );
|
||||
|
||||
DeleteAttributeFrame( );
|
||||
DeleteSliderBar( );
|
||||
|
||||
DeleteButton2Image( );
|
||||
DeleteButton4Image( );
|
||||
DeleteButton1Image( );
|
||||
|
||||
DeletePortraitFrame( );
|
||||
DeleteMainIndentFrame( );
|
||||
|
||||
DeleteQtnLongIndentFrame( );
|
||||
DeleteQtnShortIndentFrame( );
|
||||
DeleteQtnLongIndentHighFrame( );
|
||||
DeleteQtnShortIndentHighFrame( );
|
||||
DeleteQtnShort2IndentFrame( );
|
||||
DeleteQtnShort2IndentHighFrame( );
|
||||
|
||||
DeleteQtnIndentFrame( );
|
||||
DeleteAttrib1IndentFrame( );
|
||||
DeleteAttrib2IndentFrame( );
|
||||
DeleteAvgMercIndentFrame( );
|
||||
DeleteAboutUsIndentFrame( );
|
||||
return;
|
||||
}
|
||||
|
||||
void CreateIMPButtons( void )
|
||||
{
|
||||
// create all the buttons global to the IMP system
|
||||
|
||||
giIMPButtonImage[ 0 ] = LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
||||
|
||||
|
||||
// cancel
|
||||
giIMPButton[0] = CreateIconAndTextButton( giIMPButtonImage[0], pImpButtonText[ 19 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 15, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPCancelCallback);
|
||||
|
||||
SpecifyButtonTextSubOffsets( giIMPButton[0], 0, -1, FALSE );
|
||||
|
||||
// set up generic www cursor
|
||||
SetButtonCursor(giIMPButton[ 0 ], CURSOR_WWW);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DestroyIMPButtons( void )
|
||||
{
|
||||
// destroy the buttons we created
|
||||
RemoveButton(giIMPButton[0] );
|
||||
UnloadButtonImage(giIMPButtonImage[0] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void BtnIMPCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
// btn callback for IMP cancel button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// back to the main page, otherwise, back to home page
|
||||
if( iCurrentImpPage == IMP_MAIN_PAGE )
|
||||
{
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentProfileMode = 0;
|
||||
fFinishedCharGeneration = FALSE;
|
||||
ResetCharacterStats( );
|
||||
}
|
||||
else if( iCurrentImpPage == IMP_FINISH )
|
||||
{
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
iCurrentProfileMode = 4;
|
||||
fFinishedCharGeneration = FALSE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
//iCurrentProfileMode = 0;
|
||||
//fFinishedCharGeneration = FALSE;
|
||||
//ResetCharacterStats( );
|
||||
|
||||
}
|
||||
|
||||
else if( iCurrentImpPage == IMP_PERSONALITY_QUIZ || iCurrentImpPage == IMP_PERSONALITY_FINISH)
|
||||
{
|
||||
giMaxPersonalityQuizQuestion = 0;
|
||||
fStartOverFlag = TRUE;
|
||||
iCurrentAnswer = -1;
|
||||
iCurrentImpPage = IMP_PERSONALITY;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if( iCurrentImpPage == IMP_ATTRIBUTE_PAGE )
|
||||
{
|
||||
SetAttributes( );
|
||||
fFirstIMPAttribTime = TRUE;
|
||||
}
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
iCurrentAnswer = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void InitIMPSubPageList( void )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
|
||||
for(iCounter = 0; iCounter < IMP_CONFIRM; iCounter++ )
|
||||
{
|
||||
fVisitedIMPSubPages[ iCounter ] = FALSE ;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
BOOLEAN HasTheCurrentIMPPageBeenVisited( void )
|
||||
{
|
||||
// returns if we have vsisted the current IMP PageAlready
|
||||
|
||||
//make sure we are not hosing memory
|
||||
Assert( iCurrentImpPage <= IMP_NUM_PAGES );
|
||||
|
||||
return ( fVisitedIMPSubPages[ iCurrentImpPage ]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
#ifndef __CHARPROFILE_H
|
||||
#define __CHARPROFILE_H
|
||||
|
||||
#include "types.h"
|
||||
void GameInitCharProfile();
|
||||
void EnterCharProfile();
|
||||
void ExitCharProfile();
|
||||
void HandleCharProfile();
|
||||
void RenderCharProfile();
|
||||
void ResetCharacterStats( void );
|
||||
void InitIMPSubPageList( void );
|
||||
|
||||
extern BOOLEAN fButtonPendingFlag;
|
||||
extern BOOLEAN fReDrawCharProfile;
|
||||
extern INT32 iCurrentImpPage;
|
||||
|
||||
// attributes
|
||||
extern INT32 iStrength;
|
||||
extern INT32 iDexterity;
|
||||
extern INT32 iAgility;
|
||||
extern INT32 iWisdom;
|
||||
extern INT32 iLeadership;
|
||||
extern INT32 iHealth;
|
||||
|
||||
// skills
|
||||
extern INT32 iMarksmanship;
|
||||
extern INT32 iMedical;
|
||||
extern INT32 iExplosives;
|
||||
extern INT32 iMechanical;
|
||||
|
||||
// sex?
|
||||
extern BOOLEAN fCharacterIsMale;
|
||||
|
||||
// name?
|
||||
extern CHAR16 pFullName[];
|
||||
extern CHAR16 pNickName[];
|
||||
|
||||
// skills
|
||||
extern INT32 iSkillA;
|
||||
extern INT32 iSkillB;
|
||||
|
||||
// persoanlity
|
||||
extern INT32 iPersonality;
|
||||
|
||||
// attitude
|
||||
extern INT32 iAttitude;
|
||||
|
||||
//addtivies
|
||||
extern INT32 iAddStrength;
|
||||
extern INT32 iAddDexterity;
|
||||
extern INT32 iAddAgility;
|
||||
extern INT32 iAddWisdom;
|
||||
extern INT32 iAddHealth ;
|
||||
extern INT32 iAddLeadership ;
|
||||
|
||||
extern INT32 iAddMarksmanship ;
|
||||
extern INT32 iAddMedical ;
|
||||
extern INT32 iAddExplosives ;
|
||||
extern INT32 iAddMechanical ;
|
||||
|
||||
// pop up strings
|
||||
extern STR16 pImpPopUpStrings[];
|
||||
|
||||
//extern BOOLEAN fIMPCompletedFlag;
|
||||
|
||||
enum{
|
||||
IMP_HOME_PAGE,
|
||||
IMP_BEGIN,
|
||||
IMP_FINISH,
|
||||
IMP_MAIN_PAGE,
|
||||
IMP_PERSONALITY,
|
||||
IMP_PERSONALITY_QUIZ,
|
||||
IMP_PERSONALITY_FINISH,
|
||||
IMP_ATTRIBUTE_ENTRANCE,
|
||||
IMP_ATTRIBUTE_PAGE,
|
||||
IMP_ATTRIBUTE_FINISH,
|
||||
IMP_PORTRAIT,
|
||||
IMP_VOICE,
|
||||
IMP_ABOUT_US,
|
||||
IMP_CONFIRM,
|
||||
|
||||
IMP_NUM_PAGES,
|
||||
};
|
||||
|
||||
#define COST_OF_PROFILE 3000
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "laptop.h"
|
||||
#include "GunEmporium.h"
|
||||
|
||||
void GameInitGunEmporium()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EnterGunEmporium()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ExitGunEmporium()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void HandleGunEmporium()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RenderGunEmporium()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __GUNEMPORIUM_H
|
||||
#define __GUNEMPORIUM_H
|
||||
|
||||
void GameInitGunEmporium();
|
||||
void EnterGunEmporium();
|
||||
void ExitGunEmporium();
|
||||
void HandleGunEmporium();
|
||||
void RenderGunEmporium();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "IMP AboutUs.h"
|
||||
#include "CharProfile.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#endif
|
||||
|
||||
// IMP AboutUs buttons
|
||||
INT32 giIMPAboutUsButton[1];
|
||||
INT32 giIMPAboutUsButtonImage[1];
|
||||
void CreateIMPAboutUsButtons( void );
|
||||
void DeleteIMPAboutUsButtons( void );;
|
||||
|
||||
// fucntions
|
||||
void BtnIMPBackCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
|
||||
void EnterIMPAboutUs( void )
|
||||
{
|
||||
|
||||
// create buttons
|
||||
CreateIMPAboutUsButtons( );
|
||||
|
||||
// entry into IMP about us page
|
||||
RenderIMPAboutUs( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPAboutUs( void )
|
||||
{
|
||||
// exit from IMP About us page
|
||||
|
||||
// delete Buttons
|
||||
DeleteIMPAboutUsButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPAboutUs( void )
|
||||
{
|
||||
// rneders the IMP about us page
|
||||
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// the IMP symbol
|
||||
RenderIMPSymbol( 106, 1 );
|
||||
|
||||
// about us indent
|
||||
RenderAboutUsIndentFrame( 8, 130 );
|
||||
// about us indent
|
||||
RenderAboutUsIndentFrame( 258, 130 );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPAboutUs( void )
|
||||
{
|
||||
// handles the IMP about us page
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPAboutUsButtons( void )
|
||||
{
|
||||
|
||||
// this function will create the buttons needed for th IMP about us page
|
||||
// the back button button
|
||||
giIMPAboutUsButtonImage[0]= LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
||||
/*giIMPAboutUsButton[0] = QuickCreateButton( giIMPAboutUsButtonImage[0], LAPTOP_SCREEN_UL_X + 426 , LAPTOP_SCREEN_WEB_UL_Y + ( 360 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPBackCallback); */
|
||||
|
||||
giIMPAboutUsButton[0] = CreateIconAndTextButton( giIMPAboutUsButtonImage[0], pImpButtonText[6], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 216, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPBackCallback);
|
||||
|
||||
SetButtonCursor(giIMPAboutUsButton[0], CURSOR_WWW);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DeleteIMPAboutUsButtons( void )
|
||||
{
|
||||
// this function destroys the buttons needed for the IMP about Us Page
|
||||
|
||||
// the about back button
|
||||
RemoveButton(giIMPAboutUsButton[0] );
|
||||
UnloadButtonImage(giIMPAboutUsButtonImage[0] );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void BtnIMPBackCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef _IMP_ABOUTUS_H
|
||||
#define _IMP_ABOUTUS_H
|
||||
|
||||
|
||||
void RenderIMPAboutUs( void );
|
||||
void ExitIMPAboutUs( void );
|
||||
void EnterIMPAboutUs( void );
|
||||
void HandleIMPAboutUs( void );
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,127 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Attribute Entrance.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#endif
|
||||
|
||||
// the buttons
|
||||
UINT32 giIMPAttributeEntranceButtonImage[ 1 ];
|
||||
UINT32 giIMPAttributeEntranceButton[ 1 ];
|
||||
|
||||
// function definitions
|
||||
void DestroyIMPAttributeEntranceButtons( void );
|
||||
void CreateIMPAttributeEntranceButtons( void );
|
||||
|
||||
|
||||
// callbacks
|
||||
void BtnIMPAttributeBeginCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
|
||||
|
||||
void EnterIMPAttributeEntrance( void )
|
||||
{
|
||||
|
||||
CreateIMPAttributeEntranceButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderIMPAttributeEntrance( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// avg merc indent
|
||||
RenderAvgMercIndentFrame(90, 40 );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitIMPAttributeEntrance( void )
|
||||
{
|
||||
// destroy the finish buttons
|
||||
DestroyIMPAttributeEntranceButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPAttributeEntrance( void )
|
||||
{
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPAttributeEntranceButtons( void )
|
||||
{
|
||||
|
||||
// the begin button
|
||||
giIMPAttributeEntranceButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/*
|
||||
giIMPAttributeEntranceButton[0] = QuickCreateButton( giIMPAttributeEntranceButtonImage[0], LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeBeginCallback ); */
|
||||
|
||||
giIMPAttributeEntranceButton[0] = CreateIconAndTextButton( giIMPAttributeEntranceButtonImage[ 0 ], pImpButtonText[ 13 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeBeginCallback);
|
||||
|
||||
SetButtonCursor(giIMPAttributeEntranceButton[0], CURSOR_WWW);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DestroyIMPAttributeEntranceButtons( void )
|
||||
{
|
||||
// this function will destroy the buttons needed for the IMP attrib enter page
|
||||
|
||||
// the begin button
|
||||
RemoveButton(giIMPAttributeEntranceButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPAttributeEntranceButtonImage[ 0 ] );
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPAttributeBeginCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef _IMP_ATTRIBUTE_ENTRANCE_H
|
||||
#define _IMP_ATTRIBUTE_ENTRANCE_H
|
||||
|
||||
void EnterIMPAttributeEntrance( void );
|
||||
void RenderIMPAttributeEntrance( void );
|
||||
void ExitIMPAttributeEntrance( void );
|
||||
void HandleIMPAttributeEntrance( void );
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,211 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Attribute Finish.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "input.h"
|
||||
#include "Isometric Utils.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Attribute Selection.h"
|
||||
#endif
|
||||
|
||||
// buttons
|
||||
INT32 giIMPAttributeFinishButtonImage[ 2 ];
|
||||
INT32 giIMPAttributeFinishButton[ 2 ];
|
||||
|
||||
// function definitions
|
||||
void CreateAttributeFinishButtons( void );
|
||||
void DestroyAttributeFinishButtons( void );
|
||||
extern void SetGeneratedCharacterAttributes( void );
|
||||
|
||||
BOOLEAN CameBackToAttributesPageButNotFinished();
|
||||
|
||||
// callbacks
|
||||
void BtnIMPAttributeFinishYesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPAttributeFinishNoCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
|
||||
void EnterIMPAttributeFinish( void )
|
||||
{
|
||||
// create the needed buttons
|
||||
CreateAttributeFinishButtons( );
|
||||
|
||||
// render screen
|
||||
RenderIMPAttributeFinish( );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPAttributeFinish( void )
|
||||
{
|
||||
// render background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// indent for text
|
||||
RenderBeginIndent( 110, 93 );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPAttributeFinish( void )
|
||||
{
|
||||
// destroy the buttons for this screen
|
||||
DestroyAttributeFinishButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void HandleIMPAttributeFinish( void )
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateAttributeFinishButtons( void )
|
||||
{
|
||||
|
||||
// this procedure will create the buttons needed for the attribute finish screen
|
||||
|
||||
// the yes button
|
||||
giIMPAttributeFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPAttributeFinishButton[0] = QuickCreateButton( giIMPAttributeFinishButtonImage[0], LAPTOP_SCREEN_UL_X + ( 90 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishYesCallback );
|
||||
|
||||
*/
|
||||
giIMPAttributeFinishButton[0] = CreateIconAndTextButton( giIMPAttributeFinishButtonImage[0], pImpButtonText[ 20 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 130 ), LAPTOP_SCREEN_WEB_UL_Y + ( 180 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishYesCallback );
|
||||
|
||||
// the no button
|
||||
giIMPAttributeFinishButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPAttributeFinishButton[1] = QuickCreateButton( giIMPAttributeFinishButtonImage[1], LAPTOP_SCREEN_UL_X + ( 276 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishNoCallback );
|
||||
*/
|
||||
giIMPAttributeFinishButton[1] = CreateIconAndTextButton( giIMPAttributeFinishButtonImage[1], pImpButtonText[ 21 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 130 ), LAPTOP_SCREEN_WEB_UL_Y + ( 264 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishNoCallback);
|
||||
|
||||
SetButtonCursor(giIMPAttributeFinishButton[0], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPAttributeFinishButton[1], CURSOR_WWW);
|
||||
|
||||
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DestroyAttributeFinishButtons( void )
|
||||
{
|
||||
|
||||
// this procedure will destroy the buttons for the attribute finish screen
|
||||
|
||||
// the yes button
|
||||
RemoveButton(giIMPAttributeFinishButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPAttributeFinishButtonImage[ 0 ] );
|
||||
|
||||
// the no button
|
||||
RemoveButton(giIMPAttributeFinishButton[ 1 ] );
|
||||
UnloadButtonImage(giIMPAttributeFinishButtonImage[ 1 ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPAttributeFinishYesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
// gone far enough
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
// if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||
if( !CameBackToAttributesPageButNotFinished() )
|
||||
{
|
||||
iCurrentProfileMode = IMP__FINISH;//IMP__PORTRAIT;
|
||||
}
|
||||
// if we are already done, leave
|
||||
if( iCurrentProfileMode == IMP__FINISH)
|
||||
{
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
}
|
||||
|
||||
// SET ATTRIBUTES NOW
|
||||
SetGeneratedCharacterAttributes( );
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN CameBackToAttributesPageButNotFinished()
|
||||
{
|
||||
//if we are in a page that comes after this one
|
||||
if( iCurrentProfileMode == IMP__PERSONALITY ||
|
||||
iCurrentProfileMode == IMP__VOICE )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPAttributeFinishNoCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
// if no, return to attribute
|
||||
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
||||
fReturnStatus = TRUE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef __ATTRIBUTE_FINISH_H
|
||||
#define __ATTRIBUTE_FINISH_H
|
||||
|
||||
|
||||
void EnterIMPAttributeFinish( void );
|
||||
void RenderIMPAttributeFinish( void );
|
||||
void ExitIMPAttributeFinish( void );
|
||||
void HandleIMPAttributeFinish( void );
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
#ifndef _IMP_ATTRIBUTE_SELECTION_H
|
||||
#define _IMP_ATTRIBUTE_SELECTION_H
|
||||
|
||||
void EnterIMPAttributeSelection( void );
|
||||
void RenderIMPAttributeSelection( void );
|
||||
void ExitIMPAttributeSelection( void );
|
||||
void HandleIMPAttributeSelection( void );
|
||||
|
||||
void RenderAttributeBoxes( void );
|
||||
|
||||
extern BOOLEAN fReviewStats;
|
||||
extern BOOLEAN fSkillAtZeroWarning;
|
||||
|
||||
extern BOOLEAN fFirstIMPAttribTime;
|
||||
|
||||
extern BOOLEAN fReturnStatus;
|
||||
// starting point of skill boxes on bar
|
||||
#define SKILL_SLIDE_START_X 186
|
||||
|
||||
#define SKILL_SLIDE_START_Y 100
|
||||
#define SKILL_SLIDE_HEIGHT 20
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
#ifndef _IMP_BEGINSCREEN_H
|
||||
#define _IMP_BEGINSCREEN_H
|
||||
|
||||
|
||||
void EnterIMPBeginScreen( void );
|
||||
void RenderIMPBeginScreen( void );
|
||||
void ExitIMPBeginScreen( void );
|
||||
void HandleIMPBeginScreen( void );
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
#ifndef __IMP_COMPILE_H
|
||||
#define __IMP_COMPILE_H
|
||||
|
||||
#define PLAYER_GENERATED_CHARACTER_ID 51
|
||||
#define ATTITUDE_LIST_SIZE 20
|
||||
#define NUMBER_OF_PLAYER_PORTRAITS 16
|
||||
|
||||
void AddAnAttitudeToAttitudeList( INT8 bAttitude );
|
||||
void CreatePlayerAttitude( void );
|
||||
BOOLEAN DoesCharacterHaveAnAttitude( void );
|
||||
void CreateACharacterFromPlayerEnteredStats( void );
|
||||
void CreatePlayerSkills( void );
|
||||
void CreatePlayersPersonalitySkillsAndAttitude( void );
|
||||
void AddAPersonalityToPersonalityList( INT8 bPersonlity );
|
||||
void CreatePlayerPersonality( void );
|
||||
BOOLEAN DoesCharacterHaveAPersoanlity( void );
|
||||
void AddSkillToSkillList( INT8 bSkill );
|
||||
void ResetSkillsAttributesAndPersonality( void );
|
||||
void ResetIncrementCharacterAttributes( void );
|
||||
void HandleMercStatsForChangesInFace( void );
|
||||
void ClearAllSkillsList( void );
|
||||
|
||||
extern STR8 pPlayerSelectedFaceFileNames[ NUMBER_OF_PLAYER_PORTRAITS ];
|
||||
extern STR8 pPlayerSelectedBigFaceFileNames[ NUMBER_OF_PLAYER_PORTRAITS ];
|
||||
#endif
|
||||
@@ -0,0 +1,850 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "soldier profile type.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Confirm.h"
|
||||
#include "finances.h"
|
||||
#include "Soldier Profile.h"
|
||||
#include "Soldier Profile Type.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "IMP Portraits.h"
|
||||
#include "IMP Voices.h"
|
||||
#include "Overhead.h"
|
||||
#include "finances.h"
|
||||
#include "history.h"
|
||||
#include "Game Clock.h"
|
||||
#include "email.h"
|
||||
#include "Game Event Hook.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "strategic.h"
|
||||
#endif
|
||||
|
||||
#define IMP_MERC_FILE "IMP.dat"
|
||||
|
||||
IMP_ITEM_CHOICE_TYPE gIMPItemChoices[MAX_IMP_ITEM_TYPES];
|
||||
|
||||
void GiveIMPRandomItems( MERCPROFILESTRUCT *pProfile, UINT8 typeIndex );
|
||||
void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeIndex );
|
||||
|
||||
UINT32 giIMPConfirmButton[ 2 ];
|
||||
UINT32 giIMPConfirmButtonImage[ 2 ];
|
||||
BOOLEAN fNoAlreadySelected = FALSE;
|
||||
UINT16 uiEyeXPositions[ ]={
|
||||
8,
|
||||
9,
|
||||
8,
|
||||
6,
|
||||
13,
|
||||
11,
|
||||
8,
|
||||
8,
|
||||
4, //208
|
||||
5, //209
|
||||
7,
|
||||
5, //211
|
||||
7,
|
||||
11,
|
||||
8, //214
|
||||
5,
|
||||
};
|
||||
|
||||
UINT16 uiEyeYPositions[ ]=
|
||||
{
|
||||
5,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
4,
|
||||
4, //208
|
||||
5,
|
||||
5, //210
|
||||
7,
|
||||
6, //212
|
||||
5,
|
||||
5, //214
|
||||
6,
|
||||
};
|
||||
|
||||
UINT16 uiMouthXPositions[]=
|
||||
{
|
||||
8,
|
||||
9,
|
||||
7,
|
||||
7,
|
||||
11,
|
||||
10,
|
||||
8,
|
||||
8,
|
||||
5, //208
|
||||
6,
|
||||
7, //210
|
||||
6,
|
||||
7, //212
|
||||
9,
|
||||
7, //214
|
||||
5,
|
||||
};
|
||||
|
||||
UINT16 uiMouthYPositions[]={
|
||||
21,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
23,
|
||||
24,
|
||||
24,
|
||||
24,
|
||||
25, //208
|
||||
24,
|
||||
24, //210
|
||||
26,
|
||||
24, //212
|
||||
23,
|
||||
24, //214
|
||||
26,
|
||||
};
|
||||
|
||||
BOOLEAN fLoadingCharacterForPreviousImpProfile = FALSE;
|
||||
|
||||
void CreateConfirmButtons( void );
|
||||
void DestroyConfirmButtons( void );
|
||||
void GiveItemsToPC( UINT8 ubProfileId );
|
||||
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem);
|
||||
|
||||
// callbacks
|
||||
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason );
|
||||
void BtnIMPConfirmYes( GUI_BUTTON *btn,INT32 reason );
|
||||
|
||||
|
||||
void EnterIMPConfirm( void )
|
||||
{
|
||||
// create buttons
|
||||
CreateConfirmButtons( );
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderIMPConfirm( void )
|
||||
{
|
||||
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// indent
|
||||
RenderAvgMercIndentFrame(90, 40 );
|
||||
|
||||
// highlight answer
|
||||
PrintImpText( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitIMPConfirm( void )
|
||||
{
|
||||
|
||||
// destroy buttons
|
||||
DestroyConfirmButtons( );
|
||||
return;
|
||||
}
|
||||
|
||||
void HandleIMPConfirm( void )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void CreateConfirmButtons( void )
|
||||
{
|
||||
// create buttons for confirm screen
|
||||
|
||||
giIMPConfirmButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
giIMPConfirmButton[0] = CreateIconAndTextButton( giIMPConfirmButtonImage[0], pImpButtonText[ 16 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 254 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPConfirmYes);
|
||||
|
||||
giIMPConfirmButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
giIMPConfirmButton[1] = CreateIconAndTextButton( giIMPConfirmButtonImage[ 1 ], pImpButtonText[ 17 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPConfirmNo);
|
||||
|
||||
SetButtonCursor(giIMPConfirmButton[ 0 ], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPConfirmButton[ 1 ], CURSOR_WWW);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DestroyConfirmButtons( void )
|
||||
{
|
||||
// destroy buttons for confirm screen
|
||||
|
||||
RemoveButton(giIMPConfirmButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPConfirmButtonImage[ 0 ] );
|
||||
|
||||
|
||||
RemoveButton(giIMPConfirmButton[ 1 ] );
|
||||
UnloadButtonImage(giIMPConfirmButtonImage[ 1 ] );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN AddCharacterToPlayersTeam( void )
|
||||
{
|
||||
|
||||
MERC_HIRE_STRUCT HireMercStruct;
|
||||
|
||||
|
||||
// last minute chage to make sure merc with right facehas not only the right body but body specific skills...
|
||||
// ie..small mercs have martial arts..but big guys and women don't don't
|
||||
|
||||
HandleMercStatsForChangesInFace( );
|
||||
|
||||
memset(&HireMercStruct, 0, sizeof(MERC_HIRE_STRUCT));
|
||||
|
||||
HireMercStruct.ubProfileID = ( UINT8 )( PLAYER_GENERATED_CHARACTER_ID + LaptopSaveInfo.iVoiceId ) ;
|
||||
|
||||
if( fLoadingCharacterForPreviousImpProfile == FALSE )
|
||||
{
|
||||
// give them items
|
||||
GiveItemsToPC( HireMercStruct.ubProfileID );
|
||||
}
|
||||
|
||||
|
||||
HireMercStruct.sSectorX = gsMercArriveSectorX;
|
||||
HireMercStruct.sSectorY = gsMercArriveSectorY;
|
||||
HireMercStruct.fUseLandingZoneForArrival = TRUE;
|
||||
|
||||
HireMercStruct.fCopyProfileItemsOver = TRUE;
|
||||
|
||||
// indefinite contract length
|
||||
HireMercStruct.iTotalContractLength = -1;
|
||||
|
||||
HireMercStruct.ubInsertionCode = INSERTION_CODE_ARRIVING_GAME;
|
||||
HireMercStruct.uiTimeTillMercArrives = GetMercArrivalTimeOfDay( );
|
||||
|
||||
SetProfileFaceData( HireMercStruct.ubProfileID , ( UINT8 ) ( 200 + iPortraitNumber ), uiEyeXPositions[ iPortraitNumber ], uiEyeYPositions[ iPortraitNumber ], uiMouthXPositions[ iPortraitNumber ], uiMouthYPositions[ iPortraitNumber ] );
|
||||
|
||||
//if we succesfully hired the merc
|
||||
if( !HireMerc( &HireMercStruct ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||
{
|
||||
|
||||
// reset button
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
// Madd
|
||||
/* if( LaptopSaveInfo.fIMPCompletedFlag )
|
||||
{
|
||||
// already here, leave
|
||||
return;
|
||||
}
|
||||
*/
|
||||
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
||||
{
|
||||
// not enough
|
||||
return;
|
||||
}
|
||||
|
||||
// line moved by CJC Nov 28 2002 to AFTER the check for money
|
||||
LaptopSaveInfo.fIMPCompletedFlag = TRUE;
|
||||
|
||||
// charge the player
|
||||
AddTransactionToPlayersBook(IMP_PROFILE, (UINT8)(PLAYER_GENERATED_CHARACTER_ID + LaptopSaveInfo.iVoiceId), GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
|
||||
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
|
||||
AddCharacterToPlayersTeam( );
|
||||
|
||||
// write the created imp merc
|
||||
WriteOutCurrentImpCharacter( ( UINT8 )( PLAYER_GENERATED_CHARACTER_ID + LaptopSaveInfo.iVoiceId ) );
|
||||
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
|
||||
//Kaiden: Below is the Imp personality E-mail as it was.
|
||||
/*
|
||||
// send email notice
|
||||
//AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ) );
|
||||
AddFutureDayStrategicEvent( EVENT_DAY2_ADD_EMAIL_FROM_IMP, 60 * 7, 0, 2 );
|
||||
*/
|
||||
|
||||
//Kaiden: And here is my Answer to the IMP E-mails only
|
||||
// profiling the last IMP made. You get the results immediately
|
||||
// But they should become different per different IMP.
|
||||
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ) );
|
||||
|
||||
//RenderCharProfile( );
|
||||
|
||||
ResetCharacterStats();
|
||||
|
||||
//Display a popup msg box telling the user when and where the merc will arrive
|
||||
//DisplayPopUpBoxExplainingMercArrivalLocationAndTime( PLAYER_GENERATED_CHARACTER_ID + LaptopSaveInfo.iVoiceId );
|
||||
|
||||
//reset the id of the last merc so we dont get the DisplayPopUpBoxExplainingMercArrivalLocationAndTime() pop up box in another screen by accident
|
||||
LaptopSaveInfo.sLastHiredMerc.iIdOfMerc = -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// fixed? by CJC Nov 28 2002
|
||||
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
||||
{
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||
{
|
||||
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
|
||||
/*
|
||||
|
||||
LaptopSaveInfo.fIMPCompletedFlag = FALSE;
|
||||
ResetCharacterStats();
|
||||
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
*/
|
||||
/*
|
||||
if( fNoAlreadySelected == TRUE )
|
||||
{
|
||||
// already selected no
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
}
|
||||
fNoAlreadySelected = TRUE;
|
||||
*/
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
||||
{
|
||||
|
||||
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||
{
|
||||
LaptopSaveInfo.fIMPCompletedFlag = TRUE;
|
||||
if( fNoAlreadySelected == TRUE )
|
||||
{
|
||||
// already selected no
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
}
|
||||
fNoAlreadySelected = TRUE;
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ((p->bSkillTrait == t) || (p->bSkillTrait2 == t))
|
||||
|
||||
|
||||
void GiveItemsToPC( UINT8 ubProfileId )
|
||||
{
|
||||
MERCPROFILESTRUCT *pProfile;
|
||||
|
||||
|
||||
// gives starting items to merc
|
||||
// NOTE: Any guns should probably be from those available in regular gun set
|
||||
|
||||
pProfile = &(gMercProfiles[ubProfileId]);
|
||||
|
||||
|
||||
// STANDARD EQUIPMENT
|
||||
|
||||
GiveIMPItems(pProfile, 100, IMP_DEFAULT);
|
||||
GiveIMPRandomItems(pProfile, IMP_RANDOMDEFAULT);
|
||||
|
||||
|
||||
// kevlar vest, leggings, & helmet
|
||||
// MakeProfileInvItemThisSlot(pProfile, VESTPOS, FLAK_JACKET, 100, 1);
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bWisdom,IMP_WISDOM);
|
||||
|
||||
|
||||
//if ( PreRandom( 100 ) < (UINT32) pProfile->bWisdom )
|
||||
//{
|
||||
// MakeProfileInvItemThisSlot(pProfile, HELMETPOS, STEEL_HELMET, 100, 1);
|
||||
//}
|
||||
|
||||
// canteen
|
||||
// MakeProfileInvItemThisSlot(pProfile, SMALLPOCK4POS, CANTEEN, 100, 1);
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bMarksmanship,IMP_MARKSMANSHIP);
|
||||
|
||||
|
||||
//Give ANY imp the calico
|
||||
// MakeProfileInvItemThisSlot( pProfile, HANDPOS, M950, 100, 1);
|
||||
|
||||
|
||||
|
||||
//No ammo clip MakeProfileInvItemThisSlot( pProfile, SMALLPOCK1POS, CLIP9_30, 100, 2);
|
||||
|
||||
/*
|
||||
Ja25 IMP only gets 1 gun now
|
||||
|
||||
|
||||
|
||||
|
||||
if (pProfile->bMarksmanship >= 80)
|
||||
{
|
||||
// good shooters get a better & matching ammo
|
||||
MakeProfileInvItemThisSlot( pProfile, HANDPOS, MP5K, 100, 1);
|
||||
MakeProfileInvItemThisSlot( pProfile, SMALLPOCK1POS, CLIP9_30, 100, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Automatic pistol, with matching ammo
|
||||
MakeProfileInvItemThisSlot( pProfile, HANDPOS, BERETTA_93R, 100, 1 );
|
||||
MakeProfileInvItemThisSlot( pProfile, SMALLPOCK1POS, CLIP9_15, 100, 3 );
|
||||
}
|
||||
*/
|
||||
|
||||
// OPTIONAL EQUIPMENT: depends on skills & special skills
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bMedical,IMP_MEDICAL);
|
||||
|
||||
//if (pProfile->bMedical >= 60)
|
||||
//{
|
||||
// // strong medics get full medic kit
|
||||
// MakeProfileInvItemAnySlot(pProfile, MEDICKIT, 100, 1);
|
||||
//}
|
||||
//else
|
||||
//if (pProfile->bMedical >= 30)
|
||||
//{
|
||||
// // passable medics get first aid kit
|
||||
// MakeProfileInvItemAnySlot(pProfile, FIRSTAIDKIT, 100, 1);
|
||||
//}
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bMechanical,IMP_MECHANICAL);
|
||||
|
||||
//if (pProfile->bMechanical >= 50)
|
||||
//{
|
||||
// // mechanics get toolkit
|
||||
// MakeProfileInvItemAnySlot(pProfile, TOOLKIT, 100, 1);
|
||||
//}
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bExplosive,IMP_EXPLOSIVE);
|
||||
|
||||
//if (pProfile->bExplosive >= 50)
|
||||
//{
|
||||
// // loonies get TNT & Detonator
|
||||
//MakeProfileInvItemAnySlot(pProfile, TNT, 100, 1);
|
||||
//MakeProfileInvItemAnySlot(pProfile, DETONATOR, 100, 1);
|
||||
//}
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bAgility,IMP_AGILITY);
|
||||
GiveIMPItems (pProfile,pProfile->bDexterity,IMP_DEXTERITY);
|
||||
GiveIMPItems (pProfile,pProfile->bStrength,IMP_STRENGTH);
|
||||
GiveIMPItems (pProfile,pProfile->bLifeMax,IMP_HEALTH);
|
||||
GiveIMPItems (pProfile,pProfile->bLeadership,IMP_LEADERSHIP);
|
||||
|
||||
// check for special skills
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, LOCKPICKING) && ( iMechanical ) )
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, LOCKSMITHKIT, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_LOCKPICKING);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, HANDTOHAND))
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, BRASS_KNUCKLES, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_HTH);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, ELECTRONICS) && ( iMechanical ) )
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, METALDETECTOR, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_ELECTRONICS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, NIGHTOPS))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 2);
|
||||
GiveIMPRandomItems(pProfile,IMP_NIGHTOPS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, THROWING))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, THROWING_KNIFE, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_THROWING);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, STEALTHY))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_STEALTHY);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, KNIFING))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, COMBAT_KNIFE, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_KNIFING);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, CAMOUFLAGED))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, CAMOUFLAGEKIT, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_CAMOUFLAGED);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, AMBIDEXT))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, M950, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_AMBIDEXTROUS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, MARTIALARTS))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIALARTS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, ONROOF))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_ROOFTOPS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, TEACHING))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TEACHING);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, AUTO_WEAPS))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AUTOWEAPONS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, HEAVY_WEAPS ))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_HEAVYWEAPONS);
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, THIEF ))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_THIEF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
||||
{
|
||||
INT32 iSlot;
|
||||
|
||||
iSlot = FirstFreeBigEnoughPocket(pProfile, usItem);
|
||||
|
||||
if (iSlot == -1)
|
||||
{
|
||||
// no room, item not received
|
||||
return;
|
||||
}
|
||||
|
||||
// put the item into that slot
|
||||
MakeProfileInvItemThisSlot(pProfile, iSlot, usItem, ubStatus, ubHowMany);
|
||||
}
|
||||
|
||||
|
||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
||||
{
|
||||
pProfile->inv[uiPos] = usItem;
|
||||
pProfile->bInvStatus[uiPos] = ubStatus;
|
||||
pProfile->bInvNumber[uiPos] = ubHowMany;
|
||||
}
|
||||
|
||||
|
||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem)
|
||||
{
|
||||
UINT32 uiPos;
|
||||
|
||||
|
||||
// if it fits into a small pocket
|
||||
if (Item[usItem].ubPerPocket != 0)
|
||||
{
|
||||
// check small pockets first
|
||||
for (uiPos = SMALLPOCK1POS; uiPos <= SMALLPOCK8POS; uiPos++)
|
||||
{
|
||||
if (pProfile->inv[uiPos] == NONE)
|
||||
{
|
||||
return(uiPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check large pockets
|
||||
for (uiPos = BIGPOCK1POS; uiPos <= BIGPOCK4POS; uiPos++)
|
||||
{
|
||||
if (pProfile->inv[uiPos] == NONE)
|
||||
{
|
||||
return(uiPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
{
|
||||
// grab the profile number and write out what is contained there in
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesWritten = 0;
|
||||
|
||||
// open the file for writing
|
||||
hFile = FileOpen(IMP_MERC_FILE, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
||||
|
||||
// write out the profile id
|
||||
if (!FileWrite(hFile, &iProfileId, sizeof( INT32 ), &uiBytesWritten))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// write out the portrait id
|
||||
if (!FileWrite(hFile, &iPortraitNumber, sizeof( INT32 ), &uiBytesWritten))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// write out the profile itself
|
||||
if (!FileWrite(hFile, &gMercProfiles[ iProfileId ], sizeof( MERCPROFILESTRUCT ), &uiBytesWritten))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// close file
|
||||
FileClose(hFile);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void LoadInCurrentImpCharacter( void )
|
||||
{
|
||||
INT32 iProfileId = 0;
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesRead = 0;
|
||||
|
||||
// open the file for writing
|
||||
hFile = FileOpen(IMP_MERC_FILE, FILE_ACCESS_READ, FALSE);
|
||||
|
||||
// valid file?
|
||||
if( hFile == -1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// read in the profile
|
||||
if (!FileRead(hFile, &iProfileId,sizeof( INT32 ), &uiBytesRead))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// read in the portrait
|
||||
if (!FileRead(hFile, &iPortraitNumber ,sizeof( INT32 ), &uiBytesRead))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// read in the profile
|
||||
if (!FileRead(hFile, &gMercProfiles[ iProfileId ] ,sizeof( MERCPROFILESTRUCT ), &uiBytesRead))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// close file
|
||||
FileClose(hFile);
|
||||
|
||||
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
||||
{
|
||||
// not enough
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// charge the player
|
||||
// is the character male?
|
||||
fCharacterIsMale = ( gMercProfiles[ iProfileId ].bSex == MALE );
|
||||
fLoadingCharacterForPreviousImpProfile = TRUE;
|
||||
AddTransactionToPlayersBook(IMP_PROFILE,0, GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
|
||||
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
|
||||
LaptopSaveInfo.iVoiceId = iProfileId - PLAYER_GENERATED_CHARACTER_ID;
|
||||
AddCharacterToPlayersTeam( );
|
||||
AddFutureDayStrategicEvent( EVENT_DAY2_ADD_EMAIL_FROM_IMP, 60 * 7, 0, 2 );
|
||||
LaptopSaveInfo.fIMPCompletedFlag = TRUE;
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
fLoadingCharacterForPreviousImpProfile = FALSE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
||||
{
|
||||
// ATE: Check boundary conditions!
|
||||
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > 16 ) || ( ubMercProfileID >= PROF_HUMMER ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gMercProfiles[ ubMercProfileID ].usEyesX = uiEyeXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||
gMercProfiles[ ubMercProfileID ].usEyesY = uiEyeYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||
|
||||
|
||||
gMercProfiles[ ubMercProfileID ].usMouthX = uiMouthXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||
gMercProfiles[ ubMercProfileID ].usMouthY = uiMouthYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||
}
|
||||
|
||||
|
||||
void GiveIMPRandomItems( MERCPROFILESTRUCT *pProfile, UINT8 typeIndex )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: typeIndex = %d",typeIndex ));
|
||||
|
||||
UINT16 usItem = 0;
|
||||
INT32 iChoice;
|
||||
|
||||
if ( gIMPItemChoices[ typeIndex ].ubChoices <= 0 )
|
||||
return;
|
||||
|
||||
for ( int i=0; i < gIMPItemChoices[typeIndex].ubNumItems ;i++ )
|
||||
{
|
||||
iChoice = Random(gIMPItemChoices[ typeIndex ].ubChoices);
|
||||
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: typeIndex = %d, usItem = %d ",typeIndex, usItem ));
|
||||
if ( usItem > 0 )
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
||||
|
||||
// give ammo for guns
|
||||
if ( Item[usItem].usItemClass == IC_GUN && !Item[usItem].rocketlauncher )
|
||||
{
|
||||
usItem = DefaultMagazine(usItem);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: give ammo typeIndex = %d, usItem = %d ",typeIndex, usItem ));
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,(1+Random(3)));
|
||||
}
|
||||
|
||||
// give launchables for launchers
|
||||
if ( Item[usItem].usItemClass == IC_LAUNCHER )
|
||||
{
|
||||
usItem = PickARandomLaunchable(usItem);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: give launchable typeIndex = %d, usItem = %d",typeIndex, usItem ));
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,(1+Random(3)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeIndex )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: typeIndex = %d, abilityValue = %d",typeIndex,abilityValue ));
|
||||
|
||||
UINT16 usItem = 0;
|
||||
INT32 iChoice;
|
||||
|
||||
if ( gIMPItemChoices[ typeIndex ].ubChoices <= 0 )
|
||||
return;
|
||||
|
||||
iChoice = (UINT32) (abilityValue / (100 / gIMPItemChoices[ typeIndex ].ubChoices)) ;
|
||||
|
||||
if ( iChoice >= gIMPItemChoices[ typeIndex ].ubChoices )
|
||||
iChoice = gIMPItemChoices[ typeIndex ].ubChoices - 1;
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: 1 iChoice = %d",iChoice));
|
||||
for ( int i=0; i < gIMPItemChoices[typeIndex].ubNumItems ;i++ )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: 2 iChoice = %d",iChoice));
|
||||
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: typeIndex = %d, usItem = %d, iChoice = %d, abilityValue = %d",typeIndex, usItem,iChoice, abilityValue ));
|
||||
if ( usItem > 0 )
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
||||
|
||||
|
||||
// give ammo for guns
|
||||
if ( Item[usItem].usItemClass == IC_GUN && !Item[usItem].rocketlauncher )
|
||||
{
|
||||
usItem = DefaultMagazine(usItem);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: give ammo typeIndex = %d, usItem = %d",typeIndex, usItem ));
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,(1+Random(3)));
|
||||
}
|
||||
|
||||
// give launchables for launchers
|
||||
if ( Item[usItem].usItemClass == IC_LAUNCHER )
|
||||
{
|
||||
usItem = PickARandomLaunchable(usItem);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: give launchable typeIndex = %d, usItem = %d",typeIndex, usItem ));
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,(1+Random(3)));
|
||||
}
|
||||
|
||||
iChoice--;
|
||||
if (iChoice < 0)
|
||||
iChoice = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef __IMP_CONFIRM_H
|
||||
#define __IMP_CONFIRM_H
|
||||
|
||||
void EnterIMPConfirm( void );
|
||||
void RenderIMPConfirm( void );
|
||||
void ExitIMPConfirm( void );
|
||||
void HandleIMPConfirm( void );
|
||||
|
||||
BOOLEAN AddCharacterToPlayersTeam( void );
|
||||
void LoadInCurrentImpCharacter( void );
|
||||
void WriteOutCurrentImpCharacter( INT32 iProfileId );
|
||||
|
||||
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,694 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Finish.h"
|
||||
#include "IMP Portraits.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP Voices.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Timer Control.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Attribute Selection.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "soundman.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "text.h"
|
||||
#endif
|
||||
|
||||
// min time btween frames of animation
|
||||
#define ANIMATE_MIN_TIME 200
|
||||
|
||||
|
||||
#define MAIN_PAGE_SPACE_BTN_BUTTONS 120
|
||||
|
||||
#define MAIN_PAGE__FIRST_BUTTON_POS_X ( LAPTOP_SCREEN_UL_X + 15 )
|
||||
#define MAIN_PAGE__SECOND_BUTTON_POS_X ( MAIN_PAGE__FIRST_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||
#define MAIN_PAGE__THIRD_BUTTON_POS_X ( MAIN_PAGE__SECOND_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||
#define MAIN_PAGE__FOURTH_BUTTON_POS_X (MAIN_PAGE__THIRD_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||
|
||||
// buttons
|
||||
INT32 giIMPFinishButton[ 6 ];
|
||||
INT32 giIMPFinishButtonImage[ 6 ];
|
||||
|
||||
// we are in fact done
|
||||
BOOLEAN fFinishedCharGeneration = FALSE;
|
||||
|
||||
// portrait position
|
||||
INT16 sFaceX = 253;
|
||||
INT16 sFaceY = 245;
|
||||
|
||||
// what voice are we playing?
|
||||
UINT32 uiVoiceSound = 0;
|
||||
|
||||
// image handle
|
||||
UINT32 guiCHARACTERPORTRAIT;
|
||||
extern INT32 iCurrentPortrait;
|
||||
extern INT32 iCurrentVoices;
|
||||
|
||||
// function definitions
|
||||
void CreateIMPFinishButtons( void );
|
||||
void DeleteIMPFinishButtons( void );
|
||||
BOOLEAN RenderCharProfileFinishFace( void );
|
||||
void RenderCharFullName( void );
|
||||
BOOLEAN LoadCharacterPortrait( void );
|
||||
void DestroyCharacterPortrait( void );
|
||||
|
||||
|
||||
// callbacks
|
||||
void BtnIMPFinishVoiceCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPFinishAttributesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPFinishPersonalityCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPFinishStartOverCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPFinishDoneCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPFinishPortraitCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void FinishMessageBoxCallBack( UINT8 bExitValue );
|
||||
extern void BtnIMPMainPageVoiceCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
extern void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
|
||||
|
||||
|
||||
void EnterIMPFinish( void )
|
||||
{
|
||||
|
||||
|
||||
// load graphic for portrait
|
||||
LoadCharacterPortrait( );
|
||||
|
||||
// CREATE buttons for IMP finish screen
|
||||
CreateIMPFinishButtons( );
|
||||
|
||||
// set review mode
|
||||
fReviewStats = TRUE;
|
||||
iCurrentProfileMode = IMP__FINISH;
|
||||
|
||||
// note that we are in fact done char generation
|
||||
fFinishedCharGeneration = TRUE;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderIMPFinish( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// render merc fullname
|
||||
RenderCharFullName( );
|
||||
|
||||
// indent for text
|
||||
RenderBeginIndent( 110, 50 );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitIMPFinish( void )
|
||||
{
|
||||
|
||||
// remove buttons for IMP finish screen
|
||||
DeleteIMPFinishButtons( );
|
||||
|
||||
// get rid of graphic for portrait
|
||||
DestroyCharacterPortrait( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPFinish( void )
|
||||
{
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateIMPFinishButtons( void )
|
||||
{
|
||||
CHAR16 sString[ 128 ];
|
||||
|
||||
// this function will create the buttons needed for th IMP about us page
|
||||
// the start over button button
|
||||
giIMPFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/*giIMPFinishButton[0] = QuickCreateButton( giIMPFinishButtonImage[0], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 114 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishStartOverCallback);
|
||||
*/
|
||||
giIMPFinishButton[ 0 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 0 ], pImpButtonText[ 7 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishStartOverCallback);
|
||||
|
||||
// the done button
|
||||
giIMPFinishButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPFinishButton[1] = QuickCreateButton( giIMPFinishButtonImage[1], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishDoneCallback);
|
||||
*/
|
||||
giIMPFinishButton[ 1 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 1 ], pImpButtonText[ 6 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 114 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishDoneCallback);
|
||||
|
||||
// the personality button
|
||||
giIMPFinishButtonImage[2]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
|
||||
/* giIMPFinishButton[2] = QuickCreateButton( giIMPFinishButtonImage[2], LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPersonalityCallback);
|
||||
|
||||
*/ giIMPFinishButton[ 2 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 2 ], pImpButtonText[ 2 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__THIRD_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPersonalityCallback);
|
||||
|
||||
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 0, 33, 23, FALSE );
|
||||
|
||||
|
||||
|
||||
// the attribs button
|
||||
giIMPFinishButtonImage[3]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPFinishButton[3] = QuickCreateButton( giIMPFinishButtonImage[3], LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishAttributesCallback);
|
||||
*/
|
||||
giIMPFinishButton[ 3 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 3 ], pImpButtonText[ 3 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__FOURTH_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishAttributesCallback);
|
||||
|
||||
SpecifyButtonIcon( giIMPFinishButton[ 3 ], guiATTRIBUTEGRAPH, 0,
|
||||
25, 25, FALSE );
|
||||
|
||||
// the portrait button
|
||||
giIMPFinishButtonImage[4]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPFinishButton[4] = QuickCreateButton( giIMPFinishButtonImage[4], LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPortraitCallback);
|
||||
*/
|
||||
giIMPFinishButton[ 4 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 4 ], pImpButtonText[ 4 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__FIRST_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
|
||||
|
||||
SpecifyButtonIcon( giIMPFinishButton[ 4 ], guiCHARACTERPORTRAIT, 0,
|
||||
33, 23, FALSE );
|
||||
|
||||
swprintf( sString, pImpButtonText[ 5 ], iCurrentVoices + 1 );
|
||||
|
||||
// the voice button
|
||||
giIMPFinishButtonImage[5]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPFinishButton[5] = QuickCreateButton( giIMPFinishButtonImage[5], LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishVoiceCallback);
|
||||
*/
|
||||
giIMPFinishButton[ 5 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 5 ], sString, FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__SECOND_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
|
||||
|
||||
SpecifyButtonIcon( giIMPFinishButton[ 5 ], guiSMALLSILHOUETTE, 0,
|
||||
33, 23, FALSE );
|
||||
|
||||
|
||||
SetButtonCursor(giIMPFinishButton[0], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPFinishButton[1], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPFinishButton[2], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPFinishButton[3], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPFinishButton[4], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPFinishButton[5], CURSOR_WWW);
|
||||
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DeleteIMPFinishButtons( void )
|
||||
{
|
||||
// this function destroys the buttons needed for the IMP about Us Page
|
||||
|
||||
// the back button
|
||||
RemoveButton(giIMPFinishButton[0] );
|
||||
UnloadButtonImage(giIMPFinishButtonImage[0] );
|
||||
|
||||
// begin profiling button
|
||||
RemoveButton(giIMPFinishButton[1] );
|
||||
UnloadButtonImage(giIMPFinishButtonImage[1] );
|
||||
|
||||
// begin personna button
|
||||
RemoveButton(giIMPFinishButton[2] );
|
||||
UnloadButtonImage(giIMPFinishButtonImage[2] );
|
||||
|
||||
// begin attribs button
|
||||
RemoveButton(giIMPFinishButton[3] );
|
||||
UnloadButtonImage(giIMPFinishButtonImage[3] );
|
||||
|
||||
// begin portrait button
|
||||
RemoveButton(giIMPFinishButton[4] );
|
||||
UnloadButtonImage(giIMPFinishButtonImage[4] );
|
||||
|
||||
// begin voice button
|
||||
RemoveButton(giIMPFinishButton[5] );
|
||||
UnloadButtonImage(giIMPFinishButtonImage[5] );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPFinishStartOverCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, FinishMessageBoxCallBack);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPFinishDoneCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_CONFIRM;
|
||||
CreateACharacterFromPlayerEnteredStats( );
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentProfileMode = IMP__REGISTRY;
|
||||
fFinishedCharGeneration = FALSE;
|
||||
//ResetCharacterStats( );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPFinishPersonalityCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
static BOOLEAN fAnimateFlag = FALSE;
|
||||
static UINT32 uiBaseTime = 0;
|
||||
static BOOLEAN fState = 0;
|
||||
INT32 iDifference = 0;
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
uiBaseTime = GetJA2Clock();
|
||||
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 23 ] );
|
||||
fAnimateFlag = TRUE;
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
fButtonPendingFlag = TRUE;
|
||||
uiBaseTime = 0;
|
||||
fAnimateFlag = FALSE;
|
||||
iCurrentImpPage = IMP_PERSONALITY_QUIZ;
|
||||
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 2 ] );
|
||||
}
|
||||
}
|
||||
|
||||
// get amount of time between callbacks
|
||||
iDifference = GetJA2Clock() - uiBaseTime;
|
||||
|
||||
if( fAnimateFlag )
|
||||
{
|
||||
if( iDifference > ANIMATE_MIN_TIME )
|
||||
{
|
||||
|
||||
uiBaseTime = GetJA2Clock();
|
||||
if( fState )
|
||||
{
|
||||
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 1, 33, 23, FALSE );
|
||||
|
||||
fState = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 0, 33, 23, FALSE );
|
||||
|
||||
fState = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BtnIMPFinishAttributesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( iCurrentProfileMode < IMP__ATTRIBUTES )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 2 ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPFinishPortraitCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
sFaceX = 253;
|
||||
sFaceY = 247;
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
sFaceX = 253;
|
||||
sFaceY = 245;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPFinishVoiceCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
fButtonPendingFlag = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
// play voice
|
||||
if( ! SoundIsPlaying( uiVoiceSound ) )
|
||||
{
|
||||
uiVoiceSound = PlayVoice( );
|
||||
}
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN RenderCharProfileFinishFace( void )
|
||||
{
|
||||
|
||||
// render the portrait of the current picture
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
HVOBJECT hHandle;
|
||||
UINT32 uiGraphicHandle;
|
||||
|
||||
if( fCharacterIsMale == TRUE )
|
||||
{
|
||||
switch( LaptopSaveInfo.iVoiceId )
|
||||
{
|
||||
case( 0 ):
|
||||
// first portrait
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("Faces\\SmallFaces\\00.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
break;
|
||||
case( 1 ):
|
||||
// first portrait
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("Faces\\SmallFaces\\01.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
break;
|
||||
case( 2 ):
|
||||
// first portrait
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("Faces\\SmallFaces\\02.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( LaptopSaveInfo.iVoiceId )
|
||||
{
|
||||
case( 0 ):
|
||||
// first portrait
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("Faces\\SmallFaces\\03.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
break;
|
||||
case( 1 ):
|
||||
// first portrait
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("Faces\\SmallFaces\\04.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
break;
|
||||
case( 2 ):
|
||||
// first portrait
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("Faces\\SmallFaces\\05.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// render the nickname
|
||||
SetFontForeground( FONT_WHITE );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
SetFont( FONT12ARIAL );
|
||||
|
||||
mprintf( 253, 350, pNickName );
|
||||
|
||||
return( TRUE );
|
||||
|
||||
}
|
||||
|
||||
void RenderCharFullName( void )
|
||||
{
|
||||
|
||||
CHAR16 sString[ 64 ];
|
||||
INT16 sX, sY;
|
||||
|
||||
// render the characters full name
|
||||
SetFont( FONT14ARIAL );
|
||||
SetFontForeground( FONT_WHITE );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
swprintf( sString, pIMPFinishStrings[ 0 ], pFullName );
|
||||
|
||||
|
||||
FindFontCenterCoordinates(LAPTOP_SCREEN_UL_X - 111, 0, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 0 , sString , FONT14ARIAL, &sX, &sY);
|
||||
mprintf( sX, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y + 33, sString );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN LoadCharacterPortrait( void )
|
||||
{
|
||||
// this function will load the character's portrait, to be used on portrait button
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAIT));
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
void DestroyCharacterPortrait( void )
|
||||
{
|
||||
// remove the portrait that was loaded by loadcharacterportrait
|
||||
DeleteVideoObjectFromIndex( guiCHARACTERPORTRAIT );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void FinishMessageBoxCallBack( UINT8 bExitValue )
|
||||
{
|
||||
// yes, so start over, else stay here and do nothing for now
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentProfileMode = IMP__REGISTRY;
|
||||
fFinishedCharGeneration = FALSE;
|
||||
ResetCharacterStats( );
|
||||
}
|
||||
|
||||
if( bExitValue == MSG_BOX_RETURN_NO )
|
||||
{
|
||||
MarkButtonsDirty( );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef __IMP_FINISH_H
|
||||
#define __IMP_FINISH_H
|
||||
|
||||
|
||||
void EnterIMPFinish( void );
|
||||
void RenderIMPFinish( void );
|
||||
void ExitIMPFinish( void );
|
||||
void HandleIMPFinish( void );
|
||||
|
||||
extern BOOLEAN fFinishedCharGeneration;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,483 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "Timer Control.h"
|
||||
#include "Text Input.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "line.h"
|
||||
#include "english.h"
|
||||
#endif
|
||||
|
||||
void GetPlayerKeyBoardInputForIMPHomePage( void );
|
||||
void DisplayPlayerActivationString( void );
|
||||
void ProcessPlayerInputActivationString( void );
|
||||
void GetPlayerKeyBoardInputForIMPHomePage( void );
|
||||
void HandleTextEvent( UINT32 uiKey );
|
||||
void CreateIMPHomePageButtons( void );
|
||||
void RemoveIMPHomePageButtons( void );
|
||||
void DisplayActivationStringCursor( void );
|
||||
|
||||
INT32 GlowColorsList[][3] ={
|
||||
{ 0,0,0 },
|
||||
{ 0,25,0 },
|
||||
{ 0,50,0 },
|
||||
{ 0,75,0 },
|
||||
{ 0,100,0 },
|
||||
{ 0,125,0 },
|
||||
{ 0,150,0 },
|
||||
{ 0,175,0 },
|
||||
{ 0,200,0 },
|
||||
{ 0,225,0 },
|
||||
{ 0,255,0 },
|
||||
};
|
||||
|
||||
// btn callbacks
|
||||
void BtnIMPAboutUsCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
// position defines
|
||||
#define IMP_PLAYER_ACTIVATION_STRING_X LAPTOP_SCREEN_UL_X + 261
|
||||
#define IMP_PLAYER_ACTIVATION_STRING_Y LAPTOP_SCREEN_WEB_UL_Y + 336
|
||||
#define CURSOR_Y IMP_PLAYER_ACTIVATION_STRING_Y - 5
|
||||
#define CURSOR_HEIGHT GetFontHeight( FONT14ARIAL ) + 6
|
||||
|
||||
|
||||
// IMP homepage buttons
|
||||
INT32 giIMPHomePageButton[1];
|
||||
INT32 giIMPHomePageButtonImage[1];
|
||||
|
||||
// the player activation string
|
||||
CHAR16 pPlayerActivationString[32];
|
||||
|
||||
// position within player activation string
|
||||
INT32 iStringPos=0;
|
||||
UINT16 uiCursorPosition = IMP_PLAYER_ACTIVATION_STRING_X;
|
||||
|
||||
|
||||
// has a new char been added or deleted?
|
||||
BOOLEAN fNewCharInActivationString = FALSE;
|
||||
|
||||
void EnterImpHomePage( void )
|
||||
{
|
||||
// upon entry to Imp home page
|
||||
memset(pPlayerActivationString, 0, sizeof(pPlayerActivationString));
|
||||
|
||||
// reset string position
|
||||
iStringPos =0;
|
||||
|
||||
// reset activation cursor position
|
||||
uiCursorPosition = IMP_PLAYER_ACTIVATION_STRING_X;
|
||||
|
||||
// load buttons
|
||||
CreateIMPHomePageButtons( );
|
||||
|
||||
// we have now vsisited IMP, reset fact we haven't
|
||||
fNotVistedImpYet = FALSE;
|
||||
|
||||
// render screen once
|
||||
RenderImpHomePage( );
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderImpHomePage( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// the IMP symbol
|
||||
RenderIMPSymbol( 107, 45 );
|
||||
|
||||
// the second button image
|
||||
RenderButton2Image( 134, 314);
|
||||
|
||||
// render the indents
|
||||
|
||||
//activation indents
|
||||
RenderActivationIndent( 257, 328 );
|
||||
|
||||
// the two font page indents
|
||||
RenderFrontPageIndent( 3, 64 );
|
||||
RenderFrontPageIndent( 396,64 );
|
||||
|
||||
|
||||
// render the activation string
|
||||
DisplayPlayerActivationString( );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitImpHomePage( void )
|
||||
{
|
||||
|
||||
// remove buttons
|
||||
RemoveIMPHomePageButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleImpHomePage( void )
|
||||
{
|
||||
|
||||
// handle keyboard input for this screen
|
||||
GetPlayerKeyBoardInputForIMPHomePage( );
|
||||
|
||||
// has a new char been added to activation string
|
||||
if( fNewCharInActivationString )
|
||||
{
|
||||
// display string
|
||||
DisplayPlayerActivationString( );
|
||||
}
|
||||
|
||||
// render the cursor
|
||||
DisplayActivationStringCursor( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DisplayPlayerActivationString( void )
|
||||
{
|
||||
|
||||
// this function will grab the string that the player will enter for activation
|
||||
INT32 iCounter=0;
|
||||
|
||||
// player gone too far, move back
|
||||
if(iStringPos > 64)
|
||||
{
|
||||
iStringPos = 64;
|
||||
}
|
||||
|
||||
// restore background
|
||||
RenderActivationIndent( 257, 328 );
|
||||
|
||||
// setup the font stuff
|
||||
SetFont( FONT14ARIAL );
|
||||
SetFontForeground( 184 );
|
||||
SetFontBackground(FONT_BLACK);
|
||||
|
||||
|
||||
// reset shadow
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
mprintf(IMP_PLAYER_ACTIVATION_STRING_X, IMP_PLAYER_ACTIVATION_STRING_Y, pPlayerActivationString);
|
||||
|
||||
|
||||
fNewCharInActivationString = FALSE;
|
||||
fReDrawScreenFlag = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DisplayActivationStringCursor( void )
|
||||
{
|
||||
// this procdure will draw the activation string cursor on the screen at position cursorx cursory
|
||||
UINT32 uiDestPitchBYTES;
|
||||
static UINT32 uiBaseTime = 0;
|
||||
UINT32 uiDeltaTime = 0;
|
||||
UINT8 *pDestBuf;
|
||||
static UINT32 iCurrentState = 0;
|
||||
static BOOLEAN fIncrement = TRUE;
|
||||
|
||||
if(uiBaseTime == 0)
|
||||
{
|
||||
uiBaseTime = GetJA2Clock();
|
||||
}
|
||||
|
||||
// get difference
|
||||
uiDeltaTime = GetJA2Clock() - uiBaseTime;
|
||||
|
||||
// if difference is long enough, rotate colors
|
||||
if(uiDeltaTime > MIN_GLOW_DELTA)
|
||||
{
|
||||
if( iCurrentState == 10)
|
||||
{
|
||||
// start rotating downward
|
||||
fIncrement = FALSE;
|
||||
}
|
||||
if( iCurrentState == 0)
|
||||
{
|
||||
// rotate colors upward
|
||||
fIncrement = TRUE;
|
||||
}
|
||||
// if increment upward, increment iCurrentState
|
||||
if(fIncrement)
|
||||
{
|
||||
iCurrentState++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// else downwards
|
||||
iCurrentState--;
|
||||
}
|
||||
// reset basetime to current clock
|
||||
uiBaseTime = GetJA2Clock( );
|
||||
}
|
||||
|
||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
|
||||
|
||||
// draw line in current state
|
||||
LineDraw(TRUE, (UINT16) uiCursorPosition, CURSOR_Y, (UINT16)uiCursorPosition, CURSOR_Y + CURSOR_HEIGHT, Get16BPPColor( FROMRGB( GlowColorsList[ iCurrentState ][ 0 ], GlowColorsList[ iCurrentState ][ 1 ], GlowColorsList[ iCurrentState ][ 2 ] ) ),
|
||||
pDestBuf );
|
||||
|
||||
// unlock frame buffer
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
|
||||
InvalidateRegion((UINT16) uiCursorPosition , CURSOR_Y , (UINT16)uiCursorPosition + 1, CURSOR_Y + CURSOR_HEIGHT + 1);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GetPlayerKeyBoardInputForIMPHomePage( void )
|
||||
{
|
||||
InputAtom InputEvent;
|
||||
POINT MousePos;
|
||||
|
||||
GetCursorPos(&MousePos);
|
||||
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
{
|
||||
// HOOK INTO MOUSE HOOKS
|
||||
/*
|
||||
switch(InputEvent.usEvent)
|
||||
{
|
||||
case LEFT_BUTTON_DOWN:
|
||||
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case LEFT_BUTTON_UP:
|
||||
MouseSystemHook(LEFT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case RIGHT_BUTTON_DOWN:
|
||||
MouseSystemHook(RIGHT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case RIGHT_BUTTON_UP:
|
||||
MouseSystemHook(RIGHT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) )
|
||||
{
|
||||
switch( InputEvent.usParam )
|
||||
{
|
||||
case (( ENTER ) ):
|
||||
if(( InputEvent.usEvent == KEY_UP ) )
|
||||
{
|
||||
// return hit, check to see if current player activation string is a valid one
|
||||
ProcessPlayerInputActivationString( );
|
||||
|
||||
fNewCharInActivationString = TRUE;
|
||||
}
|
||||
break;
|
||||
case (( ESC )):
|
||||
LeaveLapTopScreen( );
|
||||
break;
|
||||
default:
|
||||
if(InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
|
||||
{
|
||||
HandleTextEvent( InputEvent.usParam );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleTextEvent( UINT32 uiKey )
|
||||
{
|
||||
// this function checks to see if a letter or a backspace was pressed, if so, either put char to screen
|
||||
// or delete it
|
||||
|
||||
switch( uiKey )
|
||||
{
|
||||
case ( BACKSPACE ):
|
||||
|
||||
if( iStringPos >= 0 )
|
||||
{
|
||||
|
||||
if( iStringPos > 0 )
|
||||
{
|
||||
// decrement iStringPosition
|
||||
iStringPos-=1;
|
||||
}
|
||||
|
||||
// null out char
|
||||
pPlayerActivationString[iStringPos ] = 0;
|
||||
|
||||
// move back cursor
|
||||
uiCursorPosition = StringPixLength( pPlayerActivationString, FONT14ARIAL ) + IMP_PLAYER_ACTIVATION_STRING_X;
|
||||
|
||||
|
||||
|
||||
// string has been altered, redisplay
|
||||
fNewCharInActivationString = TRUE;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
if( uiKey >= 'A' && uiKey <= 'Z' ||
|
||||
uiKey >= 'a' && uiKey <= 'z' ||
|
||||
uiKey >= '0' && uiKey <= '9' ||
|
||||
uiKey == '_' || uiKey == '.' )
|
||||
{
|
||||
// if the current string position is at max or great, do nothing
|
||||
if( iStringPos >= 6 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(iStringPos < 0 )
|
||||
{
|
||||
iStringPos = 0;
|
||||
}
|
||||
// valid char, capture and convert to CHAR16
|
||||
pPlayerActivationString[iStringPos] = ( CHAR16 )uiKey;
|
||||
|
||||
// null out next char position
|
||||
pPlayerActivationString[iStringPos + 1] = 0;
|
||||
|
||||
// move cursor position ahead
|
||||
uiCursorPosition = StringPixLength( pPlayerActivationString, FONT14ARIAL ) + IMP_PLAYER_ACTIVATION_STRING_X;
|
||||
|
||||
// increment string position
|
||||
iStringPos +=1;
|
||||
|
||||
// string has been altered, redisplay
|
||||
fNewCharInActivationString = TRUE;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ProcessPlayerInputActivationString( void )
|
||||
{
|
||||
// prcess string to see if it matches activation string
|
||||
|
||||
if( NumberOfMercsOnPlayerTeam() >= 18 )
|
||||
return;
|
||||
|
||||
//Madd multiple imps if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) )&&( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
|
||||
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
|
||||
{
|
||||
// Kaiden: Need to reset skills, attributes and personalities with the new UB Method.
|
||||
ResetSkillsAttributesAndPersonality( );
|
||||
ClearAllSkillsList( );
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
}
|
||||
//Madd multiple imps else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) && ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) )
|
||||
else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) )
|
||||
{
|
||||
LoadInCurrentImpCharacter( );
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") != 0 ) && ( wcscmp(pPlayerActivationString, L"xep624") != 0 ) ) )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 0 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
else if( LaptopSaveInfo.fIMPCompletedFlag == TRUE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 6 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateIMPHomePageButtons( void )
|
||||
{
|
||||
// this procedure will create the buttons needed for the IMP homepage
|
||||
|
||||
// ths about us button
|
||||
giIMPHomePageButtonImage[0]= LoadButtonImage( "LAPTOP\\button_1.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPHomePageButton[0] = QuickCreateButton( giIMPHomePageButtonImage[0], LAPTOP_SCREEN_UL_X + ( 286 - 106 ), LAPTOP_SCREEN_WEB_UL_Y + ( 248 - 48 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAboutUsCallback);
|
||||
*/
|
||||
|
||||
giIMPHomePageButton[0] = CreateIconAndTextButton( giIMPHomePageButtonImage[0], pImpButtonText[ 0 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 286 - 106 ), LAPTOP_SCREEN_WEB_UL_Y + ( 248 - 48), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAboutUsCallback);
|
||||
|
||||
|
||||
SetButtonCursor(giIMPHomePageButton[ 0 ], CURSOR_WWW);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RemoveIMPHomePageButtons( void )
|
||||
{
|
||||
// this procedure will destroy the already created buttosn for the IMP homepage
|
||||
|
||||
// the about us button
|
||||
RemoveButton(giIMPHomePageButton[0] );
|
||||
UnloadButtonImage(giIMPHomePageButtonImage[0] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BtnIMPAboutUsCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_ABOUT_US;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __IMP_HOME_H
|
||||
#define __IMP_HOME_H
|
||||
|
||||
|
||||
|
||||
void EnterImpHomePage( void );
|
||||
void RenderImpHomePage( void );
|
||||
void ExitImpHomePage( void );
|
||||
void HandleImpHomePage( void );
|
||||
|
||||
// minimun glow time
|
||||
#define MIN_GLOW_DELTA 100
|
||||
#define CURSOR_HEIGHT GetFontHeight( FONT14ARIAL ) + 6
|
||||
|
||||
extern INT32 GlowColorsList[][3];
|
||||
#endif
|
||||
@@ -0,0 +1,881 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "IMP MainPage.h"
|
||||
#include "CharProfile.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "finances.h"
|
||||
#include "IMP Attribute Selection.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Finish.h"
|
||||
#include "mousesystem.h"
|
||||
#include "Merc Hiring.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "IMP Portraits.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define MAIN_PAGE_BUTTON_TEXT_WIDTH 95
|
||||
|
||||
|
||||
#define MAIN_PAGE_SPACE_BTN_BUTTONS 120
|
||||
|
||||
#define MAIN_PAGE__FIRST_BUTTON_POS_X ( LAPTOP_SCREEN_UL_X + 15 )
|
||||
#define MAIN_PAGE__SECOND_BUTTON_POS_X ( MAIN_PAGE__FIRST_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||
#define MAIN_PAGE__THIRD_BUTTON_POS_X ( MAIN_PAGE__SECOND_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||
#define MAIN_PAGE__FOURTH_BUTTON_POS_X ( MAIN_PAGE__THIRD_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||
|
||||
|
||||
// main page buttons
|
||||
INT32 giIMPMainPageButton[6];
|
||||
INT32 giIMPMainPageButtonImage[6];
|
||||
|
||||
extern INT32 iCurrentVoices;
|
||||
|
||||
// mouse regions for not entablable warning
|
||||
MOUSE_REGION pIMPMainPageMouseRegions[ 4 ];
|
||||
|
||||
UINT32 guiCHARACTERPORTRAITFORMAINPAGE;
|
||||
|
||||
// function definitions
|
||||
void CreateIMPMainPageButtons( void );
|
||||
void DeleteIMPMainPageButtons( void );
|
||||
void BtnIMPMainPageBackCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPMainPagePersonalityCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPMainPageAttributesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPMainPageVoiceCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void ShadeUnSelectableButtons( void );
|
||||
void UpDateIMPMainPageButtons( void );
|
||||
void BeginMessageBoxCallBack( UINT8 bExitValue );
|
||||
void DestoryMouseRegionsForIMPMainPageBasedOnCharGenStatus( void );
|
||||
void CreateMouseRegionsForIMPMainPageBasedOnCharGenStatus( void );
|
||||
void IMPMainPageNotSelectableBtnCallback(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
BOOLEAN LoadCharacterPortraitForMainPage( void );
|
||||
BOOLEAN IMP_CanWeDisplayVoiceGraph( );
|
||||
BOOLEAN IMP_CanWeDisplaySpecialtiesGraph( );
|
||||
BOOLEAN IMP_CanWeDisplayAttributeGraph( );
|
||||
BOOLEAN IMP_CanWeDisplayPortrait( );
|
||||
|
||||
|
||||
BOOLEAN CheckIfFinishedCharacterGeneration( void );
|
||||
|
||||
// this is the current state of profiling the player is in.
|
||||
/*
|
||||
0 - Beginning
|
||||
1 - Personnality
|
||||
2 - Attributes and Skills
|
||||
3 - Portrait
|
||||
4 - Voice
|
||||
5 - Done
|
||||
*/
|
||||
|
||||
INT32 iCurrentProfileMode = IMP__REGISTRY;
|
||||
|
||||
|
||||
|
||||
void EnterIMPMainPage( void )
|
||||
{
|
||||
|
||||
// turn off review mode
|
||||
fReviewStats = FALSE;
|
||||
|
||||
|
||||
// create buttons
|
||||
CreateIMPMainPageButtons( );
|
||||
|
||||
// load portrait for face button, if applicable
|
||||
LoadCharacterPortraitForMainPage( );
|
||||
|
||||
// create button masks for this screen
|
||||
CreateMouseRegionsForIMPMainPageBasedOnCharGenStatus( );
|
||||
|
||||
// alter states
|
||||
UpDateIMPMainPageButtons( );
|
||||
|
||||
// entry into IMP about us page
|
||||
RenderIMPMainPage( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPMainPage( void )
|
||||
{
|
||||
// exit from IMP About us page
|
||||
|
||||
// delete Buttons
|
||||
DeleteIMPMainPageButtons( );
|
||||
DestoryMouseRegionsForIMPMainPageBasedOnCharGenStatus( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPMainPage( void )
|
||||
{
|
||||
// rneders the IMP about us page
|
||||
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// the IMP symbol
|
||||
//RenderIMPSymbol( 106, 1 );
|
||||
// indent
|
||||
RenderMainIndentFrame( 164, 74 );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPMainPage( void )
|
||||
{
|
||||
// handles the IMP about main page
|
||||
|
||||
if ( CheckIfFinishedCharacterGeneration( ) )
|
||||
{
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
}
|
||||
// shade out buttons that should be shaded/unselectable
|
||||
//ShadeUnSelectableButtons( );
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// this function will create the buttons needed for th IMP about us page
|
||||
//
|
||||
void CreateIMPMainPageButtons( void )
|
||||
{
|
||||
UINT16 usPosX=0;
|
||||
|
||||
CHAR16 sString[ 128 ];
|
||||
|
||||
|
||||
// the back button button
|
||||
giIMPMainPageButtonImage[0]= LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
||||
|
||||
|
||||
/* giIMPMainPageButton[0] = QuickCreateButton( giIMPMainPageButtonImage[0], LAPTOP_SCREEN_UL_X + 10 , LAPTOP_SCREEN_WEB_UL_Y + ( 360 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBackCallback);
|
||||
|
||||
*/
|
||||
|
||||
//Cancel/back button
|
||||
giIMPMainPageButton[0] = CreateIconAndTextButton( giIMPMainPageButtonImage[0], pImpButtonText[ 19 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 15, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBackCallback);
|
||||
|
||||
|
||||
SpecifyButtonTextSubOffsets( giIMPMainPageButton[0], 0, -1, FALSE );
|
||||
|
||||
// the begin profiling button
|
||||
giIMPMainPageButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/*giIMPMainPageButton[1] = QuickCreateButton( giIMPMainPageButtonImage[1], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBeginCallback);
|
||||
*/
|
||||
|
||||
//Registry/Begin button
|
||||
if(( iCurrentProfileMode == IMP__REGISTRY )||( iCurrentProfileMode > IMP__ATTRIBUTES) )
|
||||
{
|
||||
giIMPMainPageButton[1] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 1 ], pImpButtonText[ 1 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBeginCallback);
|
||||
}
|
||||
else
|
||||
{
|
||||
giIMPMainPageButton[1] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 1 ], pImpButtonText[ 22 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBeginCallback);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// the personality button
|
||||
giIMPMainPageButtonImage[2]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
|
||||
/*
|
||||
giIMPMainPageButton[2] = QuickCreateButton( giIMPMainPageButtonImage[2], LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePersonalityCallback);
|
||||
*/
|
||||
//Personality
|
||||
giIMPMainPageButton[2] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 2 ], pImpButtonText[ 2 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__THIRD_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePersonalityCallback);
|
||||
|
||||
|
||||
if( IMP_CanWeDisplaySpecialtiesGraph( ) )
|
||||
{
|
||||
SpecifyButtonIcon( giIMPMainPageButton[2], guiANALYSE, 0, 33, 23, FALSE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// the attribs button
|
||||
giIMPMainPageButtonImage[3]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
|
||||
/*
|
||||
giIMPMainPageButton[3] = QuickCreateButton( giIMPMainPageButtonImage[3], LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageAttributesCallback);
|
||||
*/
|
||||
//Attributes
|
||||
giIMPMainPageButton[3] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 3 ], pImpButtonText[ 3 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__FOURTH_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageAttributesCallback);
|
||||
|
||||
if( IMP_CanWeDisplayAttributeGraph( ) )
|
||||
{
|
||||
SpecifyButtonIcon( giIMPMainPageButton[3], guiATTRIBUTEGRAPH, 0, 25, 25, FALSE );
|
||||
}
|
||||
|
||||
|
||||
// the portrait button
|
||||
giIMPMainPageButtonImage[4]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
|
||||
/*giIMPMainPageButton[4] = QuickCreateButton( giIMPMainPageButtonImage[4], LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
|
||||
*/
|
||||
|
||||
//Portrait
|
||||
giIMPMainPageButton[4] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 4 ], pImpButtonText[ 4 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__FIRST_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
|
||||
|
||||
|
||||
|
||||
// the voice button
|
||||
giIMPMainPageButtonImage[5]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||
/*giIMPMainPageButton[5] = QuickCreateButton( giIMPMainPageButtonImage[5], LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
|
||||
*/
|
||||
|
||||
if( iCurrentProfileMode != IMP__VOICE && iCurrentProfileMode != IMP__PORTRAIT )
|
||||
{
|
||||
swprintf( sString, pImpButtonText[ 5 ], iCurrentVoices + 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, pImpButtonText[ 25 ] );
|
||||
}
|
||||
|
||||
//Voice
|
||||
giIMPMainPageButton[5] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 5 ], sString, FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
MAIN_PAGE__SECOND_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
|
||||
|
||||
if( IMP_CanWeDisplayVoiceGraph( ) )
|
||||
{
|
||||
SpecifyButtonIcon( giIMPMainPageButton[5], guiSMALLSILHOUETTE, 0, 33, 23, FALSE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SetButtonCursor(giIMPMainPageButton[ 0 ], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPMainPageButton[ 1 ], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPMainPageButton[ 2 ], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPMainPageButton[ 3 ], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPMainPageButton[ 4 ], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPMainPageButton[ 5 ], CURSOR_WWW);
|
||||
|
||||
SpecifyButtonTextOffsets( giIMPMainPageButton[ 2 ], 10, 40, TRUE );
|
||||
SpecifyButtonTextOffsets( giIMPMainPageButton[ 3 ], 10, 40, TRUE );
|
||||
SpecifyButtonTextOffsets( giIMPMainPageButton[ 4 ], 10, 40, TRUE );
|
||||
SpecifyButtonTextOffsets( giIMPMainPageButton[ 5 ], 10, 40, TRUE );
|
||||
|
||||
|
||||
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 2 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
|
||||
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 3 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
|
||||
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 4 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
|
||||
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 5 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DeleteIMPMainPageButtons( void )
|
||||
{
|
||||
// this function destroys the buttons needed for the IMP about Us Page
|
||||
|
||||
// the back button
|
||||
RemoveButton(giIMPMainPageButton[0] );
|
||||
UnloadButtonImage(giIMPMainPageButtonImage[0] );
|
||||
|
||||
// begin profiling button
|
||||
RemoveButton(giIMPMainPageButton[1] );
|
||||
UnloadButtonImage(giIMPMainPageButtonImage[1] );
|
||||
|
||||
// begin personna button
|
||||
RemoveButton(giIMPMainPageButton[2] );
|
||||
UnloadButtonImage(giIMPMainPageButtonImage[2] );
|
||||
|
||||
// begin attribs button
|
||||
RemoveButton(giIMPMainPageButton[3] );
|
||||
UnloadButtonImage(giIMPMainPageButtonImage[3] );
|
||||
|
||||
// begin portrait button
|
||||
RemoveButton(giIMPMainPageButton[4] );
|
||||
UnloadButtonImage(giIMPMainPageButtonImage[4] );
|
||||
|
||||
// begin voice button
|
||||
RemoveButton(giIMPMainPageButton[5] );
|
||||
UnloadButtonImage(giIMPMainPageButtonImage[5] );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void BtnIMPMainPageBackCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP Homepage About US button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_HOME_PAGE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentProfileMode = IMP__REGISTRY;
|
||||
fFinishedCharGeneration = FALSE;
|
||||
ResetCharacterStats( );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
// too far along to change gender
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// are we going to change name, or do we have to start over from scratch
|
||||
if( iCurrentProfileMode > IMP__ATTRIBUTES )
|
||||
{
|
||||
// too far along, restart
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, BeginMessageBoxCallBack);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
|
||||
|
||||
}
|
||||
else if( NumberOfMercsOnPlayerTeam() >= 18 )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 5 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
|
||||
}
|
||||
else
|
||||
{
|
||||
// change name
|
||||
iCurrentImpPage = IMP_BEGIN;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPMainPagePersonalityCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
/*
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( iCurrentProfileMode != IMP__PERSONALITY )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_PERSONALITY;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPMainPageAttributesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( iCurrentProfileMode < IMP__ATTRIBUTES )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_ATTRIBUTE_ENTRANCE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( ( iCurrentProfileMode != IMP__PORTRAIT )&&( iCurrentProfileMode != IMP__VOICE ) && ( iCurrentProfileMode > IMP__FINISH ) )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_PORTRAIT;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPMainPageVoiceCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for Main Page Begin Profiling
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
// if not this far in char generation, don't alot ANY action
|
||||
if( ( iCurrentProfileMode != IMP__PORTRAIT ) && ( iCurrentProfileMode > IMP__FINISH ) )
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
iCurrentImpPage = IMP_VOICE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void NextProfilingMode( void )
|
||||
{
|
||||
// this function will change to mode the player is in for profiling
|
||||
|
||||
// if less than done
|
||||
if(iCurrentProfileMode < IMP__VOICE)
|
||||
iCurrentProfileMode++;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
BOOLEAN CheckIfFinishedCharacterGeneration( void )
|
||||
{
|
||||
// this function checks to see if character is done character generation
|
||||
|
||||
// are we done character generation
|
||||
if( iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
// yes
|
||||
return ( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// no
|
||||
return ( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
void ShadeUnSelectableButtons( void )
|
||||
{
|
||||
|
||||
INT32 iCounter =0;
|
||||
// this function looks at the status ofiCurrentProfileMode and decides which buttons
|
||||
// should be shaded ( unselectable )
|
||||
|
||||
for( iCounter = iCurrentProfileMode; iCounter < 5; iCounter++ )
|
||||
{
|
||||
ShadowVideoSurfaceRect( FRAME_BUFFER, 13 + (iCounter ) * 120 + 114, 245, 13 + ( iCounter + 1 ) * 120 + 90, 245 + 92 );
|
||||
InvalidateRegion(13 + (iCounter ) * 120 + 114, 245, 13 + (iCounter ) * 120 + 114, 245 + 92 );
|
||||
}
|
||||
|
||||
fMarkButtonsDirtyFlag = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void UpDateIMPMainPageButtons( void )
|
||||
{
|
||||
// update mainpage button states
|
||||
INT32 iCount = 0;
|
||||
|
||||
// disable all
|
||||
for( iCount = 2; iCount < 6; iCount++)
|
||||
{
|
||||
DisableButton( giIMPMainPageButton[ iCount ] );
|
||||
}
|
||||
|
||||
for( iCount = 0; iCount < 4; iCount++ )
|
||||
{
|
||||
MSYS_DisableRegion( &pIMPMainPageMouseRegions[ iCount ]);
|
||||
}
|
||||
// enable
|
||||
switch( iCurrentProfileMode )
|
||||
{
|
||||
//begin
|
||||
case IMP__REGISTRY:
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
break;
|
||||
|
||||
//Personality ( 3RD BUTTON )
|
||||
case IMP__PERSONALITY:
|
||||
EnableButton( giIMPMainPageButton[2] );
|
||||
EnableButton( giIMPMainPageButton[4] );
|
||||
EnableButton( giIMPMainPageButton[5] );
|
||||
|
||||
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
/*
|
||||
EnableButton( giIMPMainPageButton[2] );
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
*/
|
||||
break;
|
||||
|
||||
//Attributes ( 4th button )
|
||||
case IMP__ATTRIBUTES:
|
||||
EnableButton( giIMPMainPageButton[2] );
|
||||
EnableButton( giIMPMainPageButton[4] );
|
||||
EnableButton( giIMPMainPageButton[5] );
|
||||
EnableButton( giIMPMainPageButton[3] );
|
||||
|
||||
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
/*
|
||||
EnableButton( giIMPMainPageButton[3] );
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
*/
|
||||
break;
|
||||
|
||||
//Portrait ( ist button
|
||||
case IMP__PORTRAIT:
|
||||
// EnableButton( giIMPMainPageButton[3] );
|
||||
EnableButton( giIMPMainPageButton[4] );
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
/*
|
||||
EnableButton( giIMPMainPageButton[3] );
|
||||
EnableButton( giIMPMainPageButton[4] );
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
//MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
*/
|
||||
break;
|
||||
|
||||
//Voice ( 2nd button )
|
||||
case IMP__VOICE:
|
||||
EnableButton( giIMPMainPageButton[4] );
|
||||
EnableButton( giIMPMainPageButton[5] );
|
||||
|
||||
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
/*
|
||||
//MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
EnableButton( giIMPMainPageButton[3] );
|
||||
EnableButton( giIMPMainPageButton[4] );
|
||||
EnableButton( giIMPMainPageButton[5] );
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void BeginMessageBoxCallBack( UINT8 bExitValue )
|
||||
{
|
||||
// yes, so start over, else stay here and do nothing for now
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
iCurrentImpPage = IMP_BEGIN;
|
||||
iCurrentProfileMode = IMP__REGISTRY;
|
||||
}
|
||||
|
||||
else if( bExitValue == MSG_BOX_RETURN_OK )
|
||||
{
|
||||
// if ok, then we are coming from financial warning, allow continue
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateMouseRegionsForIMPMainPageBasedOnCharGenStatus( void )
|
||||
{
|
||||
// this procedure will create masks for the char generation main page
|
||||
|
||||
|
||||
// mask for personality page button
|
||||
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 0 ],LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 13 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
|
||||
|
||||
// mask for attrib page button
|
||||
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 1 ],LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 133 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
|
||||
|
||||
|
||||
|
||||
// mask for portrait page button
|
||||
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 2 ],LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 253 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
|
||||
|
||||
|
||||
|
||||
|
||||
// mask for voice page button
|
||||
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 3 ],LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 373 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DestoryMouseRegionsForIMPMainPageBasedOnCharGenStatus( void )
|
||||
{
|
||||
// will destroy button masks for the char gen pages
|
||||
|
||||
|
||||
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 0 ]);
|
||||
|
||||
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 1 ]);
|
||||
|
||||
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 2 ]);
|
||||
|
||||
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 3 ]);
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void IMPMainPageNotSelectableBtnCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 4 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN LoadCharacterPortraitForMainPage( void )
|
||||
{
|
||||
// this function will load the character's portrait, to be used on portrait button
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
if( IMP_CanWeDisplayPortrait( ) )
|
||||
{
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAITFORMAINPAGE));
|
||||
|
||||
|
||||
// now specify
|
||||
SpecifyButtonIcon( giIMPMainPageButton[4], guiCHARACTERPORTRAITFORMAINPAGE, 0,
|
||||
33, 23, FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN IMP_CanWeDisplayPortrait( )
|
||||
{
|
||||
if( iCurrentProfileMode == IMP__VOICE ||
|
||||
iCurrentProfileMode == IMP__ATTRIBUTES ||
|
||||
iCurrentProfileMode == IMP__PERSONALITY ||
|
||||
iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN IMP_CanWeDisplayAttributeGraph( )
|
||||
{
|
||||
if( iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN IMP_CanWeDisplaySpecialtiesGraph( )
|
||||
{
|
||||
if( iCurrentProfileMode == IMP__ATTRIBUTES ||
|
||||
iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN IMP_CanWeDisplayVoiceGraph( )
|
||||
{
|
||||
if( iCurrentProfileMode == IMP__ATTRIBUTES ||
|
||||
// iCurrentProfileMode == IMP__VOICE ||
|
||||
iCurrentProfileMode == IMP__PERSONALITY ||
|
||||
iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef __IMP_MAINPAGE_H
|
||||
#define __IMP_MAINPAGE_H
|
||||
#include "types.h"
|
||||
|
||||
void RenderIMPMainPage( void );
|
||||
void ExitIMPMainPage( void );
|
||||
void EnterIMPMainPage( void );
|
||||
void HandleIMPMainPage( void );
|
||||
void NextProfilingMode( void );
|
||||
void ShadeUnSelectableButtons( void );
|
||||
|
||||
|
||||
extern INT32 iCurrentProfileMode;
|
||||
|
||||
|
||||
//enums for the various Profile modes
|
||||
enum
|
||||
{
|
||||
IMP__REGISTRY,
|
||||
IMP__PERSONALITY,
|
||||
IMP__ATTRIBUTES,
|
||||
IMP__PORTRAIT,
|
||||
IMP__VOICE,
|
||||
IMP__FINISH,
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,130 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Personality Entrance.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#endif
|
||||
|
||||
// IMP personality entrance buttons
|
||||
INT32 giIMPPersonalityEntranceButton[1];
|
||||
INT32 giIMPPersonalityEntranceButtonImage[1];
|
||||
|
||||
|
||||
// function definitions
|
||||
void CreateIMPPersonalityEntranceButtons( void );
|
||||
void DestroyIMPPersonalityEntranceButtons( void );
|
||||
void BtnIMPPersonalityEntranceDoneCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
|
||||
void EnterIMPPersonalityEntrance( void )
|
||||
{
|
||||
// create buttons needed
|
||||
CreateIMPPersonalityEntranceButtons( );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderIMPPersonalityEntrance( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// the IMP symbol
|
||||
//RenderIMPSymbol( 112, 30 );
|
||||
|
||||
// indent
|
||||
RenderAvgMercIndentFrame(90, 40 );
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitIMPPersonalityEntrance( void )
|
||||
{
|
||||
// destroy buttons needed
|
||||
DestroyIMPPersonalityEntranceButtons( );
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPPersonalityEntrance( void )
|
||||
{
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPPersonalityEntranceButtons( void )
|
||||
{
|
||||
// this function will create the buttons needed for the IMP personality Page
|
||||
|
||||
// ths begin button
|
||||
giIMPPersonalityEntranceButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||
/*giIMPPersonalityEntranceButton[0] = QuickCreateButton( giIMPPersonalityEntranceButtonImage[0], LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityEntranceDoneCallback);
|
||||
*/
|
||||
giIMPPersonalityEntranceButton[0] = CreateIconAndTextButton( giIMPPersonalityEntranceButtonImage[0], pImpButtonText[ 1 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityEntranceDoneCallback);
|
||||
|
||||
|
||||
SetButtonCursor(giIMPPersonalityEntranceButton[0], CURSOR_WWW);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DestroyIMPPersonalityEntranceButtons( void )
|
||||
{
|
||||
// this function will destroy the buttons needed for the IMP personality page
|
||||
|
||||
// the begin button
|
||||
RemoveButton(giIMPPersonalityEntranceButton[0] );
|
||||
UnloadButtonImage(giIMPPersonalityEntranceButtonImage[0] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPPersonalityEntranceDoneCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP Begin Screen done button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
// done with begin screen, next screen
|
||||
iCurrentImpPage = IMP_PERSONALITY_QUIZ;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef _PERSONALITY_ENTRANCE_H
|
||||
#define _PERSONALITY_ENTRANCE_H
|
||||
|
||||
|
||||
void EnterIMPPersonalityEntrance( void );
|
||||
void RenderIMPPersonalityEntrance( void );
|
||||
void ExitIMPPersonalityEntrance( void );
|
||||
void HandleIMPPersonalityEntrance( void );
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,392 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Personality Finish.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Timer Control.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#endif
|
||||
|
||||
// this is the amount of time, the player waits until booted back to main profileing screen
|
||||
|
||||
UINT8 bPersonalityEndState = 0;
|
||||
|
||||
#define PERSONALITY_CONFIRM_FINISH_DELAY 2500
|
||||
|
||||
|
||||
// flag set when player hits YES/NO button
|
||||
BOOLEAN fConfirmHasBeenSelectedFlag = FALSE;
|
||||
BOOLEAN fConfirmIsYesFlag = FALSE;
|
||||
BOOLEAN fOkToReturnIMPMainPageFromPersonalityFlag = FALSE;
|
||||
BOOLEAN fCreatedOkIMPButton = FALSE;
|
||||
BOOLEAN fExitDueFrIMPPerFinToOkButton = FALSE;
|
||||
BOOLEAN fExitIMPPerFinAtOk = FALSE;
|
||||
BOOLEAN fCreateFinishOkButton = FALSE;
|
||||
|
||||
|
||||
// buttons
|
||||
UINT32 giIMPPersonalityFinishButton[2];
|
||||
UINT32 giIMPPersonalityFinishButtonImage[2];
|
||||
|
||||
|
||||
|
||||
// function definitions
|
||||
void CreateIMPPersonalityFinishButtons( void );
|
||||
void CheckIfConfirmHasBeenSelectedAndTimeDelayHasPassed( void );
|
||||
void DestroyIMPersonalityFinishButtons( void );
|
||||
void CreatePersonalityFinishOkButton( void );
|
||||
void DestroyPersonalityFinishOkButton( void );
|
||||
|
||||
|
||||
|
||||
// callbacks
|
||||
void BtnIMPPersonalityFinishYesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPPersonalityFinishNoCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPPersonalityFinishOkCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
|
||||
|
||||
void EnterIMPPersonalityFinish( void )
|
||||
{
|
||||
|
||||
// reset states
|
||||
fCreateFinishOkButton = FALSE;
|
||||
bPersonalityEndState = 0;
|
||||
fConfirmIsYesFlag = FALSE;
|
||||
|
||||
// create the buttons
|
||||
CreateIMPPersonalityFinishButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderIMPPersonalityFinish( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// indent for text
|
||||
RenderBeginIndent( 110, 93 );
|
||||
|
||||
// check confirm flag to decide if we have to display appropriate response to button action
|
||||
if( fConfirmHasBeenSelectedFlag )
|
||||
{
|
||||
// confirm was yes, display yes string
|
||||
if(fConfirmIsYesFlag == TRUE)
|
||||
{
|
||||
// display yes string
|
||||
PrintImpText( );
|
||||
}
|
||||
else
|
||||
{
|
||||
// display no string
|
||||
PrintImpText( );
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitIMPPersonalityFinish( void )
|
||||
{
|
||||
|
||||
// exit at IMP Ok button
|
||||
if( fExitIMPPerFinAtOk )
|
||||
{
|
||||
// destroy the finish ok buttons
|
||||
DestroyPersonalityFinishOkButton( );
|
||||
}
|
||||
|
||||
|
||||
if( ( fExitDueFrIMPPerFinToOkButton == FALSE ) &&( fExitIMPPerFinAtOk == FALSE ) )
|
||||
{
|
||||
// exit due to cancel button, not ok or Yes/no button
|
||||
// get rid of yes no
|
||||
DestroyIMPersonalityFinishButtons( );
|
||||
}
|
||||
|
||||
|
||||
fCreatedOkIMPButton = FALSE;
|
||||
fOkToReturnIMPMainPageFromPersonalityFlag = FALSE;
|
||||
fConfirmHasBeenSelectedFlag = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPPersonalityFinish( void )
|
||||
{
|
||||
|
||||
// check if confirm and delay
|
||||
CheckIfConfirmHasBeenSelectedAndTimeDelayHasPassed( );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CheckIfConfirmHasBeenSelectedAndTimeDelayHasPassed( void )
|
||||
{
|
||||
// this function will check to see if player has in fact confirmed selection and delay to
|
||||
// read text has occurred
|
||||
|
||||
|
||||
|
||||
// if not confirm selected, return
|
||||
if( fConfirmHasBeenSelectedFlag == FALSE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( fCreateFinishOkButton == TRUE )
|
||||
{
|
||||
fCreateFinishOkButton = FALSE;
|
||||
CreatePersonalityFinishOkButton( );
|
||||
fCreatedOkIMPButton = TRUE;
|
||||
}
|
||||
|
||||
// create ok button
|
||||
if( fCreatedOkIMPButton == FALSE )
|
||||
{
|
||||
DestroyIMPersonalityFinishButtons( );
|
||||
fCreateFinishOkButton = TRUE;
|
||||
fExitIMPPerFinAtOk = TRUE;
|
||||
}
|
||||
|
||||
// ok to return
|
||||
if( fOkToReturnIMPMainPageFromPersonalityFlag == TRUE )
|
||||
{
|
||||
DestroyPersonalityFinishOkButton( );
|
||||
fCreatedOkIMPButton = FALSE;
|
||||
fOkToReturnIMPMainPageFromPersonalityFlag = FALSE;
|
||||
fConfirmHasBeenSelectedFlag = FALSE;
|
||||
fExitDueFrIMPPerFinToOkButton = TRUE;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPPersonalityFinishButtons( void )
|
||||
{
|
||||
// this function will create the buttons needed for the IMP personality Finish Page
|
||||
|
||||
// ths Yes button
|
||||
giIMPPersonalityFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPPersonalityFinishButton[0] = QuickCreateButton( giIMPPersonalityFinishButtonImage[0], LAPTOP_SCREEN_UL_X + ( 90 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityFinishYesCallback);
|
||||
*/
|
||||
giIMPPersonalityFinishButton[0] = CreateIconAndTextButton( giIMPPersonalityFinishButtonImage[0], pImpButtonText[ 9 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 90 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityFinishYesCallback);
|
||||
|
||||
// the no Button
|
||||
giIMPPersonalityFinishButtonImage[ 1 ]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPPersonalityFinishButton[ 1 ] = QuickCreateButton( giIMPPersonalityFinishButtonImage[1], LAPTOP_SCREEN_UL_X + ( 276 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityFinishNoCallback);
|
||||
*/
|
||||
giIMPPersonalityFinishButton[ 1 ] = CreateIconAndTextButton( giIMPPersonalityFinishButtonImage[ 1 ], pImpButtonText[ 10 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 276 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityFinishNoCallback);
|
||||
|
||||
SetButtonCursor(giIMPPersonalityFinishButton[0], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPPersonalityFinishButton[1], CURSOR_WWW);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DestroyIMPersonalityFinishButtons( void )
|
||||
{
|
||||
// this function will destroy the buttons needed for the IMP personality Finish page
|
||||
|
||||
// the yes button
|
||||
RemoveButton(giIMPPersonalityFinishButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPPersonalityFinishButtonImage[ 0 ] );
|
||||
|
||||
// the no button
|
||||
RemoveButton(giIMPPersonalityFinishButton[ 1 ] );
|
||||
UnloadButtonImage(giIMPPersonalityFinishButtonImage[ 1 ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPPersonalityFinishYesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
// confirm flag set, get out of HERE!
|
||||
if( fConfirmHasBeenSelectedFlag )
|
||||
{
|
||||
// now set this button off
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
|
||||
// now set this button off
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// set fact yes was selected
|
||||
fConfirmIsYesFlag = TRUE;
|
||||
|
||||
// set fact that confirmation has been done
|
||||
fConfirmHasBeenSelectedFlag = TRUE;
|
||||
|
||||
// now make skill, personality and attitude
|
||||
CreatePlayersPersonalitySkillsAndAttitude( );
|
||||
fButtonPendingFlag = TRUE;
|
||||
bPersonalityEndState = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BtnIMPPersonalityFinishNoCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
// confirm flag set, get out of HERE!
|
||||
if( fConfirmHasBeenSelectedFlag )
|
||||
{
|
||||
// now set this button off
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
|
||||
// now set this button on
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// set fact yes was selected
|
||||
fConfirmIsYesFlag = FALSE;
|
||||
|
||||
// set fact that confirmation has been done
|
||||
fConfirmHasBeenSelectedFlag = TRUE;
|
||||
CreatePlayersPersonalitySkillsAndAttitude( );
|
||||
|
||||
bPersonalityEndState = 2;
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreatePersonalityFinishOkButton( void )
|
||||
{
|
||||
|
||||
// create personality button finish button
|
||||
giIMPPersonalityFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
giIMPPersonalityFinishButton[0] = CreateIconAndTextButton( giIMPPersonalityFinishButtonImage[0], pImpButtonText[ 24 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 186 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityFinishOkCallback);
|
||||
|
||||
SetButtonCursor(giIMPPersonalityFinishButton[0], CURSOR_WWW);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DestroyPersonalityFinishOkButton( void )
|
||||
{
|
||||
// the ok button
|
||||
RemoveButton(giIMPPersonalityFinishButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPPersonalityFinishButtonImage[ 0 ] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BtnIMPPersonalityFinishOkCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
// now set this button on
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// Testing UB stuff
|
||||
// if( iCurrentProfileMode < 2 )
|
||||
// {
|
||||
// iCurrentProfileMode = 2;
|
||||
// }
|
||||
|
||||
// button pending, wait a frame
|
||||
fButtonPendingFlag = TRUE;
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
|
||||
if( iCurrentProfileMode != IMP__FINISH )
|
||||
{
|
||||
iCurrentProfileMode = IMP__ATTRIBUTES;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCurrentImpPage = IMP_FINISH;//IMP__ATTRIBUTES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef _PERSONALITY_FINISH_H
|
||||
#define _PERSONALITY_FINISH_H
|
||||
|
||||
void EnterIMPPersonalityFinish( void );
|
||||
void RenderIMPPersonalityFinish( void );
|
||||
void ExitIMPPersonalityFinish( void );
|
||||
void HandleIMPPersonalityFinish( void );
|
||||
|
||||
extern UINT8 bPersonalityEndState;
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
#ifndef _IMP_PERSOANLITY_QUIZ_H
|
||||
#define _IMP_PERSOANLITY_QUIZ_H
|
||||
|
||||
|
||||
void EnterIMPPersonalityQuiz( void );
|
||||
void RenderIMPPersonalityQuiz( void );
|
||||
void ExitIMPPersonalityQuiz( void );
|
||||
void HandleIMPPersonalityQuiz( void );
|
||||
|
||||
void BltAnswerIndents( INT32 iNumberOfIndents );
|
||||
|
||||
extern INT32 giCurrentPersonalityQuizQuestion;
|
||||
extern INT32 iCurrentAnswer;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,393 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Portraits.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "input.h"
|
||||
#include "Isometric Utils.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Voices.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#endif
|
||||
|
||||
//current and last pages
|
||||
INT32 iCurrentPortrait = 0;
|
||||
INT32 iLastPicture = 7;
|
||||
|
||||
// buttons needed for the IMP portrait screen
|
||||
INT32 giIMPPortraitButton[ 3 ];
|
||||
INT32 giIMPPortraitButtonImage[ 3 ];
|
||||
|
||||
// redraw protrait screen
|
||||
BOOLEAN fReDrawPortraitScreenFlag = FALSE;
|
||||
|
||||
// face index
|
||||
INT32 iPortraitNumber = 0;
|
||||
|
||||
|
||||
// function definitions
|
||||
|
||||
void IncrementPictureIndex( void );
|
||||
void DecrementPicture( void );
|
||||
void CreateIMPPortraitButtons( void );
|
||||
void DestroyIMPPortraitButtons( void );
|
||||
BOOLEAN CameBackToPortraitsPageButNotFinished();
|
||||
|
||||
// callbacks
|
||||
void BtnIMPPortraitNextCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPPortraitPreviousCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPPortraitDoneCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
void EnterIMPPortraits( void )
|
||||
{
|
||||
|
||||
// create buttons
|
||||
CreateIMPPortraitButtons( );
|
||||
|
||||
// render background
|
||||
RenderIMPPortraits( );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPPortraits( void )
|
||||
{
|
||||
|
||||
|
||||
// render background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// the Voices frame
|
||||
RenderPortraitFrame( 191, 167 );
|
||||
|
||||
// render the current portrait
|
||||
RenderPortrait( 200, 176 );
|
||||
|
||||
// indent for the text
|
||||
RenderAttrib1IndentFrame( 128, 65);
|
||||
|
||||
// text
|
||||
PrintImpText( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPPortraits( void )
|
||||
{
|
||||
// destroy buttons for IMP portrait page
|
||||
DestroyIMPPortraitButtons( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void HandleIMPPortraits( void )
|
||||
{
|
||||
|
||||
// do we need to re write screen
|
||||
if ( fReDrawPortraitScreenFlag == TRUE )
|
||||
{
|
||||
RenderIMPPortraits( );
|
||||
|
||||
// reset redraw flag
|
||||
fReDrawPortraitScreenFlag = FALSE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN RenderPortrait( INT16 sX, INT16 sY )
|
||||
{
|
||||
// render the portrait of the current picture
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
HVOBJECT hHandle;
|
||||
UINT32 uiGraphicHandle;
|
||||
|
||||
if( fCharacterIsMale )
|
||||
{
|
||||
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP( pPlayerSelectedBigFaceFileNames[ iCurrentPortrait ] , VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sX, LAPTOP_SCREEN_WEB_UL_Y + sY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// load it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP( pPlayerSelectedBigFaceFileNames[ iCurrentPortrait + 8 ] , VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||
|
||||
// show it
|
||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sX, LAPTOP_SCREEN_WEB_UL_Y + sY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// and kick it's sorry ..umm never mind, outta here
|
||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||
|
||||
}
|
||||
|
||||
return ( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void IncrementPictureIndex( void )
|
||||
{
|
||||
// cycle to next picture
|
||||
|
||||
iCurrentPortrait++;
|
||||
|
||||
// gone too far?
|
||||
if( iCurrentPortrait > iLastPicture )
|
||||
{
|
||||
iCurrentPortrait = 0;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DecrementPicture( void )
|
||||
{
|
||||
// cycle to previous picture
|
||||
|
||||
iCurrentPortrait--;
|
||||
|
||||
// gone too far?
|
||||
if( iCurrentPortrait < 0 )
|
||||
{
|
||||
iCurrentPortrait = iLastPicture;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPPortraitButtons( void )
|
||||
{
|
||||
// will create buttons need for the IMP portrait screen
|
||||
|
||||
// next button
|
||||
giIMPPortraitButtonImage[0]= LoadButtonImage( "LAPTOP\\voicearrows.sti" ,-1,1,-1,3,-1 );
|
||||
/*giIMPPortraitButton[0] = QuickCreateButton( giIMPPortraitButtonImage[0], LAPTOP_SCREEN_UL_X + ( 18 ), LAPTOP_SCREEN_WEB_UL_Y + ( 184 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPortraitNextCallback );
|
||||
*/
|
||||
giIMPPortraitButton[0] = CreateIconAndTextButton( giIMPPortraitButtonImage[0], pImpButtonText[ 13 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 343 ), LAPTOP_SCREEN_WEB_UL_Y + ( 205 ),BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPortraitNextCallback);
|
||||
|
||||
|
||||
// previous button
|
||||
giIMPPortraitButtonImage[ 1 ]= LoadButtonImage( "LAPTOP\\voicearrows.sti" ,-1,0,-1,2,-1 );
|
||||
/* giIMPPortraitButton[ 1 ] = QuickCreateButton( giIMPPortraitButtonImage[ 1 ], LAPTOP_SCREEN_UL_X + ( 18 ), LAPTOP_SCREEN_WEB_UL_Y + ( 254 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPortraitPreviousCallback );
|
||||
*/
|
||||
giIMPPortraitButton[ 1 ] = CreateIconAndTextButton( giIMPPortraitButtonImage[ 1 ], pImpButtonText[ 12 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 93), LAPTOP_SCREEN_WEB_UL_Y + ( 205 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPortraitPreviousCallback);
|
||||
|
||||
|
||||
// done button
|
||||
giIMPPortraitButtonImage[ 2 ]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPPortraitButton[ 2 ] = QuickCreateButton( giIMPPortraitButtonImage[ 1 ], LAPTOP_SCREEN_UL_X + ( 349 ), LAPTOP_SCREEN_WEB_UL_Y + ( 220 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPortraitDoneCallback );
|
||||
*/
|
||||
giIMPPortraitButton[ 2 ] = CreateIconAndTextButton( giIMPPortraitButtonImage[ 2 ], pImpButtonText[ 11 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 187 ), LAPTOP_SCREEN_WEB_UL_Y + ( 330 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPortraitDoneCallback);
|
||||
|
||||
|
||||
|
||||
SetButtonCursor(giIMPPortraitButton[0], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPPortraitButton[1], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPPortraitButton[2], CURSOR_WWW);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DestroyIMPPortraitButtons( void )
|
||||
{
|
||||
|
||||
// will destroy buttons created for IMP Portrait screen
|
||||
|
||||
// the next button
|
||||
RemoveButton(giIMPPortraitButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPPortraitButtonImage[ 0 ] );
|
||||
|
||||
// the previous button
|
||||
RemoveButton(giIMPPortraitButton[ 1 ] );
|
||||
UnloadButtonImage(giIMPPortraitButtonImage[ 1 ] );
|
||||
|
||||
// the done button
|
||||
RemoveButton(giIMPPortraitButton[ 2 ] );
|
||||
UnloadButtonImage(giIMPPortraitButtonImage[ 2 ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPPortraitNextCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// next picture!!
|
||||
IncrementPictureIndex( );
|
||||
|
||||
fReDrawPortraitScreenFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPPortraitPreviousCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// previous picture, please!!!
|
||||
DecrementPicture( );
|
||||
|
||||
fReDrawPortraitScreenFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPPortraitDoneCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// go to main page
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
/*
|
||||
// current mode now is voice
|
||||
if( iCurrentProfileMode < IMP__VOICE )
|
||||
{
|
||||
iCurrentProfileMode = IMP__VOICE;
|
||||
}
|
||||
*/
|
||||
// if we are already done, leave
|
||||
if( iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( CameBackToPortraitsPageButNotFinished() )
|
||||
{
|
||||
// iCurrentProfileMode = IMP__VOICE;
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCurrentProfileMode = IMP__VOICE;
|
||||
}
|
||||
}
|
||||
|
||||
// grab picture number
|
||||
if( fCharacterIsMale )
|
||||
{
|
||||
// male
|
||||
iPortraitNumber = iCurrentPortrait;
|
||||
}
|
||||
else
|
||||
{
|
||||
// female
|
||||
iPortraitNumber = iCurrentPortrait + ( 8 );
|
||||
|
||||
}
|
||||
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN CameBackToPortraitsPageButNotFinished()
|
||||
{
|
||||
//if we are in a page that comes after this one
|
||||
if( iCurrentProfileMode == IMP__PERSONALITY ||
|
||||
iCurrentProfileMode == IMP__ATTRIBUTES ||
|
||||
iCurrentProfileMode == IMP__VOICE )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef __IMP_PORTRAIT_H
|
||||
#define __IMP_PORTRAIT_H
|
||||
|
||||
void EnterIMPPortraits( void );
|
||||
void RenderIMPPortraits( void );
|
||||
void ExitIMPPortraits( void );
|
||||
void HandleIMPPortraits( void );
|
||||
BOOLEAN RenderPortrait( INT16 sX, INT16 sY );
|
||||
|
||||
extern INT32 iPortraitNumber;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,693 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#include "IMP Skill Trait.h"
|
||||
#include "_Ja25Englishtext.h"
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Local Defines
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
#define IMP_SKILL_TRAIT__TITLE_FONT FONT14ARIAL
|
||||
|
||||
#define IMP_SKILL_TRAIT__FONT FONT12ARIAL
|
||||
#define IMP_SKILL_TRAIT__COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
IMP_SKILL_TRAIT__TITLE_TEXT=IMP_SKILL_TRAITS__NUMBER_SKILLS,
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define IMP_SKILL_TRAIT__LEFT_COLUMN_START_X ( LAPTOP_SCREEN_UL_X + 15 )
|
||||
#define IMP_SKILL_TRAIT__LEFT_COLUMN_START_Y ( LAPTOP_SCREEN_WEB_UL_Y + 40 )
|
||||
|
||||
#define IMP_SKILL_TRAIT__RIGHT_COLUMN_START_X ( IMP_SKILL_TRAIT__LEFT_COLUMN_START_X + 241 )
|
||||
#define IMP_SKILL_TRAIT__RIGHT_COLUMN_START_Y IMP_SKILL_TRAIT__LEFT_COLUMN_START_Y
|
||||
|
||||
#define IMP_SKILL_TRAIT__SPACE_BTN_BUTTONS 38
|
||||
|
||||
#define IMP_SKILL_TRAIT__SKILL_TRAIT_TO_START_RIGHT_COL 6
|
||||
|
||||
#define IMP_SKILL_TRAIT__NONE_BTN_LOC_X ( LAPTOP_SCREEN_UL_X + 136 )
|
||||
|
||||
#define IMP_SKILL_TRAIT__TEXT_OFFSET_X 65
|
||||
#define IMP_SKILL_TRAIT__TEXT_OFFSET_Y 12
|
||||
|
||||
#define IMP_SKILL_TRAIT__TITLE_X LAPTOP_SCREEN_UL_X - 111
|
||||
#define IMP_SKILL_TRAIT__TITLE_Y iScreenHeightOffset + 53
|
||||
#define IMP_SKILL_TRAIT__TITLE_WIDTH ( LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X )
|
||||
|
||||
#define IMP_SKILL_TRAIT__GREY_BOX_OFFSET_X 5
|
||||
#define IMP_SKILL_TRAIT__GREY_BOX_OFFSET_Y 7
|
||||
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Global Variables
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
BOOLEAN gfIST_Redraw=FALSE;
|
||||
|
||||
BOOLEAN gfSkillTraitQuestions[ IMP_SKILL_TRAITS__NUMBER_SKILLS ];
|
||||
|
||||
// these are the buttons for the questions
|
||||
INT32 giIMPSkillTraitAnswerButton[ IMP_SKILL_TRAITS__NUMBER_SKILLS ];
|
||||
INT32 giIMPSkillTraitAnswerButtonImage[ IMP_SKILL_TRAITS__NUMBER_SKILLS ];
|
||||
|
||||
// this is the Done buttons
|
||||
INT32 giIMPSkillTraitFinsihButton;
|
||||
INT32 giIMPSkillTraitFinsihButtonImage;
|
||||
|
||||
|
||||
|
||||
//BOOLEAN gfSkillTraitButtonChanged=FALSE;
|
||||
|
||||
#define IST__NUM_SELECTABLE_TRAITS 2
|
||||
INT8 gbLastSelectedTraits[ IST__NUM_SELECTABLE_TRAITS ];
|
||||
|
||||
//image handle
|
||||
UINT32 guiIST_GreyGoldBox;
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
void BtnIMPSkillTraitAnswerCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPSkillTraitFinishCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void AddImpSkillTraitButtons();
|
||||
void HandleSkillTraitButtonStates( );
|
||||
void HandleIMPSkillTraitAnswers( UINT32 uiSkillPressed, BOOLEAN fResetAllButtons );
|
||||
void IMPSkillTraitDisplaySkills();
|
||||
INT8 CountNumSkillStraitsSelected( BOOLEAN fIncludeNoneSkill );
|
||||
BOOLEAN ShouldTraitBeSkipped( UINT32 uiTrait );
|
||||
void AddSelectedSkillsToSkillsList();
|
||||
void HandleLastSelectedTraits( INT8 bNewTrait );
|
||||
BOOLEAN CameBackToSpecialtiesPageButNotFinished();
|
||||
//ppp
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Functions
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
|
||||
|
||||
void EnterIMPSkillTrait( void )
|
||||
{
|
||||
// UINT32 uiCnt;
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
//add the skill trait buttons
|
||||
AddImpSkillTraitButtons();
|
||||
|
||||
|
||||
// load the stats graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\SkillTraitSmallGreyIdent.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject(&VObjectDesc, &guiIST_GreyGoldBox ) )
|
||||
{
|
||||
Assert( 0 );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
giIMPSkillTraitFinsihButtonImage = LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
giIMPSkillTraitFinsihButton = CreateIconAndTextButton( giIMPSkillTraitFinsihButtonImage, pImpButtonText[ 24 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 350 ), LAPTOP_SCREEN_WEB_UL_Y + ( 340 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPSkillTraitFinishCallback );
|
||||
|
||||
|
||||
|
||||
SetButtonCursor( giIMPSkillTraitFinsihButton, CURSOR_WWW);
|
||||
|
||||
//if we are not DONE and are just reviewing
|
||||
if( iCurrentProfileMode != IMP__FINISH )
|
||||
{
|
||||
//Have the NONE trait initially selected
|
||||
gfSkillTraitQuestions[ IMP_SKILL_TRAITS__NONE ] = TRUE;
|
||||
}
|
||||
|
||||
HandleSkillTraitButtonStates( );
|
||||
|
||||
//reset last selecterd trait
|
||||
memset( gbLastSelectedTraits, -1, IST__NUM_SELECTABLE_TRAITS );
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPSkillTrait( void )
|
||||
{
|
||||
//render the metal background graphic
|
||||
RenderProfileBackGround();
|
||||
|
||||
IMPSkillTraitDisplaySkills();
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPSkillTrait( void )
|
||||
{
|
||||
INT32 iCnt;
|
||||
|
||||
DeleteVideoObjectFromIndex( guiIST_GreyGoldBox );
|
||||
|
||||
//remove the skill buttons
|
||||
for(iCnt = 0; iCnt < IMP_SKILL_TRAITS__NUMBER_SKILLS; iCnt++)
|
||||
{
|
||||
//if there is a button allocated
|
||||
if( giIMPSkillTraitAnswerButton[iCnt] != -1 )
|
||||
{
|
||||
RemoveButton(giIMPSkillTraitAnswerButton[ iCnt ] );
|
||||
UnloadButtonImage(giIMPSkillTraitAnswerButtonImage[ iCnt ] );
|
||||
}
|
||||
}
|
||||
|
||||
RemoveButton( giIMPSkillTraitFinsihButton );
|
||||
UnloadButtonImage( giIMPSkillTraitFinsihButtonImage );
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPSkillTrait( void )
|
||||
{
|
||||
if( gfIST_Redraw )
|
||||
{
|
||||
RenderIMPSkillTrait( );
|
||||
gfIST_Redraw = FALSE;
|
||||
}
|
||||
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
void AddImpSkillTraitButtons()
|
||||
{
|
||||
INT32 iCnt = 0;
|
||||
UINT16 usPosX, usPosY;
|
||||
|
||||
usPosX = IMP_SKILL_TRAIT__LEFT_COLUMN_START_X;
|
||||
usPosY = IMP_SKILL_TRAIT__LEFT_COLUMN_START_Y;
|
||||
|
||||
|
||||
for(iCnt = 0; iCnt < IMP_SKILL_TRAITS__NUMBER_SKILLS; iCnt++)
|
||||
{
|
||||
//reset
|
||||
giIMPSkillTraitAnswerButton[iCnt] = -1;
|
||||
|
||||
//if we are not DONE and are just reviewing
|
||||
if( iCurrentProfileMode != IMP__FINISH )
|
||||
{
|
||||
gfSkillTraitQuestions[ iCnt ] = FALSE;
|
||||
}
|
||||
|
||||
//if the merc is a FEMALE, skip this skill cause there isnt any fenmal martial artists
|
||||
if( ShouldTraitBeSkipped( iCnt ) )
|
||||
{
|
||||
usPosY += IMP_SKILL_TRAIT__SPACE_BTN_BUTTONS;
|
||||
|
||||
//if its the none button
|
||||
if( iCnt == IMP_SKILL_TRAITS__NONE-1 )
|
||||
{
|
||||
usPosX = IMP_SKILL_TRAIT__NONE_BTN_LOC_X;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if( iCnt == 0 )
|
||||
giIMPSkillTraitAnswerButtonImage[ iCnt ] = LoadButtonImage( "LAPTOP\\button_6.sti", -1,0,-1,1,-1 );
|
||||
else
|
||||
giIMPSkillTraitAnswerButtonImage[ iCnt ] = UseLoadedButtonImage( giIMPSkillTraitAnswerButtonImage[ 0 ], -1,0,-1,1,-1 );
|
||||
|
||||
giIMPSkillTraitAnswerButton[iCnt] = QuickCreateButton( giIMPSkillTraitAnswerButtonImage[ iCnt ], usPosX, usPosY,
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 3,
|
||||
MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnIMPSkillTraitAnswerCallback);
|
||||
|
||||
//Set the button data
|
||||
MSYS_SetBtnUserData( giIMPSkillTraitAnswerButton[iCnt], 0, iCnt );
|
||||
SetButtonCursor( giIMPSkillTraitAnswerButton[iCnt], CURSOR_WWW);
|
||||
|
||||
//Get rid of playing the button sound, it will be handled here
|
||||
ButtonList[ giIMPSkillTraitAnswerButton[ iCnt ] ]->ubSoundSchemeID = 0;
|
||||
|
||||
//Determine the next x location
|
||||
if( iCnt < IMP_SKILL_TRAIT__SKILL_TRAIT_TO_START_RIGHT_COL )
|
||||
usPosX = IMP_SKILL_TRAIT__LEFT_COLUMN_START_X;
|
||||
else
|
||||
usPosX = IMP_SKILL_TRAIT__RIGHT_COLUMN_START_X;
|
||||
|
||||
//Determine the next Y location
|
||||
if( iCnt == IMP_SKILL_TRAIT__SKILL_TRAIT_TO_START_RIGHT_COL )
|
||||
usPosY = IMP_SKILL_TRAIT__RIGHT_COLUMN_START_Y;
|
||||
else
|
||||
usPosY += IMP_SKILL_TRAIT__SPACE_BTN_BUTTONS;
|
||||
|
||||
//if its the none button
|
||||
if( iCnt == IMP_SKILL_TRAITS__NONE-1 )
|
||||
{
|
||||
usPosX = IMP_SKILL_TRAIT__NONE_BTN_LOC_X;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPSkillTraitAnswerCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
// btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
INT32 iSkillTrait = MSYS_GetBtnUserData( btn, 0 );
|
||||
|
||||
HandleIMPSkillTraitAnswers( iSkillTrait, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
void HandleIMPSkillTraitAnswers( UINT32 uiSkillPressed, BOOLEAN fResetAllButtons )
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
|
||||
//if we are DONE and are just reviewing
|
||||
if( iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//if we are to reset all the buttons
|
||||
if( fResetAllButtons )
|
||||
{
|
||||
//loop through all the skill and reset them
|
||||
for( uiCnt=0; uiCnt<IMP_SKILL_TRAITS__NUMBER_SKILLS; uiCnt++ )
|
||||
{
|
||||
gfSkillTraitQuestions[ uiCnt ] = FALSE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//make sure its a valid skill
|
||||
if( uiSkillPressed > IMP_SKILL_TRAITS__NUMBER_SKILLS )
|
||||
{
|
||||
Assert( 0 );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//if its allready set
|
||||
if( gfSkillTraitQuestions[ uiSkillPressed ] )
|
||||
{
|
||||
//dont need to do anything
|
||||
return;
|
||||
}
|
||||
|
||||
HandleLastSelectedTraits( (INT8)uiSkillPressed );
|
||||
|
||||
/*
|
||||
//if there are already 2 skills selected, and we are trying to PRESS a new button ( skill isnt currently set )
|
||||
if( CountNumSkillStraitsSelected() == 2 &&
|
||||
!gfSkillTraitQuestions[ uiSkillPressed ] &&
|
||||
uiSkillPressed != IMP_SKILL_TRAITS__NONE )
|
||||
{
|
||||
//if we have to, unselect an existing trait
|
||||
|
||||
//play the diosabld sound
|
||||
// PlayButtonSound( giIMPSkillTraitAnswerButton[ uiSkillPressed ], BUTTON_SOUND_DISABLED_CLICK );
|
||||
|
||||
//dont select a new one
|
||||
// return;
|
||||
}
|
||||
*/
|
||||
|
||||
//Set the skill
|
||||
// gfSkillTraitQuestions[ uiSkillPressed ] = !gfSkillTraitQuestions[ uiSkillPressed ];
|
||||
gfSkillTraitQuestions[ uiSkillPressed ] = TRUE;
|
||||
|
||||
//if the NONE trait was selected, clear the rest of the buttons
|
||||
if( uiSkillPressed == IMP_SKILL_TRAITS__NONE )
|
||||
{
|
||||
//reset all the traits
|
||||
HandleIMPSkillTraitAnswers( 0, TRUE );
|
||||
|
||||
gfSkillTraitQuestions[ IMP_SKILL_TRAITS__NONE ] = TRUE;
|
||||
}
|
||||
|
||||
|
||||
//make sure the none skill is NOT selected if we select anything else
|
||||
if( uiSkillPressed != IMP_SKILL_TRAITS__NONE )
|
||||
{
|
||||
gfSkillTraitQuestions[ IMP_SKILL_TRAITS__NONE ] = FALSE;
|
||||
}
|
||||
|
||||
//Play the button sound
|
||||
if( gfSkillTraitQuestions[ uiSkillPressed ] )
|
||||
{
|
||||
PlayButtonSound( giIMPSkillTraitAnswerButton[ uiSkillPressed ], BUTTON_SOUND_CLICKED_ON );
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayButtonSound( giIMPSkillTraitAnswerButton[ uiSkillPressed ], BUTTON_SOUND_CLICKED_OFF );
|
||||
}
|
||||
|
||||
//update buttons
|
||||
HandleSkillTraitButtonStates( );
|
||||
|
||||
//redraw the screen
|
||||
gfIST_Redraw = TRUE;
|
||||
}
|
||||
|
||||
INT8 CountNumSkillStraitsSelected( BOOLEAN fIncludeNoneSkill )
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
INT8 iNumberSkills=0;
|
||||
UINT32 uiUpperLimit;
|
||||
|
||||
if( fIncludeNoneSkill )
|
||||
{
|
||||
uiUpperLimit = IMP_SKILL_TRAITS__NUMBER_SKILLS;
|
||||
}
|
||||
else
|
||||
{
|
||||
uiUpperLimit = IMP_SKILL_TRAITS__NONE;
|
||||
}
|
||||
|
||||
for( uiCnt=0; uiCnt < uiUpperLimit; uiCnt++ )
|
||||
{
|
||||
//if the skill is selected ( ie depressed )
|
||||
if( gfSkillTraitQuestions[ uiCnt ] )
|
||||
{
|
||||
iNumberSkills++;
|
||||
}
|
||||
}
|
||||
|
||||
return( iNumberSkills );
|
||||
}
|
||||
|
||||
|
||||
void HandleSkillTraitButtonStates( )
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
|
||||
for( uiCnt=0; uiCnt<IMP_SKILL_TRAITS__NUMBER_SKILLS; uiCnt++ )
|
||||
{
|
||||
//if the merc is a FEMALE, skip this skill cause there isnt any fenmal martial artists
|
||||
if( ShouldTraitBeSkipped( uiCnt ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//if the skill is selected ( ie depressed )
|
||||
if( gfSkillTraitQuestions[ uiCnt ] )
|
||||
{
|
||||
ButtonList[ giIMPSkillTraitAnswerButton[ uiCnt ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||
}
|
||||
else
|
||||
{
|
||||
ButtonList[ giIMPSkillTraitAnswerButton[ uiCnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IMPSkillTraitDisplaySkills()
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
UINT16 usPosX, usPosY;
|
||||
UINT16 usBoxPosX, usBoxPosY;
|
||||
HVOBJECT hImageHandle;
|
||||
|
||||
|
||||
//Display the title
|
||||
DrawTextToScreen( gzIMPSkillTraitsText[ IMP_SKILL_TRAIT__TITLE_TEXT ], IMP_SKILL_TRAIT__TITLE_X, IMP_SKILL_TRAIT__TITLE_Y, IMP_SKILL_TRAIT__TITLE_WIDTH, IMP_SKILL_TRAIT__TITLE_FONT, IMP_SKILL_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
// Stats
|
||||
GetVideoObject(&hImageHandle, guiIST_GreyGoldBox );
|
||||
|
||||
usPosX = IMP_SKILL_TRAIT__LEFT_COLUMN_START_X + IMP_SKILL_TRAIT__TEXT_OFFSET_X;
|
||||
usPosY = IMP_SKILL_TRAIT__LEFT_COLUMN_START_Y + IMP_SKILL_TRAIT__TEXT_OFFSET_Y;
|
||||
|
||||
for( uiCnt=0; uiCnt<IMP_SKILL_TRAITS__NUMBER_SKILLS; uiCnt++ )
|
||||
{
|
||||
usBoxPosX = usPosX - IMP_SKILL_TRAIT__GREY_BOX_OFFSET_X;
|
||||
usBoxPosY = usPosY - IMP_SKILL_TRAIT__GREY_BOX_OFFSET_Y;
|
||||
|
||||
//if the merc is a FEMALE, skip this skill cause there isnt any fenmal martial artists
|
||||
if( ShouldTraitBeSkipped( uiCnt ) )
|
||||
{
|
||||
//if its the none button
|
||||
if( uiCnt == IMP_SKILL_TRAITS__NONE-1 )
|
||||
{
|
||||
usPosX = IMP_SKILL_TRAIT__NONE_BTN_LOC_X + IMP_SKILL_TRAIT__TEXT_OFFSET_X;
|
||||
usPosY += IMP_SKILL_TRAIT__SPACE_BTN_BUTTONS;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
//if the trait is selected
|
||||
if( gfSkillTraitQuestions[ uiCnt ] )
|
||||
{
|
||||
//Display the gold background box
|
||||
BltVideoObject(FRAME_BUFFER, hImageHandle, 1, usBoxPosX, usBoxPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display the grey background box
|
||||
BltVideoObject(FRAME_BUFFER, hImageHandle, 0,usBoxPosX, usBoxPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
|
||||
//draw the text to the screenx
|
||||
DrawTextToScreen( gzIMPSkillTraitsText[ uiCnt ], usPosX, usPosY, 0, IMP_SKILL_TRAIT__FONT, IMP_SKILL_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
//Determine the next x location
|
||||
if( uiCnt < IMP_SKILL_TRAIT__SKILL_TRAIT_TO_START_RIGHT_COL )
|
||||
usPosX = IMP_SKILL_TRAIT__LEFT_COLUMN_START_X + IMP_SKILL_TRAIT__TEXT_OFFSET_X;
|
||||
else
|
||||
usPosX = IMP_SKILL_TRAIT__RIGHT_COLUMN_START_X + IMP_SKILL_TRAIT__TEXT_OFFSET_X;
|
||||
|
||||
//Determine the next Y location
|
||||
if( uiCnt == IMP_SKILL_TRAIT__SKILL_TRAIT_TO_START_RIGHT_COL )
|
||||
usPosY = IMP_SKILL_TRAIT__RIGHT_COLUMN_START_Y + IMP_SKILL_TRAIT__TEXT_OFFSET_Y;
|
||||
else
|
||||
usPosY += IMP_SKILL_TRAIT__SPACE_BTN_BUTTONS;
|
||||
|
||||
//if its the none button
|
||||
if( uiCnt == IMP_SKILL_TRAITS__NONE-1 )
|
||||
{
|
||||
usPosX = IMP_SKILL_TRAIT__NONE_BTN_LOC_X + IMP_SKILL_TRAIT__TEXT_OFFSET_X;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPSkillTraitFinishCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
//if we are just reviewing the page
|
||||
if( iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
//go back tot he done screen
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
if( CameBackToSpecialtiesPageButNotFinished() )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
//We are finished on this page
|
||||
iCurrentProfileMode = IMP__ATTRIBUTES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN CameBackToSpecialtiesPageButNotFinished()
|
||||
{
|
||||
//if we are in a page that comes after this one
|
||||
if( iCurrentProfileMode == IMP__ATTRIBUTES )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INT8 DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection()
|
||||
{
|
||||
INT8 bExtraPoints=10;
|
||||
INT8 bNumSkills=0;
|
||||
|
||||
//Count the number of skills selected
|
||||
bNumSkills = CountNumSkillStraitsSelected( FALSE );
|
||||
|
||||
//if there NONE selected
|
||||
if( bNumSkills == 0 )
|
||||
{
|
||||
bExtraPoints = 10;
|
||||
}
|
||||
|
||||
//if there is 1 trait selected
|
||||
else if( bNumSkills == 1 )
|
||||
{
|
||||
//if the trait is not the ones you cant be expert in )
|
||||
if( gfSkillTraitQuestions[ IMP_SKILL_TRAITS__ELECTRONICS ] ||
|
||||
gfSkillTraitQuestions[ IMP_SKILL_TRAITS__AMBIDEXTROUS ] ||
|
||||
gfSkillTraitQuestions[ IMP_SKILL_TRAITS__CAMO ] )
|
||||
{
|
||||
bExtraPoints = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
bExtraPoints = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//else both traits selected
|
||||
else
|
||||
{
|
||||
bExtraPoints = 0;
|
||||
}
|
||||
|
||||
return( bExtraPoints );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN ShouldTraitBeSkipped( UINT32 uiTrait )
|
||||
{
|
||||
if( uiTrait == IMP_SKILL_TRAITS__MARTIAL_ARTS && !fCharacterIsMale )
|
||||
return( TRUE );
|
||||
else
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
void AddSelectedSkillsToSkillsList()
|
||||
{
|
||||
UINT32 uiCnt;
|
||||
|
||||
//loop through all the buttons and reset them
|
||||
for( uiCnt=0; uiCnt<IMP_SKILL_TRAITS__NONE; uiCnt++ )
|
||||
{
|
||||
//if the trait is selected
|
||||
if( gfSkillTraitQuestions[ uiCnt ] )
|
||||
{
|
||||
//switch on the trait, and add it to the list
|
||||
switch( uiCnt )
|
||||
{
|
||||
case IMP_SKILL_TRAITS__LOCKPICK:
|
||||
AddSkillToSkillList( LOCKPICKING );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__HAND_2_HAND:
|
||||
AddSkillToSkillList( HANDTOHAND );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__ELECTRONICS:
|
||||
AddSkillToSkillList( ELECTRONICS );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__NIGHT_OPS:
|
||||
AddSkillToSkillList( NIGHTOPS );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__THROWING:
|
||||
AddSkillToSkillList( THROWING );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__TEACHING:
|
||||
AddSkillToSkillList( TEACHING );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__HEAVY_WEAPONS:
|
||||
AddSkillToSkillList( HEAVY_WEAPS );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__AUTO_WEAPONS:
|
||||
AddSkillToSkillList( AUTO_WEAPS );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__STEALTHY:
|
||||
AddSkillToSkillList( STEALTHY );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__AMBIDEXTROUS:
|
||||
AddSkillToSkillList( AMBIDEXT );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__KNIFING:
|
||||
AddSkillToSkillList( KNIFING );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__ROOFTOP_SNIPING:
|
||||
AddSkillToSkillList( ONROOF );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__CAMO:
|
||||
AddSkillToSkillList( CAMOUFLAGED );
|
||||
break;
|
||||
|
||||
case IMP_SKILL_TRAITS__MARTIAL_ARTS:
|
||||
AddSkillToSkillList( MARTIALARTS );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HandleLastSelectedTraits( INT8 bNewTrait )
|
||||
{
|
||||
INT8 bTemp=-1;
|
||||
//if there are none selected
|
||||
if( gbLastSelectedTraits[ 0 ] == -1 )
|
||||
{
|
||||
gbLastSelectedTraits[ 0 ] = bNewTrait;
|
||||
}
|
||||
|
||||
//if the second one is not selected
|
||||
else if( gbLastSelectedTraits[ 1 ] == -1 )
|
||||
{
|
||||
gbLastSelectedTraits[ 1 ] = gbLastSelectedTraits[ 0 ];
|
||||
gbLastSelectedTraits[ 0 ] = bNewTrait;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//unselect old trait
|
||||
gfSkillTraitQuestions[ gbLastSelectedTraits[ 1 ] ] = FALSE;
|
||||
|
||||
gbLastSelectedTraits[ 1 ] = gbLastSelectedTraits[ 0 ];
|
||||
gbLastSelectedTraits[ 0 ] = bNewTrait;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef __IMP_SKILL_TRAIT__H_
|
||||
#define __IMP_SKILL_TRAIT__H_
|
||||
|
||||
void EnterIMPSkillTrait( void );
|
||||
void RenderIMPSkillTrait( void );
|
||||
void ExitIMPSkillTrait( void );
|
||||
void HandleIMPSkillTrait( void );
|
||||
|
||||
enum
|
||||
{
|
||||
IMP_SKILL_TRAITS__LOCKPICK,
|
||||
IMP_SKILL_TRAITS__HAND_2_HAND,
|
||||
IMP_SKILL_TRAITS__ELECTRONICS,
|
||||
IMP_SKILL_TRAITS__NIGHT_OPS,
|
||||
IMP_SKILL_TRAITS__THROWING,
|
||||
IMP_SKILL_TRAITS__TEACHING,
|
||||
IMP_SKILL_TRAITS__HEAVY_WEAPONS,
|
||||
IMP_SKILL_TRAITS__AUTO_WEAPONS,
|
||||
IMP_SKILL_TRAITS__STEALTHY,
|
||||
IMP_SKILL_TRAITS__AMBIDEXTROUS,
|
||||
IMP_SKILL_TRAITS__KNIFING,
|
||||
IMP_SKILL_TRAITS__ROOFTOP_SNIPING,
|
||||
IMP_SKILL_TRAITS__CAMO,
|
||||
IMP_SKILL_TRAITS__MARTIAL_ARTS,
|
||||
IMP_SKILL_TRAITS__NONE,
|
||||
IMP_SKILL_TRAITS__NUMBER_SKILLS,
|
||||
};
|
||||
|
||||
// STR16 gzIMPSkillTraitsText[];
|
||||
|
||||
INT8 DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection();
|
||||
|
||||
void AddSelectedSkillsToSkillsList();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,435 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "WordWrap.h"
|
||||
#include "sgp.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "CharProfile.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Personality Quiz.h"
|
||||
#include "IMP Personality Finish.h"
|
||||
#include "IMP Attribute Selection.h"
|
||||
#include "IMP MainPage.h"
|
||||
#endif
|
||||
|
||||
#define IMP_SEEK_AMOUNT 5 * 80 * 2
|
||||
|
||||
#define IMP_LEFT_IDENT_TEXT_X iScreenWidthOffset + 116
|
||||
#define IMP_RIGHT_IDENT_TEXT_X iScreenWidthOffset + 509
|
||||
#define IMP_IDENT_WIDTH 96
|
||||
|
||||
BOOLEAN fInitialized = FALSE;
|
||||
|
||||
|
||||
INT32 iIMPTextRecordLengths[ 300 ];
|
||||
|
||||
|
||||
// the length of persona questions
|
||||
INT32 iIMPQuestionLengths[25]=
|
||||
{
|
||||
7,5,5,6,5,6,5,5,5,5,6,9,5,5,5,5,5,5,5,5,7,10,6,5,5,
|
||||
};
|
||||
|
||||
|
||||
// function headers
|
||||
void PrintIMPPersonalityQuizQuestionAndAnsers( void );
|
||||
void OffSetQuestionForFemaleSpecificQuestions( INT32 *iCurrentOffset );
|
||||
|
||||
|
||||
#define QTN_FIRST_COLUMN_X iScreenWidthOffset + 80
|
||||
#define QTN_SECOND_COLUMN_X iScreenWidthOffset + 320
|
||||
|
||||
|
||||
|
||||
|
||||
void LoadAndDisplayIMPText( INT16 sStartX, INT16 sStartY, INT16 sLineLength, INT16 sIMPTextRecordNumber, UINT32 uiFont, UINT8 ubColor, BOOLEAN fShadow, UINT32 uiFlags)
|
||||
{
|
||||
// this procedure will load and display to the screen starting at postion X, Y relative to the start of the laptop screen
|
||||
// it will access record sIMPTextRecordNumber and go until all records following it but before the next IMP record are displayed in font uiFont
|
||||
CHAR16 sString[ 1024 ];
|
||||
INT32 iCounter =0;
|
||||
BOOLEAN fNotDonePrintingFlag = TRUE;
|
||||
INT32 iRecordPosition = 0;
|
||||
|
||||
if( fShadow == FALSE )
|
||||
{
|
||||
// don't want shadow, remove it
|
||||
SetFontShadow( NO_SHADOW );
|
||||
}
|
||||
|
||||
// load the string
|
||||
LoadEncryptedDataFromFile("BINARYDATA\\IMPText.EDT", sString, ( UINT32 ) ( ( sIMPTextRecordNumber ) * IMP_SEEK_AMOUNT ), IMP_SEEK_AMOUNT);
|
||||
|
||||
// null put last char
|
||||
sString[ wcslen( sString) ] = 0;
|
||||
|
||||
|
||||
if( uiFlags == 0 )
|
||||
{
|
||||
uiFlags = LEFT_JUSTIFIED;
|
||||
}
|
||||
|
||||
DisplayWrappedString( sStartX, ( INT16 )( sStartY ), sLineLength, 2, uiFont, ubColor, sString, FONT_BLACK,FALSE, uiFlags);
|
||||
|
||||
|
||||
// reset shadow
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InitializeImpRecordLengthList( void )
|
||||
{
|
||||
|
||||
// this procedure will setup the IMP records length list with the appropriate values
|
||||
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void PrintImpText( void )
|
||||
{
|
||||
INT16 sWidth = LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X + 1;
|
||||
|
||||
// looks at current page and prints text needed
|
||||
switch( iCurrentImpPage )
|
||||
{
|
||||
case ( IMP_HOME_PAGE ):
|
||||
// the imp homepage
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y + 43, sWidth, IMP_HOME_1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +60, sWidth, IMP_HOME_2, FONT10ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +208, sWidth,IMP_HOME_3, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
|
||||
LoadAndDisplayIMPText( IMP_LEFT_IDENT_TEXT_X, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +99, IMP_IDENT_WIDTH,IMP_HOME_7, FONT10ARIAL, 142, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( IMP_RIGHT_IDENT_TEXT_X, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +99, IMP_IDENT_WIDTH,IMP_HOME_8, FONT10ARIAL, 142, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( iScreenWidthOffset + 258, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +362, ( 640 ),IMP_HOME_5, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
LoadAndDisplayIMPText( IMP_LEFT_IDENT_TEXT_X, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +188, IMP_IDENT_WIDTH,IMP_HOME_9, FONT10ARIAL, 142, TRUE, RIGHT_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( IMP_RIGHT_IDENT_TEXT_X, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +188, IMP_IDENT_WIDTH,IMP_HOME_10, FONT10ARIAL, 142, TRUE, RIGHT_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y +402, sWidth, IMP_HOME_6, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
break;
|
||||
case ( IMP_ABOUT_US ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 17, LAPTOP_SCREEN_WEB_UL_Y + 137, ( 640 ),IMP_ABOUT_US_1, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 25, LAPTOP_SCREEN_WEB_UL_Y + 154, ( 337 - 124 ), IMP_ABOUT_US_2, FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 25, LAPTOP_SCREEN_WEB_UL_Y + 235, ( 337 - 124 ), IMP_ABOUT_US_3, FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 17, LAPTOP_SCREEN_WEB_UL_Y + 260, ( 640 ), IMP_ABOUT_US_10, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 25, LAPTOP_SCREEN_WEB_UL_Y + 280, ( 337 - 124 ), IMP_ABOUT_US_4, FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 267, LAPTOP_SCREEN_WEB_UL_Y + 137, ( 640 ), IMP_ABOUT_US_11, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 275, LAPTOP_SCREEN_WEB_UL_Y + 154, ( 337 - 129 ), IMP_ABOUT_US_5, FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 267, LAPTOP_SCREEN_WEB_UL_Y + 227, ( 640 ), IMP_ABOUT_US_8, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 275, LAPTOP_SCREEN_WEB_UL_Y + 247, ( 337 - 129 ), IMP_ABOUT_US_6, FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 267, LAPTOP_SCREEN_WEB_UL_Y + 277, ( 640 ), IMP_ABOUT_US_9, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 275, LAPTOP_SCREEN_WEB_UL_Y + 297, ( 337 - 129 ), IMP_ABOUT_US_7, FONT10ARIAL, 142, TRUE, 0);
|
||||
|
||||
break;
|
||||
case ( IMP_MAIN_PAGE ):
|
||||
// title
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 19, sWidth, IMP_MAIN_1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
// set up for IMP text for title box area
|
||||
switch( iCurrentProfileMode )
|
||||
{
|
||||
case( IMP__REGISTRY ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 173, LAPTOP_SCREEN_WEB_UL_Y + 91, ( 329 - 173 ), IMP_MAIN_2, FONT10ARIAL, 142, TRUE, 0);
|
||||
break;
|
||||
case( IMP__PORTRAIT ):
|
||||
IanDisplayWrappedString( LAPTOP_SCREEN_UL_X + 173, LAPTOP_SCREEN_WEB_UL_Y + 91, ( 329 - 173 ), 2, FONT10ARIAL, 142, pExtraIMPStrings[ 0 ],0,FALSE,0);
|
||||
break;
|
||||
case( IMP__VOICE ):
|
||||
IanDisplayWrappedString( LAPTOP_SCREEN_UL_X + 173, LAPTOP_SCREEN_WEB_UL_Y + 91, ( 329 - 173 ), 2, FONT10ARIAL, 142, pExtraIMPStrings[ 1 ],0,FALSE,0);
|
||||
break;
|
||||
case( IMP__PERSONALITY ):
|
||||
IanDisplayWrappedString( LAPTOP_SCREEN_UL_X + 173, LAPTOP_SCREEN_WEB_UL_Y + 91, ( 329 - 173 ), 2, FONT10ARIAL, 142, pExtraIMPStrings[ 2 ],0,FALSE,0);
|
||||
break;
|
||||
case( IMP__ATTRIBUTES ):
|
||||
IanDisplayWrappedString( LAPTOP_SCREEN_UL_X + 173, LAPTOP_SCREEN_WEB_UL_Y + 91, ( 329 - 173 ), 2, FONT10ARIAL, 142, pExtraIMPStrings[ 3 ],0,FALSE,0);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case ( IMP_BEGIN ):
|
||||
|
||||
// title
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_BEGIN_1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 105, LAPTOP_SCREEN_WEB_UL_Y + 67, ( 390 - 105 ), IMP_BEGIN_2, FONT10ARIAL, 142, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
// fullname
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 81, LAPTOP_SCREEN_WEB_UL_Y + 139, ( 640 ), IMP_BEGIN_3, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
// nick name
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 81, LAPTOP_SCREEN_WEB_UL_Y + 199, ( 640 ), IMP_BEGIN_4, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
// gender
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 81, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_6, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
// male
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 240, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
// female
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 360, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
break;
|
||||
case ( IMP_PERSONALITY ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 60, ( 456 - 200 ), IMP_PERS_1, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 130, ( 456 - 200 ), IMP_PERS_2, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_PERS_6, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
|
||||
|
||||
|
||||
break;
|
||||
case ( IMP_PERSONALITY_QUIZ ):
|
||||
// LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y + 5, sWidth, IMP_PERS_6, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
|
||||
// LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 293, LAPTOP_SCREEN_WEB_UL_Y + 370, ( 456 - 200 ), IMP_PERS_11, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
// LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 363, LAPTOP_SCREEN_WEB_UL_Y + 370, ( 456 - 200 ), IMP_PERS_12, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
|
||||
// print the question and suitable answers
|
||||
// PrintIMPPersonalityQuizQuestionAndAnsers( );
|
||||
|
||||
break;
|
||||
case ( IMP_PERSONALITY_FINISH ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_PERS_6, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
switch( bPersonalityEndState )
|
||||
{
|
||||
case( 0 ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 125, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 356 - 100 ), IMP_PERS_F1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
break;
|
||||
case( 1 ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 125, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 356 - 100 ), IMP_PERS_F4, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
break;
|
||||
case( 2 ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 125, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 356 - 100 ), IMP_PERS_F5, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_ATTRIB_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 50, ( 300 ), IMP_ATTRIB_5, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 130, ( 300 ), IMP_ATTRIB_6, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 300 ), IMP_ATTRIB_7, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_PAGE ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_ATTRIB_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
// don't blit bonus if reviewing
|
||||
if( fReviewStats != TRUE )
|
||||
{
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 355, LAPTOP_SCREEN_WEB_UL_Y + 51, ( 640 ), IMP_ATTRIB_SA_2 - 1, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 56, LAPTOP_SCREEN_WEB_UL_Y + 33, ( 240 ), IMP_ATTRIB_SA_15, FONT10ARIAL, FONT_WHITE, TRUE, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 56, LAPTOP_SCREEN_WEB_UL_Y + 33, ( 240 ), IMP_ATTRIB_SA_18, FONT10ARIAL, FONT_WHITE, TRUE, 0);
|
||||
}
|
||||
// stats
|
||||
// health
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 0 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_6 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// dex
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 1 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_8 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// agili
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 2 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_7 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// str
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 3 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_9 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// wisdom
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 4 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_11 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// lead
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 5 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_10 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// marks
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 6 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_12 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// med
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 7 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_14 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// expl
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 8 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_15 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
// mech
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + 9 * SKILL_SLIDE_HEIGHT, ( 100 ), IMP_ATTRIB_SA_13 - 1, FONT12ARIAL, FONT_WHITE, TRUE, RIGHT_JUSTIFIED);
|
||||
|
||||
// should we display zero warning or nowmal ' come on herc..' text
|
||||
|
||||
|
||||
|
||||
break;
|
||||
case( IMP_ATTRIBUTE_FINISH ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_ATTRIB_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 125, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 356 - 100 ), IMP_AF_2 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
|
||||
break;
|
||||
case ( IMP_PORTRAIT ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_POR_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 135, LAPTOP_SCREEN_WEB_UL_Y + 68, ( 240 ), IMP_POR_2 - 1, FONT10ARIAL, 142, TRUE, 0);
|
||||
|
||||
break;
|
||||
case ( IMP_VOICE ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_VOC_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 135, LAPTOP_SCREEN_WEB_UL_Y + 70, ( 240 ), IMP_VOC_2 - 1, FONT10ARIAL, 142, TRUE, 0);
|
||||
break;
|
||||
case ( IMP_FINISH ):
|
||||
//LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 7, ( 640 ), IMP_FIN_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 150, LAPTOP_SCREEN_WEB_UL_Y + 55, ( 200 ), IMP_FIN_2 - 1, FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
break;
|
||||
case( IMP_CONFIRM ):
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_CON_1 , FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 60, ( 200 ), IMP_CON_2 , FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 145, ( 200 ), IMP_CON_3 , FONT12ARIAL, FONT_WHITE, TRUE, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PrintImpTextPostButtonRender( void )
|
||||
{
|
||||
// prints any text after IMP buttons have been rendered
|
||||
switch( iCurrentImpPage )
|
||||
{
|
||||
case ( IMP_HOME_PAGE ):
|
||||
// about us button
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PrintIMPPersonalityQuizQuestionAndAnsers( void )
|
||||
{
|
||||
|
||||
INT32 iCounter = 0;
|
||||
INT32 iOffset = 0;
|
||||
|
||||
if( giCurrentPersonalityQuizQuestion < 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// how far into text is the question?
|
||||
for( iCounter = 0; iCounter < giCurrentPersonalityQuizQuestion; iCounter++ )
|
||||
{
|
||||
// incrment until question is found
|
||||
iOffset +=iIMPQuestionLengths[ iCounter ];
|
||||
}
|
||||
|
||||
// handle any female specifc questions
|
||||
if( fCharacterIsMale == FALSE )
|
||||
{
|
||||
OffSetQuestionForFemaleSpecificQuestions( &iOffset );
|
||||
}
|
||||
|
||||
// how many answers are there?
|
||||
switch( iIMPQuestionLengths[ giCurrentPersonalityQuizQuestion ])
|
||||
{
|
||||
case ( 5 ):
|
||||
// 4 answers, write down the side, extra wide columns
|
||||
|
||||
// question is at IMP_QUESTION_1 + iOffset
|
||||
// and there are 4 answers afterwards
|
||||
BltAnswerIndents( 4 );
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 20, LAPTOP_SCREEN_WEB_UL_Y + 30, ( 460 ), ( INT16 )( IMP_QUESTION_1 + iOffset ), FONT10ARIAL, FONT_WHITE, TRUE, LEFT_JUSTIFIED);
|
||||
|
||||
|
||||
// answers
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 390 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 1), FONT10ARIAL, 142, TRUE, LEFT_JUSTIFIED);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 150, ( 390 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 2), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 390 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 3), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 250, ( 390 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 4), FONT10ARIAL, 142, TRUE, 0);
|
||||
|
||||
|
||||
iOffset = 0;
|
||||
break;
|
||||
case ( 6 ):
|
||||
// question is at IMP_QUESTION_1 + iOffset
|
||||
// and there are 5 answers afterwards
|
||||
BltAnswerIndents( 5 );
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 20, LAPTOP_SCREEN_WEB_UL_Y + 30, ( 460 ), ( INT16 )( IMP_QUESTION_1 + iOffset ), FONT10ARIAL, FONT_WHITE, TRUE, LEFT_JUSTIFIED);
|
||||
|
||||
|
||||
// answers
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 1), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 150, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 2), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 3), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 250, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 4), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X +QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 5), FONT10ARIAL, 142, TRUE, 0);
|
||||
|
||||
|
||||
break;
|
||||
case( 7 ):
|
||||
// question is at IMP_QUESTION_1 + iOffset
|
||||
// and there are 5 answers afterwards
|
||||
BltAnswerIndents( 6 );
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 20, LAPTOP_SCREEN_WEB_UL_Y + 30, ( 460 ), ( INT16 )( IMP_QUESTION_1 + iOffset ), FONT10ARIAL, FONT_WHITE, TRUE, LEFT_JUSTIFIED);
|
||||
|
||||
|
||||
// answers
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 1), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 150, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 2), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 3), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 250, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 4), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 5), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 150, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 6), FONT10ARIAL, 142, TRUE, 0);
|
||||
|
||||
|
||||
break;
|
||||
case( 9 ):
|
||||
// question is at IMP_QUESTION_1 + iOffset
|
||||
// and there are 8 answers afterwards
|
||||
BltAnswerIndents( 8 );
|
||||
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 20, LAPTOP_SCREEN_WEB_UL_Y + 30, ( 460 ), ( INT16 )( IMP_QUESTION_1 + iOffset ), FONT10ARIAL, FONT_WHITE, TRUE, LEFT_JUSTIFIED);
|
||||
|
||||
|
||||
// answers
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 1), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 150, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 2), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 3), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_FIRST_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 250, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 4), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 100, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 5), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 150, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 6), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 7), FONT10ARIAL, 142, TRUE, 0);
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + QTN_SECOND_COLUMN_X, LAPTOP_SCREEN_WEB_UL_Y + 250, ( 160 ), ( INT16 )( IMP_QUESTION_1 + iOffset + 8), FONT10ARIAL, 142, TRUE, 0);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void OffSetQuestionForFemaleSpecificQuestions( INT32 *iCurrentOffset )
|
||||
{
|
||||
INT32 iExtraOffSet = 0;
|
||||
BOOLEAN fOffSet = TRUE;
|
||||
INT32 iCounter = 0;
|
||||
|
||||
// find the extra
|
||||
switch( giCurrentPersonalityQuizQuestion )
|
||||
{
|
||||
case( 0 ):
|
||||
iExtraOffSet = 0;
|
||||
break;
|
||||
case( 3 ):
|
||||
iExtraOffSet = iIMPQuestionLengths[ 0 ];
|
||||
break;
|
||||
case( 8 ):
|
||||
iExtraOffSet = iIMPQuestionLengths[ 0 ] + iIMPQuestionLengths[ 3 ];
|
||||
break;
|
||||
case( 9 ):
|
||||
iExtraOffSet = iIMPQuestionLengths[ 0 ] + iIMPQuestionLengths[ 3 ] + iIMPQuestionLengths[ 8 ];
|
||||
break;
|
||||
case( 13 ):
|
||||
iExtraOffSet = iIMPQuestionLengths[ 0 ] + iIMPQuestionLengths[ 3 ] + iIMPQuestionLengths[ 8 ] + iIMPQuestionLengths[ 9 ];
|
||||
break;
|
||||
default:
|
||||
fOffSet = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
if( fOffSet )
|
||||
{
|
||||
*iCurrentOffset = IMP_CON_3 - ( IMP_QUESTION_1 - 3 );
|
||||
|
||||
*iCurrentOffset += iExtraOffSet;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
#ifndef __IMP_TEXT_SYSTEM_H
|
||||
#define __IMP_TEXT_SYSTEM_H
|
||||
|
||||
|
||||
|
||||
void LoadAndDisplayIMPText( INT16 sStartX, INT16 sStartY, INT16 sLineLength, INT16 sIMPTextRecordNumber, UINT32 uiFont, UINT8 ubColor, BOOLEAN fShadow, UINT32 uiFlags);
|
||||
void InitializeImpRecordLengthList( void );
|
||||
void PrintImpText( void );
|
||||
void PrintIMPPersonalityQuizQuestionAndAnsers( void );
|
||||
|
||||
// buttons text
|
||||
extern STR16 pImpButtonText[];
|
||||
|
||||
|
||||
// extra strings not found in IMP Text Document
|
||||
extern STR16 pExtraIMPStrings[];
|
||||
|
||||
|
||||
enum{
|
||||
IMP_HOME_1,
|
||||
IMP_HOME_2,
|
||||
IMP_HOME_3,
|
||||
IMP_HOME_4,
|
||||
IMP_HOME_5,
|
||||
IMP_HOME_6,
|
||||
IMP_HOME_7,
|
||||
IMP_HOME_8,
|
||||
IMP_HOME_9,
|
||||
IMP_HOME_10,
|
||||
IMP_ABOUT_US_1,
|
||||
IMP_ABOUT_US_2,
|
||||
IMP_ABOUT_US_3,
|
||||
IMP_ABOUT_US_4,
|
||||
IMP_ABOUT_US_5,
|
||||
IMP_ABOUT_US_6,
|
||||
IMP_ABOUT_US_7,
|
||||
IMP_ABOUT_US_8,
|
||||
IMP_ABOUT_US_9,
|
||||
IMP_ABOUT_US_10,
|
||||
IMP_ABOUT_US_11,
|
||||
IMP_ABOUT_US_12,
|
||||
IMP_MAIN_1,
|
||||
IMP_MAIN_2,
|
||||
IMP_MAIN_3,
|
||||
IMP_MAIN_4,
|
||||
IMP_MAIN_5,
|
||||
IMP_MAIN_6,
|
||||
IMP_MAIN_7,
|
||||
IMP_MAIN_8,
|
||||
IMP_MAIN_9,
|
||||
IMP_BEGIN_1,
|
||||
IMP_BEGIN_2,
|
||||
IMP_BEGIN_3,
|
||||
IMP_BEGIN_4,
|
||||
IMP_BEGIN_5,
|
||||
IMP_BEGIN_6,
|
||||
IMP_BEGIN_7,
|
||||
IMP_BEGIN_8,
|
||||
IMP_BEGIN_9,
|
||||
IMP_BEGIN_10,
|
||||
IMP_BEGIN_11,
|
||||
IMP_PERS_1,
|
||||
IMP_PERS_2,
|
||||
IMP_PERS_3,
|
||||
IMP_PERS_4,
|
||||
IMP_PERS_5,
|
||||
IMP_PERS_6,
|
||||
IMP_PERS_7,
|
||||
IMP_PERS_8,
|
||||
IMP_PERS_9,
|
||||
IMP_PERS_10,
|
||||
IMP_PERS_11,
|
||||
IMP_PERS_12,
|
||||
IMP_QUESTION_1,
|
||||
IMP_PERS_F1 = IMP_QUESTION_1 + 90,
|
||||
IMP_PERS_F2,
|
||||
IMP_PERS_F3,
|
||||
IMP_PERS_F4,
|
||||
IMP_PERS_F5,
|
||||
IMP_PERS_F6,
|
||||
IMP_PERS_F7,
|
||||
IMP_PERS_F8,
|
||||
IMP_ATTRIB_1,
|
||||
IMP_ATTRIB_2,
|
||||
IMP_ATTRIB_3,
|
||||
IMP_ATTRIB_4,
|
||||
IMP_ATTRIB_5,
|
||||
IMP_ATTRIB_6,
|
||||
IMP_ATTRIB_7,
|
||||
IMP_ATTRIB_8,
|
||||
IMP_ATTRIB_SA_1,
|
||||
IMP_ATTRIB_SA_2,
|
||||
IMP_ATTRIB_SA_3,
|
||||
IMP_ATTRIB_SA_4,
|
||||
IMP_ATTRIB_SA_5,
|
||||
IMP_ATTRIB_SA_6,
|
||||
IMP_ATTRIB_SA_7,
|
||||
IMP_ATTRIB_SA_8,
|
||||
IMP_ATTRIB_SA_9,
|
||||
IMP_ATTRIB_SA_10,
|
||||
IMP_ATTRIB_SA_11,
|
||||
IMP_ATTRIB_SA_12,
|
||||
IMP_ATTRIB_SA_13,
|
||||
IMP_ATTRIB_SA_14,
|
||||
IMP_ATTRIB_SA_15,
|
||||
IMP_ATTRIB_SA_16,
|
||||
IMP_ATTRIB_SA_17,
|
||||
IMP_ATTRIB_SA_18,
|
||||
IMP_AF_1,
|
||||
IMP_AF_2,
|
||||
IMP_AF_3,
|
||||
IMP_AF_4,
|
||||
IMP_AF_5,
|
||||
IMP_AF_6,
|
||||
IMP_POR_1,
|
||||
IMP_POR_2,
|
||||
IMP_POR_3,
|
||||
IMP_POR_4,
|
||||
IMP_POR_5,
|
||||
IMP_POR_6,
|
||||
IMP_POR_7,
|
||||
IMP_VOC_1,
|
||||
IMP_VOC_2,
|
||||
IMP_VOC_3,
|
||||
IMP_VOC_4,
|
||||
IMP_VOC_5,
|
||||
IMP_VOC_6,
|
||||
IMP_VOC_7,
|
||||
IMP_FIN_1,
|
||||
IMP_FIN_2,
|
||||
IMP_FIN_3,
|
||||
IMP_FIN_4,
|
||||
IMP_FIN_5,
|
||||
IMP_FIN_6,
|
||||
IMP_FIN_7,
|
||||
IMP_FIN_8,
|
||||
IMP_FIN_9,
|
||||
IMP_FIN_10,
|
||||
IMP_CON_1 = IMP_FIN_10 - 1,
|
||||
IMP_CON_2,
|
||||
IMP_CON_3,
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,520 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Voices.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "input.h"
|
||||
#include "Isometric Utils.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "Sound Control.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "text.h"
|
||||
#endif
|
||||
|
||||
//current and last pages
|
||||
INT32 iCurrentVoices = 0;
|
||||
INT32 iLastVoice = 2;
|
||||
|
||||
//INT32 iVoiceId = 0;
|
||||
|
||||
|
||||
UINT32 uiVocVoiceSound = 0;
|
||||
// buttons needed for the IMP Voices screen
|
||||
INT32 giIMPVoicesButton[ 3 ];
|
||||
INT32 giIMPVoicesButtonImage[ 3 ];
|
||||
|
||||
|
||||
// hacks to be removeed later
|
||||
BOOLEAN fVoiceAVisited = FALSE, fVoiceBVisited = FALSE, fVoiceCVisited = FALSE;
|
||||
|
||||
|
||||
// redraw protrait screen
|
||||
BOOLEAN fReDrawVoicesScreenFlag = FALSE;
|
||||
|
||||
// the portrait region, for player to click on and re-hear voice
|
||||
MOUSE_REGION gVoicePortraitRegion;
|
||||
|
||||
// function definitions
|
||||
void IncrementVoice( void );
|
||||
void DecrementVoice( void );
|
||||
void CreateIMPVoicesButtons( void );
|
||||
void DestroyIMPVoicesButtons( void );
|
||||
void CreateIMPVoiceMouseRegions( void );
|
||||
void DestroyIMPVoiceMouseRegions( void );
|
||||
void RenderVoiceIndex( void );
|
||||
BOOLEAN CameBackToVoicePageButNotFinished();
|
||||
|
||||
// callbacks
|
||||
void BtnIMPVoicesNextCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPVoicesPreviousCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnIMPVoicesDoneCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void IMPPortraitRegionButtonCallback(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
void EnterIMPVoices( void )
|
||||
{
|
||||
fVoiceAVisited = FALSE;
|
||||
fVoiceBVisited = FALSE;
|
||||
fVoiceCVisited = FALSE;
|
||||
|
||||
// create buttons
|
||||
CreateIMPVoicesButtons( );
|
||||
|
||||
// create mouse regions
|
||||
CreateIMPVoiceMouseRegions( );
|
||||
|
||||
// render background
|
||||
RenderIMPVoices( );
|
||||
|
||||
// play voice once
|
||||
uiVocVoiceSound = PlayVoice( );
|
||||
|
||||
//if the character is a male
|
||||
if( fCharacterIsMale )
|
||||
{
|
||||
iLastVoice = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
iLastVoice = 2;
|
||||
}
|
||||
|
||||
if( iCurrentVoices > iLastVoice )
|
||||
{
|
||||
iCurrentVoices = iLastVoice;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPVoices( void )
|
||||
{
|
||||
|
||||
|
||||
// render background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
// the Voices frame
|
||||
RenderPortraitFrame( 191, 167 );
|
||||
|
||||
// the sillouette
|
||||
RenderLargeSilhouette( 200, 176 );
|
||||
|
||||
// indent for the text
|
||||
RenderAttrib1IndentFrame( 128, 65);
|
||||
|
||||
// render voice index value
|
||||
RenderVoiceIndex( );
|
||||
|
||||
// text
|
||||
PrintImpText( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPVoices( void )
|
||||
{
|
||||
// destroy buttons for IMP Voices page
|
||||
DestroyIMPVoicesButtons( );
|
||||
|
||||
// destroy mouse regions for this screen
|
||||
DestroyIMPVoiceMouseRegions( );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void HandleIMPVoices( void )
|
||||
{
|
||||
|
||||
// do we need to re write screen
|
||||
if ( fReDrawVoicesScreenFlag == TRUE )
|
||||
{
|
||||
RenderIMPVoices( );
|
||||
|
||||
// reset redraw flag
|
||||
fReDrawVoicesScreenFlag = FALSE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void IncrementVoice( void )
|
||||
{
|
||||
// cycle to next voice
|
||||
|
||||
iCurrentVoices++;
|
||||
|
||||
// gone too far?
|
||||
if( iCurrentVoices > iLastVoice )
|
||||
{
|
||||
iCurrentVoices = 0;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DecrementVoice( void )
|
||||
{
|
||||
// cycle to previous voice
|
||||
|
||||
iCurrentVoices--;
|
||||
|
||||
// gone too far?
|
||||
if( iCurrentVoices < 0 )
|
||||
{
|
||||
iCurrentVoices = iLastVoice;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPVoicesButtons( void )
|
||||
{
|
||||
// will create buttons need for the IMP Voices screen
|
||||
|
||||
// next button
|
||||
giIMPVoicesButtonImage[0]= LoadButtonImage( "LAPTOP\\voicearrows.sti" ,-1,1,-1,3,-1 );
|
||||
/*giIMPVoicesButton[0] = QuickCreateButton( giIMPVoicesButtonImage[0], LAPTOP_SCREEN_UL_X + ( 18 ), LAPTOP_SCREEN_WEB_UL_Y + ( 184 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPVoicesNextCallback );
|
||||
*/
|
||||
giIMPVoicesButton[0] = CreateIconAndTextButton( giIMPVoicesButtonImage[0], pImpButtonText[ 13 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 343 ), LAPTOP_SCREEN_WEB_UL_Y + ( 205 ),BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPVoicesNextCallback);
|
||||
|
||||
|
||||
// previous button
|
||||
giIMPVoicesButtonImage[ 1 ]= LoadButtonImage( "LAPTOP\\voicearrows.sti" ,-1,0,-1,2,-1 );
|
||||
/* giIMPVoicesButton[ 1 ] = QuickCreateButton( giIMPVoicesButtonImage[ 1 ], LAPTOP_SCREEN_UL_X + ( 18 ), LAPTOP_SCREEN_WEB_UL_Y + ( 254 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPVoicesPreviousCallback );
|
||||
*/
|
||||
giIMPVoicesButton[ 1 ] = CreateIconAndTextButton( giIMPVoicesButtonImage[ 1 ], pImpButtonText[ 12 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 93), LAPTOP_SCREEN_WEB_UL_Y + ( 205 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPVoicesPreviousCallback);
|
||||
|
||||
|
||||
// done button
|
||||
giIMPVoicesButtonImage[ 2 ]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPVoicesButton[ 2 ] = QuickCreateButton( giIMPVoicesButtonImage[ 1 ], LAPTOP_SCREEN_UL_X + ( 349 ), LAPTOP_SCREEN_WEB_UL_Y + ( 220 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPVoicesDoneCallback );
|
||||
*/
|
||||
giIMPVoicesButton[ 2 ] = CreateIconAndTextButton( giIMPVoicesButtonImage[ 2 ], pImpButtonText[ 11 ], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 187 ), LAPTOP_SCREEN_WEB_UL_Y + ( 330 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPVoicesDoneCallback);
|
||||
|
||||
|
||||
|
||||
SetButtonCursor(giIMPVoicesButton[0], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPVoicesButton[1], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPVoicesButton[2], CURSOR_WWW);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DestroyIMPVoicesButtons( void )
|
||||
{
|
||||
|
||||
// will destroy buttons created for IMP Voices screen
|
||||
|
||||
// the next button
|
||||
RemoveButton(giIMPVoicesButton[ 0 ] );
|
||||
UnloadButtonImage(giIMPVoicesButtonImage[ 0 ] );
|
||||
|
||||
// the previous button
|
||||
RemoveButton(giIMPVoicesButton[ 1 ] );
|
||||
UnloadButtonImage(giIMPVoicesButtonImage[ 1 ] );
|
||||
|
||||
// the done button
|
||||
RemoveButton(giIMPVoicesButton[ 2 ] );
|
||||
UnloadButtonImage(giIMPVoicesButtonImage[ 2 ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPVoicesNextCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// next voice!!
|
||||
IncrementVoice( );
|
||||
// play voice
|
||||
if( ! SoundIsPlaying( uiVocVoiceSound ) )
|
||||
{
|
||||
uiVocVoiceSound = PlayVoice( );
|
||||
}
|
||||
else
|
||||
{
|
||||
SoundStop( uiVocVoiceSound );
|
||||
uiVocVoiceSound = PlayVoice( );
|
||||
}
|
||||
|
||||
|
||||
fReDrawVoicesScreenFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPVoicesPreviousCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// previous voice, please!!!
|
||||
DecrementVoice( );
|
||||
// play voice
|
||||
if( ! SoundIsPlaying( uiVocVoiceSound ) )
|
||||
{
|
||||
uiVocVoiceSound = PlayVoice( );
|
||||
}
|
||||
else
|
||||
{
|
||||
SoundStop( uiVocVoiceSound );
|
||||
uiVocVoiceSound = PlayVoice( );
|
||||
}
|
||||
|
||||
fReDrawVoicesScreenFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPVoicesDoneCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
// go to main page
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
// if we are already done, leave
|
||||
if( iCurrentProfileMode == IMP__FINISH )
|
||||
{
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( CameBackToVoicePageButNotFinished() )
|
||||
{
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCurrentProfileMode = IMP__PERSONALITY;
|
||||
}
|
||||
}
|
||||
/*
|
||||
// current mode now is voice
|
||||
else if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||
{
|
||||
iCurrentProfileMode = IMP__PORTRAIT;
|
||||
}
|
||||
|
||||
else if( iCurrentProfileMode == IMP__PORTRAIT )
|
||||
{
|
||||
// all done profiling
|
||||
iCurrentProfileMode = IMP__VOICE;
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
}
|
||||
*/
|
||||
// set voice id, to grab character slot
|
||||
if( fCharacterIsMale == TRUE )
|
||||
{
|
||||
LaptopSaveInfo.iVoiceId = iCurrentVoices;
|
||||
}
|
||||
else
|
||||
{
|
||||
LaptopSaveInfo.iVoiceId = iCurrentVoices + 3;
|
||||
}
|
||||
|
||||
// set button up image pending
|
||||
fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN CameBackToVoicePageButNotFinished()
|
||||
{
|
||||
//if we are in a page that comes after this one
|
||||
if( iCurrentProfileMode == IMP__PERSONALITY ||
|
||||
iCurrentProfileMode == IMP__ATTRIBUTES )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UINT32 PlayVoice( void )
|
||||
{
|
||||
// CHAR16 sString[ 64 ];
|
||||
|
||||
// gender?
|
||||
|
||||
if( fCharacterIsMale == TRUE )
|
||||
{
|
||||
switch( iCurrentVoices )
|
||||
{
|
||||
case( 0 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\051_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
case( 1 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\052_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
case( 2 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\053_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
case( 3 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\057_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( iCurrentVoices )
|
||||
{
|
||||
case( 0 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\054_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
case( 1 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\055_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
case( 2 ):
|
||||
return( PlayJA2SampleFromFile( "Speech\\056_001.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN ) );
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void CreateIMPVoiceMouseRegions( void )
|
||||
{
|
||||
// will create mouse regions needed for the IMP voices page
|
||||
MSYS_DefineRegion( &gVoicePortraitRegion, LAPTOP_SCREEN_UL_X + 200, LAPTOP_SCREEN_WEB_UL_Y + 176 ,LAPTOP_SCREEN_UL_X + 200 + 100, LAPTOP_SCREEN_WEB_UL_Y + 176 + 100,MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, IMPPortraitRegionButtonCallback );
|
||||
|
||||
|
||||
MSYS_AddRegion( &gVoicePortraitRegion );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DestroyIMPVoiceMouseRegions( void )
|
||||
{
|
||||
// will destroy already created mouse reiogns for IMP voices page
|
||||
MSYS_RemoveRegion( &gVoicePortraitRegion );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void IMPPortraitRegionButtonCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
// callback handler for imp portrait region button events
|
||||
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
if( ! SoundIsPlaying( uiVocVoiceSound ) )
|
||||
{
|
||||
uiVocVoiceSound = PlayVoice( );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RenderVoiceIndex( void )
|
||||
{
|
||||
|
||||
CHAR16 sString[ 32 ];
|
||||
INT16 sX, sY;
|
||||
|
||||
// render the voice index value on the the blank portrait
|
||||
swprintf( sString, L"%s %d", pIMPVoicesStrings[ 0 ], iCurrentVoices + 1 );
|
||||
|
||||
FindFontCenterCoordinates( 290 + LAPTOP_UL_X, 0, 100, 0, sString, FONT12ARIAL, &sX, &sY );
|
||||
|
||||
SetFont( FONT12ARIAL );
|
||||
SetFontForeground( FONT_WHITE );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
mprintf( sX, iScreenHeightOffset + 320, sString );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef __IMP_VOICES_H
|
||||
#define __IMP_VOICES_H
|
||||
|
||||
|
||||
void EnterIMPVoices( void );
|
||||
void RenderIMPVoices( void );
|
||||
void ExitIMPVoices( void );
|
||||
void HandleIMPVoices( void );
|
||||
UINT32 PlayVoice( void );
|
||||
|
||||
extern INT32 iVoiceId;
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,175 @@
|
||||
#ifndef __IMP_VIDEO_H
|
||||
#define __IMP_VIDEO_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// the functions
|
||||
|
||||
// metal background
|
||||
void RenderProfileBackGround( void );
|
||||
void RemoveProfileBackGround( void );
|
||||
BOOLEAN LoadProfileBackGround( void );
|
||||
|
||||
// imp symbol
|
||||
void RenderIMPSymbol( INT16 sX, INT16 sY );
|
||||
void DeleteIMPSymbol( void );
|
||||
BOOLEAN LoadIMPSymbol( void );
|
||||
|
||||
BOOLEAN LoadBeginIndent( void );
|
||||
void DeleteBeginIndent( void );
|
||||
void RenderBeginIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadActivationIndent( void );
|
||||
void DeleteActivationIndent( void );
|
||||
void RenderActivationIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadFrontPageIndent( void );
|
||||
void DeleteFrontPageIndent( void );
|
||||
void RenderFrontPageIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadAnalyse( void );
|
||||
void DeleteAnalyse( void );
|
||||
void RenderAnalyse(INT16 sX, INT16 sY, INT8 bImageNumber);
|
||||
|
||||
BOOLEAN LoadAttributeGraph( void );
|
||||
void DeleteAttributeGraph( void );
|
||||
void RenderAttributeGraph(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadAttributeGraphBar( void );
|
||||
void DeleteAttributeBarGraph( void );
|
||||
void RenderAttributeBarGraph(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadFullNameIndent( void );
|
||||
void DeleteFullNameIndent( void );
|
||||
void RenderFullNameIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadNameIndent( void );
|
||||
void DeleteNameIndent( void );
|
||||
void RenderNameIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadNickNameIndent( void );
|
||||
void DeleteNickNameIndent( void );
|
||||
void RenderNickNameIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadGenderIndent( void );
|
||||
void DeleteGenderIndent( void );
|
||||
void RenderGenderIndent(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadSmallFrame( void );
|
||||
void DeleteSmallFrame( void );
|
||||
void RenderSmallFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadSmallSilhouette( void );
|
||||
void DeleteSmallSilhouette( void );
|
||||
void RenderSmallSilhouette(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadLargeSilhouette( void );
|
||||
void DeleteLargeSilhouette( void );
|
||||
void RenderLargeSilhouette(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadAttributeFrame( void );
|
||||
void DeleteAttributeFrame( void );
|
||||
void RenderAttributeFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadSliderBar( void );
|
||||
void DeleteSliderBar( void );
|
||||
void RenderSliderBar(INT16 sX, INT16 sY);
|
||||
|
||||
|
||||
BOOLEAN LoadButton2Image( void );
|
||||
void DeleteButton2Image( void );
|
||||
void RenderButton2Image(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadButton4Image( void );
|
||||
void DeleteButton4Image( void );
|
||||
void RenderButton4Image(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadButton1Image( void );
|
||||
void DeleteButton1Image( void );
|
||||
void RenderButton1Image(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadPortraitFrame( void );
|
||||
void DeletePortraitFrame( void );
|
||||
void RenderPortraitFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadMainIndentFrame( void );
|
||||
void DeleteMainIndentFrame( void );
|
||||
void RenderMainIndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnLongIndentFrame( void );
|
||||
void DeleteQtnLongIndentFrame( void );
|
||||
void RenderQtnLongIndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnShortIndentFrame( void );
|
||||
void DeleteQtnShortIndentFrame( void );
|
||||
void RenderQtnShortIndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnLongIndentHighFrame( void );
|
||||
void DeleteQtnLongIndentHighFrame( void );
|
||||
void RenderQtnLongIndentHighFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnShortIndentHighFrame( void );
|
||||
void DeleteQtnShortIndentHighFrame( void );
|
||||
void RenderQtnShortIndentHighFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnShort2IndentFrame( void );
|
||||
void DeleteQtnShort2IndentFrame( void );
|
||||
void RenderQtnShort2IndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnShort2IndentHighFrame( void );
|
||||
void DeleteQtnShort2IndentHighFrame( void );
|
||||
void RenderQtnShort2IndentHighFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadQtnIndentFrame( void );
|
||||
void DeleteQtnIndentFrame( void );
|
||||
void RenderQtnIndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadAttrib1IndentFrame( void );
|
||||
void DeleteAttrib1IndentFrame( void );
|
||||
void RenderAttrib1IndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadAttrib2IndentFrame( void );
|
||||
void DeleteAttrib2IndentFrame( void );
|
||||
void RenderAttrib2IndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
BOOLEAN LoadAvgMercIndentFrame( void );
|
||||
void DeleteAvgMercIndentFrame( void );
|
||||
void RenderAvgMercIndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
|
||||
BOOLEAN LoadAboutUsIndentFrame( void );
|
||||
void DeleteAboutUsIndentFrame( void );
|
||||
void RenderAboutUsIndentFrame(INT16 sX, INT16 sY);
|
||||
|
||||
|
||||
void RenderAttributeFrameForIndex( INT16 sX, INT16 sY, INT32 iIndex );
|
||||
|
||||
|
||||
// graphical handles
|
||||
|
||||
extern UINT32 guiBACKGROUND;
|
||||
extern UINT32 guiIMPSYMBOL;
|
||||
extern UINT32 guiBEGININDENT;
|
||||
extern UINT32 guiACTIVATIONINDENT;
|
||||
extern UINT32 guiFRONTPAGEINDENT;
|
||||
extern UINT32 guiFULLNAMEINDENT;
|
||||
extern UINT32 guiGENDERINDENT;
|
||||
extern UINT32 guiSMALLFRAME;
|
||||
extern UINT32 guiANALYSE;
|
||||
extern UINT32 guiATTRIBUTEGRAPH;
|
||||
extern UINT32 guiATTRIBUTEGRAPHBAR;
|
||||
extern UINT32 guiSMALLSILHOUETTE;
|
||||
extern UINT32 guiLARGESILHOUETTE;
|
||||
extern UINT32 guiPORTRAITFRAME;
|
||||
extern UINT32 guiATTRIBUTEFRAME;
|
||||
extern UINT32 guiATTRIBUTESCREENINDENT1;
|
||||
extern UINT32 guiATTRIBUTESCREENINDENT2;
|
||||
extern UINT32 guiSLIDERBAR;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
#ifndef _INSURANCE_TEXT_H_
|
||||
#define _INSURANCE_TEXT_H_
|
||||
|
||||
|
||||
#define INSURANCE_TEXT_SINGLE_LINE_SIZE 80 * 2
|
||||
|
||||
#define INSURANCE_TEXT_MULTI_LINE_SIZE 5 * 80 * 2
|
||||
|
||||
#define INSURANCE_TEXT_SINGLE_FILE "BINARYDATA\\InsuranceSingle.edt"
|
||||
#define INSURANCE_TEXT_MULTI_FILE "BINARYDATA\\InsuranceMulti.edt"
|
||||
|
||||
#define INSURANCE_TEXT_SINGLE 1
|
||||
#define INSURANCE_TEXT_MULTI 2
|
||||
|
||||
|
||||
//Single line
|
||||
enum
|
||||
{
|
||||
INS_SNGL_MALLEUS_INCUS_STAPES,
|
||||
INS_SNGL_WERE_LISTENING,
|
||||
INS_SNGL_LIFE_INSURANCE_SPECIALISTS,
|
||||
INS_SNGL_COMMENTSFROM_CLIENTS,
|
||||
INS_SNGL_HOW_DOES_INS_WORK,
|
||||
INS_SNGL_TO_ENTER_REVIEW,
|
||||
INS_SNGL_GUS_TARBALLS,
|
||||
INS_SNGL_ALI_HUSSEAN,
|
||||
INS_SNGL_LANCE_ALLOT,
|
||||
INS_SNGL_FRED_COUSTEAU,
|
||||
INS_SNGL_WE_CAN_OFFER_U,
|
||||
INS_SNGL_PREMIUMS,
|
||||
INS_SNGL_RENEWL_PREMIUMS,
|
||||
INS_SNGL_LOWER_PREMIUMS_4_RENEWING,
|
||||
INS_SNGL_POLICY_CANCELATIONS,
|
||||
INS_SNGL_SUBMITTING_CLAIM,
|
||||
INS_SNGL_FRAUD,
|
||||
INS_SNGL_ENTERING_REVIEWING_CLAIM,
|
||||
INS_SNGL_EMPLOYMENT_CONTRACT,
|
||||
INS_SNGL_LENGTH,
|
||||
INS_SNGL_DAYS_REMAINING,
|
||||
INS_SNGL_INSURANCE_CONTRACT,
|
||||
INS_SNGL_PREMIUM_OWING,
|
||||
INS_SNGL_PREMIUM_REFUND,
|
||||
INS_SNGL_CHANGE_LENGTH,
|
||||
INS_SNGL_CONTRACT,
|
||||
INS_SNGL_NOCONTRACT,
|
||||
INS_SNGL_DEAD_WITH_CONTRACT,
|
||||
INS_SNGL_DEAD_NO_CONTRACT,
|
||||
INS_SNGL_PARTIALLY_INSURED,
|
||||
|
||||
|
||||
//Multi line
|
||||
INS_MULTI_LINE_BEGINS,
|
||||
|
||||
|
||||
INS_MLTI_EMPLOY_HIGH_RISK,
|
||||
INS_MLTI_HIGH_FATALITY_RATE,
|
||||
INS_MLTI_DRAIN_SALARY,
|
||||
INS_MLTI_IF_ANSWERED_YES,
|
||||
INS_MLTI_GUS_SPEECH,
|
||||
INS_MLTI_ALI_HUSSEAN_SPEECH,
|
||||
INS_MLTI_LANCE_ALLOT_SPEECH,
|
||||
INS_MLTI_FRED_COUSTEAU_SPEECH,
|
||||
INS_MLTI_HIRING_4_SHORT_TERM_HIGH_RISK_1,
|
||||
INS_MLTI_HIRING_4_SHORT_TERM_HIGH_RISK_2,
|
||||
INS_MLTI_REASONABLE_AND_FLEXIBLE,
|
||||
INS_MLTI_EQUITABLE_RENEWL_PREMIUMS,
|
||||
INS_MLTI_PREROGATIVE_TO_CANCEL,
|
||||
INS_MLTI_QUICKLY_AND_EFFICIENT,
|
||||
INS_MLTI_EACH_TIME_U_COME_TO_US,
|
||||
INS_MLTI_LENGTH_OF_EMPLOYMENT_CONTRACT,
|
||||
INS_MLTI_EMPLOYEES_AGE_AND_HEALTH,
|
||||
INS_MLTI_EMPLOOYEES_TRAINING_AND_EXP,
|
||||
INS_MLTI_WHEN_IT_COMES_TIME_TO_RENEW,
|
||||
INS_MLTI_SHOULD_THE_PROJECT_BE_GOING_WELL,
|
||||
INS_MLTI_IF_U_EXTEND_THE_CONTRACT,
|
||||
INS_MLTI_WE_WILL_ACCEPT_INS_CANCELATION,
|
||||
INS_MLTI_U_CAN_REST_ASSURED,
|
||||
INS_MLTI_HAD_U_HIRED_AN_INDIVIDUAL,
|
||||
INS_MLTI_WE_RESERVE_THE_RIGHT,
|
||||
INS_MLTI_SHOULD_THERE_BE_GROUNDS,
|
||||
INS_MLTI_SHOULD_SUCH_A_SITUATION,
|
||||
INS_MLTI_TO_PURCHASE_INSURANCE,
|
||||
INS_MLTI_ONCE_SATISFIED_CLICK_ACCEPT,
|
||||
INS_MLTI_SORRY_U_CANT_CANCEL,
|
||||
INS_MLTI_ARE_U_SURE_U_CANCEL,
|
||||
INS_MLTI_NO_QUALIFIED_MERCS,
|
||||
INS_MLTI_NOT_ENOUGH_FUNDS,
|
||||
INS_MLTI_ALL_AIM_MERCS_ON_SHORT_CONTRACT,
|
||||
INS_MLTI_1_HOUR_EXCLUSION_A,
|
||||
INS_MLTI_1_HOUR_EXCLUSION_B,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,141 @@
|
||||
#ifndef __LAPTOP_ALL_H
|
||||
#define __LAPTOP_ALL_H
|
||||
|
||||
#pragma message("GENERATED PCH FOR LAPTOP PROJECT.")
|
||||
|
||||
#include "Types.h"
|
||||
#include "laptop.h"
|
||||
#include "aim.h"
|
||||
#include "Utilities.h"
|
||||
#include "WCheck.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "email.h"
|
||||
#include "Text.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#include "AimArchives.h"
|
||||
#include "AimFacialIndex.h"
|
||||
#include "stdio.h"
|
||||
#include "Aim.h"
|
||||
#include "AimHistory.h"
|
||||
#include "AimLinks.h"
|
||||
#include "AimMembers.h"
|
||||
#include "sysutil.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "Interface Items.h"
|
||||
#include "overhead.h"
|
||||
#include "finances.h"
|
||||
#include "vsurface.h"
|
||||
#include "VObject.h"
|
||||
#include "Faces.h"
|
||||
#include "dialogue control.h"
|
||||
#include "History.h"
|
||||
#include "Game Event Hook.h"
|
||||
#include "MercTextBox.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Soldier Add.h"
|
||||
#include "Merc Hiring.h"
|
||||
#include "strategic.h"
|
||||
#include "english.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Random.h"
|
||||
#include "Strategic Status.h"
|
||||
#include "Merc Contract.h"
|
||||
#include "Strategic Merc Handler.h"
|
||||
#include "AimPolicies.h"
|
||||
#include "AimSort.h"
|
||||
#include <stdlib.h>
|
||||
#include "BobbyR.h"
|
||||
#include "Arms Dealer Init.h"
|
||||
#include "ArmsDealerInvInit.h"
|
||||
#include "BobbyRGuns.h"
|
||||
#include "Cursors.h"
|
||||
#include "Weapons.h"
|
||||
#include "Store Inventory.h"
|
||||
#include "BobbyRAmmo.h"
|
||||
#include "BobbyRArmour.h"
|
||||
#include "BobbyRMailOrder.h"
|
||||
#include "input.h"
|
||||
#include "line.h"
|
||||
#include "Campaign Types.h"
|
||||
#include "BobbyRMisc.h"
|
||||
#include "BobbyRUsed.h"
|
||||
#include "CharProfile.h"
|
||||
#include "IMP AboutUs.h"
|
||||
#include "IMP Attribute Entrance.h"
|
||||
#include "IMP Attribute Finish.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP HomePage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "IMP Finish.h"
|
||||
#include "IMP Portraits.h"
|
||||
#include "IMP Voices.h"
|
||||
#include "IMP Personality Entrance.h"
|
||||
#include "IMP Attribute Selection.h"
|
||||
#include "IMP Personality Quiz.h"
|
||||
#include "IMP Begin Screen.h"
|
||||
#include "IMP Personality Finish.h"
|
||||
#include "IMP Confirm.h"
|
||||
#include "messageboxscreen.h"
|
||||
#include "soldier profile.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "environment.h"
|
||||
#include <stdio.h>
|
||||
#include "files.h"
|
||||
#include "Game clock.h"
|
||||
#include "Strategic Mines.h"
|
||||
#include "florist.h"
|
||||
#include "florist Cards.h"
|
||||
#include "Florist Gallery.h"
|
||||
#include "florist Order Form.h"
|
||||
#include "Text Input.h"
|
||||
#include "funeral.h"
|
||||
#include "strategicmap.h"
|
||||
#include "QuestText.h"
|
||||
#include "Isometric Utils.h"
|
||||
#include "Timer Control.h"
|
||||
#include "Soldier Profile Type.h"
|
||||
#include "Animation Data.h"
|
||||
#include "soundman.h"
|
||||
#include "mousesystem.h"
|
||||
#include "sgp.h"
|
||||
#include "Sound Control.h"
|
||||
#include "Insurance Text.h"
|
||||
#include "insurance.h"
|
||||
#include "Assignments.h"
|
||||
#include "insurance Info.h"
|
||||
#include "insurance Contract.h"
|
||||
#include "screens.h"
|
||||
#include "Event Pump.h"
|
||||
#include "mercs Files.h"
|
||||
#include "mercs Account.h"
|
||||
#include "mercs No Account.h"
|
||||
#include "insurance Comments.h"
|
||||
#include "sirtech.h"
|
||||
#include "personnel.h"
|
||||
#include "Interface Control.h"
|
||||
#include "Game init.h"
|
||||
#include "vobject_blitters.h"
|
||||
#include "LibraryDataBase.h"
|
||||
#include "music control.h"
|
||||
#include "SaveLoadGame.h"
|
||||
#include "RenderWorld.h"
|
||||
#include "gameloop.h"
|
||||
#include "Map Screen Interface.h"
|
||||
#include "ambient control.h"
|
||||
#include "Message.h"
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "Cursor Control.h"
|
||||
#include "Quests.h"
|
||||
#include "mercs.h"
|
||||
#include "Speck Quotes.h"
|
||||
#include "Font.h"
|
||||
#include "mapscreen.h"
|
||||
#include "Map Screen Interface Map.h"
|
||||
#include "ShopKeeper Interface.h"
|
||||
#include "Cheats.h"
|
||||
|
||||
#endif
|
||||
+9978
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,697 @@
|
||||
# Microsoft Developer Studio Project File - Name="Laptop" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Laptop - Win32 Demo Bounds Checker
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Laptop.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Laptop.mak" CFG="Laptop - Win32 Demo Bounds Checker"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Laptop - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Debug Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Release Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Demo Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Demo Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA"
|
||||
# PROP Scc_LocalPath "..\..\..\ja2\build"
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Laptop - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop__"
|
||||
# PROP BASE Intermediate_Dir "Laptop__"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I ".\\" /D "PRECOMPILEDHEADERS" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Laptop_0"
|
||||
# PROP BASE Intermediate_Dir "Laptop_0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release with Debug"
|
||||
# PROP Intermediate_Dir "Release with Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\TileEngine" /I "..\Utils" /I "..\TacticalAI" /I "..\Editor" /I "..\Tactical" /I "..\strategic" /I ".\\" /D "NDEBUG" /D "RELEASE_WITH_DEBUG_INFO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop_2"
|
||||
# PROP BASE Intermediate_Dir "Laptop_2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Bounds Checker"
|
||||
# PROP Intermediate_Dir "Bounds Checker"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop_1"
|
||||
# PROP BASE Intermediate_Dir "Laptop_1"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug Demo"
|
||||
# PROP Intermediate_Dir "Debug Demo"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Laptop_3"
|
||||
# PROP BASE Intermediate_Dir "Laptop_3"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release Demo"
|
||||
# PROP Intermediate_Dir "Release Demo"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /D "RELEASE_WITH_DEBUG_INFO" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Laptop_4"
|
||||
# PROP BASE Intermediate_Dir "Laptop_4"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Demo Release with Debug"
|
||||
# PROP Intermediate_Dir "Demo Release with Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /D "RELEASE_WITH_DEBUG_INFO" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\TileEngine" /I "..\Utils" /I "..\TacticalAI" /I "..\Editor" /I "..\Tactical" /I "..\strategic" /I ".\\" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop_5"
|
||||
# PROP BASE Intermediate_Dir "Laptop_5"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Demo Bounds Checker"
|
||||
# PROP Intermediate_Dir "Demo Bounds Checker"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "BOUNDS_CHECKER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Laptop - Win32 Release"
|
||||
# Name "Laptop - Win32 Debug"
|
||||
# Name "Laptop - Win32 Release with Debug Info"
|
||||
# Name "Laptop - Win32 Bounds Checker"
|
||||
# Name "Laptop - Win32 Debug Demo"
|
||||
# Name "Laptop - Win32 Release Demo"
|
||||
# Name "Laptop - Win32 Demo Release with Debug Info"
|
||||
# Name "Laptop - Win32 Demo Bounds Checker"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\aim.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimArchives.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimFacialIndex.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimHistory.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimLinks.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimMembers.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimPolicies.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimSort.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyR.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRAmmo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRArmour.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRGuns.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMailOrder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMisc.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRShipments.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRUsed.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BrokenLink.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharProfile.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\email.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\files.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\finances.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Cards.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Gallery.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Order Form.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\florist.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\funeral.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\history.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP AboutUs.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Entrance.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Finish.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Selection.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Begin Screen.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Compile Character.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Confirm.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Finish.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP HomePage.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP MainPage.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Entrance.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Finish.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Quiz.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Portraits.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Skill Trait.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Text System.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Voices.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\IMPVideoObjects.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Comments.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Contract.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Info.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\insurance.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\laptop.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mercs Account.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mercs Files.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mercs No Account.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mercs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\personnel.cpp
|
||||
|
||||
!IF "$(CFG)" == "Laptop - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release with Debug Info"
|
||||
|
||||
# ADD CPP /W4 /O2
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Bounds Checker"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug Demo"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release Demo"
|
||||
|
||||
# ADD BASE CPP /W4 /O2
|
||||
# ADD CPP /W4 /O2
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Release with Debug Info"
|
||||
|
||||
# ADD BASE CPP /W4 /O2
|
||||
# ADD CPP /W4 /O2
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Bounds Checker"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sirtech.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Store Inventory.cpp"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\aim.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimMembers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRAmmo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRArmour.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRGuns.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMailOrder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMisc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRShipments.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRUsed.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BrokenLink.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharProfile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\email.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\files.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\finances.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Cards.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Gallery.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Order Form.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\florist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\funeral.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\history.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP AboutUs.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Entrance.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Finish.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Selection.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Begin Screen.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Compile Character.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Confirm.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Finish.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP HomePage.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP MainPage.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Entrance.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Finish.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Quiz.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Portraits.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Skill Trait.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Text System.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Voices.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\IMPVideoObjects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Comments.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Contract.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Info.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Insurance Text.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\insurance.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Laptop All.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\laptop.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LaptopSave.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mercs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\personnel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sirtech.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Store Inventory.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+2540
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,184 @@
|
||||
#ifndef _LAPTOP_SAVE_H_
|
||||
#define _LAPTOP_SAVE_H_
|
||||
|
||||
#include "Item Types.h"
|
||||
#include "FileMan.h"
|
||||
#include "Store Inventory.h"
|
||||
|
||||
#define MAX_BOOKMARKS 20
|
||||
|
||||
|
||||
|
||||
#define MAX_PURCHASE_AMOUNT 10
|
||||
|
||||
|
||||
|
||||
|
||||
#define SPECK_QUOTE__ALREADY_TOLD_PLAYER_THAT_LARRY_RELAPSED 0x00000001
|
||||
#define SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT 0x00000002
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOLEAN fActive;
|
||||
UINT8 ubSoldierID;
|
||||
UINT8 ubMercID;
|
||||
INT32 iPayOutPrice;
|
||||
} LIFE_INSURANCE_PAYOUT;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOLEAN fHaveDisplayedPopUpInLaptop; // Is set when the popup gets displayed, reset when entering laptop again.
|
||||
INT32 iIdOfMerc;
|
||||
UINT32 uiArrivalTime;
|
||||
} LAST_HIRED_MERC_STRUCT;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT16 usItemIndex;
|
||||
UINT8 ubNumberPurchased;
|
||||
INT8 bItemQuality;
|
||||
UINT16 usBobbyItemIndex; //Item number in the BobbyRayInventory structure
|
||||
BOOLEAN fUsed; //Indicates wether or not the item is from the used inventory or the regular inventory
|
||||
} BobbyRayPurchaseStruct;
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOLEAN fActive;
|
||||
BobbyRayPurchaseStruct BobbyRayPurchase[ MAX_PURCHASE_AMOUNT ];
|
||||
UINT8 ubNumberPurchases;
|
||||
} BobbyRayOrderStruct;
|
||||
|
||||
|
||||
//used when the player goes to bobby rays when it is still down
|
||||
enum
|
||||
{
|
||||
BOBBYR_NEVER_BEEN_TO_SITE,
|
||||
BOBBYR_BEEN_TO_SITE_ONCE,
|
||||
BOBBYR_ALREADY_SENT_EMAIL,
|
||||
};
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
//General Laptop Info
|
||||
BOOLEAN gfNewGameLaptop; //Is it the firs time in Laptop
|
||||
BOOLEAN fVisitedBookmarkAlready[20]; // have we visitied this site already?
|
||||
INT32 iBookMarkList[MAX_BOOKMARKS];
|
||||
|
||||
|
||||
INT32 iCurrentBalance; // current players balance
|
||||
|
||||
|
||||
//IMP Information
|
||||
BOOLEAN fIMPCompletedFlag; // Has the player Completed the IMP process
|
||||
BOOLEAN fSentImpWarningAlready; // Has the Imp email warning already been sent
|
||||
|
||||
|
||||
//Personnel Info
|
||||
INT16 ubDeadCharactersList[ 256 ];
|
||||
INT16 ubLeftCharactersList[ 256 ];
|
||||
INT16 ubOtherCharactersList[ 256 ];
|
||||
|
||||
|
||||
// MERC site info
|
||||
UINT8 gubPlayersMercAccountStatus;
|
||||
UINT32 guiPlayersMercAccountNumber;
|
||||
UINT8 gubLastMercIndex;
|
||||
|
||||
|
||||
// Aim Site
|
||||
|
||||
|
||||
// BobbyRay Site
|
||||
STORE_INVENTORY BobbyRayInventory[ MAXITEMS ];
|
||||
STORE_INVENTORY BobbyRayUsedInventory[ MAXITEMS ];
|
||||
|
||||
BobbyRayOrderStruct *BobbyRayOrdersOnDeliveryArray;
|
||||
UINT8 usNumberOfBobbyRayOrderItems; // The number of elements in the array
|
||||
UINT8 usNumberOfBobbyRayOrderUsed; // The number of items in the array that are used
|
||||
|
||||
|
||||
// Flower Site
|
||||
//NONE
|
||||
|
||||
// Insurance Site
|
||||
LIFE_INSURANCE_PAYOUT *pLifeInsurancePayouts;
|
||||
UINT8 ubNumberLifeInsurancePayouts; // The number of elements in the array
|
||||
UINT8 ubNumberLifeInsurancePayoutUsed; // The number of items in the array that are used
|
||||
|
||||
BOOLEAN fBobbyRSiteCanBeAccessed;
|
||||
|
||||
UINT8 ubPlayerBeenToMercSiteStatus;
|
||||
BOOLEAN fFirstVisitSinceServerWentDown;
|
||||
BOOLEAN fNewMercsAvailableAtMercSite;
|
||||
BOOLEAN fSaidGenericOpeningInMercSite;
|
||||
BOOLEAN fSpeckSaidFloMarriedCousinQuote;
|
||||
BOOLEAN fHasAMercDiedAtMercSite;
|
||||
|
||||
#ifdef CRIPPLED_VERSION
|
||||
UINT8 ubCrippleFiller[20];
|
||||
#endif
|
||||
|
||||
|
||||
INT8 gbNumDaysTillFirstMercArrives;
|
||||
INT8 gbNumDaysTillSecondMercArrives;
|
||||
INT8 gbNumDaysTillThirdMercArrives;
|
||||
INT8 gbNumDaysTillFourthMercArrives;
|
||||
|
||||
UINT32 guiNumberOfMercPaymentsInDays; // Keeps track of each day of payment the MERC site gets
|
||||
|
||||
UINT16 usInventoryListLength[BOBBY_RAY_LISTS];
|
||||
|
||||
INT32 iVoiceId;
|
||||
|
||||
UINT8 ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction;
|
||||
|
||||
BOOLEAN fMercSiteHasGoneDownYet;
|
||||
|
||||
UINT8 ubSpeckCanSayPlayersLostQuote;
|
||||
|
||||
LAST_HIRED_MERC_STRUCT sLastHiredMerc;
|
||||
|
||||
INT32 iCurrentHistoryPage;
|
||||
INT32 iCurrentFinancesPage;
|
||||
INT32 iCurrentEmailPage;
|
||||
|
||||
UINT32 uiSpeckQuoteFlags;
|
||||
|
||||
UINT32 uiFlowerOrderNumber;
|
||||
|
||||
UINT32 uiTotalMoneyPaidToSpeck;
|
||||
|
||||
UINT8 ubLastMercAvailableId;
|
||||
UINT8 bPadding[ 86 ];
|
||||
|
||||
} LaptopSaveInfoStruct;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern LaptopSaveInfoStruct LaptopSaveInfo;
|
||||
|
||||
extern BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ];
|
||||
|
||||
|
||||
|
||||
void LaptopSaveVariablesInit();
|
||||
BOOLEAN LoadLaptopInfoFromSavedGame( HWFILE hFile );
|
||||
BOOLEAN SaveLaptopInfoToSavedGame( HWFILE hFile );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
#ifndef _SPECK_QUOTES_H_
|
||||
#define _SPECK_QUOTES_H_
|
||||
|
||||
//Enum,s for all of specks quotes
|
||||
enum
|
||||
{
|
||||
SPECK_QUOTE_FIRST_TIME_IN_0, //0
|
||||
SPECK_QUOTE_FIRST_TIME_IN_1,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_2,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_3,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_4,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_5,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_6,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_7,
|
||||
SPECK_QUOTE_FIRST_TIME_IN_8,
|
||||
SPECK_QUOTE_THANK_PLAYER_FOR_OPENING_ACCOUNT,
|
||||
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_1_TOUGH_START, //10
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_2_BUSINESS_BAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_3_BUSINESS_GOOD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_4_TRYING_TO_RECRUIT,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_5_PLAYER_OWES_SPECK_ACCOUNT_SUSPENDED,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_6_PLAYER_OWES_SPECK_ALMOST_BANKRUPT_1,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_6_PLAYER_OWES_SPECK_ALMOST_BANKRUPT_2,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_7_PLAYER_ACCOUNT_OK,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_8_MADE_PARTIAL_PAYMENT,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_9_FIRST_VISIT_SINCE_SERVER_WENT_DOWN,
|
||||
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_10_GENERIC_OPENING, //20
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_10_TAG_FOR_20,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_11_NEW_MERCS_AVAILABLE,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_12_PLAYERS_LOST_MERCS,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_PLAYER_OWES_MONEY,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_PLAYER_CLEARED_DEBT,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_PLAYER_CLEARED_OVERDUE_ACCOUNT,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_FIRST_MERC_DIES,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_BIFF_IS_DEAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_HAYWIRE_IS_DEAD,
|
||||
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_GASKET_IS_DEAD, //30
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_RAZOR_IS_DEAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_FLO_IS_DEAD_BIFF_ALIVE,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_FLO_IS_DEAD_BIFF_IS_DEAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_FLO_MARRIED_A_COUSIN_BIFF_IS_ALIVE,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_GUMPY_IS_DEAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_LARRY_IS_DEAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_LARRY_RELAPSED,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_COUGER_IS_DEAD,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_NUMB_IS_DEAD,
|
||||
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_BUBBA_IS_DEAD, //40
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_ON_AFTER_OTHER_TAGS_1,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_ON_AFTER_OTHER_TAGS_2,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_ON_AFTER_OTHER_TAGS_3,
|
||||
SPECK_QUOTE_ALTERNATE_OPENING_TAG_ON_AFTER_OTHER_TAGS_4,
|
||||
SPECK_QUOTE_PLAYER_MAKES_FULL_PAYMENT,
|
||||
SPECK_QUOTE_PLAYER_MAKES_PARTIAL_PAYMENT,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_BIFF,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_HAYWIRE,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_GASKET,
|
||||
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_RAZOR, //50
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_FLO,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_GUMPY,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_LARRY,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_COUGER,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_NUMB,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_BUBBA,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_TAG_GETTING_MORE_MERCS,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_1,
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_2,
|
||||
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_3, //60
|
||||
SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_4,
|
||||
SPECK_QUOTE_BIFF_UNAVALIABLE,
|
||||
SPECK_QUOTE_PLAYERS_HIRES_BIFF_SPECK_PLUGS_LARRY,
|
||||
SPECK_QUOTE_PLAYERS_HIRES_BIFF_SPECK_PLUGS_FLO,
|
||||
SPECK_QUOTE_PLAYERS_HIRES_HAYWIRE_SPECK_PLUGS_RAZOR,
|
||||
SPECK_QUOTE_PLAYERS_HIRES_RAZOR_SPECK_PLUGS_HAYWIRE,
|
||||
SPECK_QUOTE_PLAYERS_HIRES_FLO_SPECK_PLUGS_BIFF,
|
||||
SPECK_QUOTE_PLAYERS_HIRES_LARRY_SPECK_PLUGS_BIFF,
|
||||
SPECK_QUOTE_GENERIC_THANKS_FOR_HIRING_MERCS_1,
|
||||
|
||||
SPECK_QUOTE_GENERIC_THANKS_FOR_HIRING_MERCS_2, //70
|
||||
SPECK_QUOTE_PLAYER_TRIES_TO_HIRE_ALREADY_HIRED_MERC,
|
||||
SPECK_QUOTE_GOOD_BYE_1,
|
||||
SPECK_QUOTE_GOOD_BYE_2,
|
||||
SPECK_QUOTE_GOOD_BYE_3,
|
||||
SPECK_QUOTE_GOOD_BYE_TAG_PLAYER_OWES_MONEY,
|
||||
|
||||
//TODO: Madd - don't forget the sounds for these
|
||||
SPECK_QUOTE_ADVERTISE_GASTON, //76
|
||||
SPECK_QUOTE_ADVERTISE_STOGIE,
|
||||
SPECK_QUOTE_GASTON_DEAD,
|
||||
SPECK_QUOTE_STOGIE_DEAD,
|
||||
SPECK_QUOTE_PLAYER_HIRES_GASTON,
|
||||
SPECK_QUOTE_PLAYER_HIRES_STOGIE,
|
||||
|
||||
SPECK_QUOTE_RANDOM_CHIT_CHAT_1,
|
||||
SPECK_QUOTE_RANDOM_CHIT_CHAT_2,
|
||||
/*
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
|
||||
SPECK_QUOTE_, //80
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
SPECK_QUOTE_,
|
||||
*/
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,924 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "Types.h"
|
||||
#include "Store Inventory.h"
|
||||
#include "Random.h"
|
||||
#include "Weapons.h"
|
||||
#include "Debug.h"
|
||||
#include "LaptopSave.h"
|
||||
#include "ShopKeeper Interface.h"
|
||||
#endif
|
||||
|
||||
|
||||
UINT8 StoreInventory[MAXITEMS][BOBBY_RAY_LISTS]; //=
|
||||
//{
|
||||
////
|
||||
//// The first column is for Bobby Rays new inventory, BOBBY_RAY_NEW,
|
||||
//// The second column is for Bobby Rays used inventory, BOBBY_RAY_USED,
|
||||
////
|
||||
// {0, 0 }, /* nothing */
|
||||
//// MADD MARKER
|
||||
////---WEAPONS---
|
||||
// {8, 1 }, /* Glock 17 */
|
||||
// {6, 1 }, /* Glock 18 */
|
||||
// {8, 1 }, /* Beretta 92F */
|
||||
// {6, 1 }, /* Beretta 93R */
|
||||
// {8, 1 }, /* .38 S&W Special */
|
||||
// {8, 1 }, /* .357 Barracuda */
|
||||
// {6, 1 }, /* .357 DesertEagle*/
|
||||
// {7, 1 }, /* .45 M1911 */
|
||||
// {4, 1 }, /* H&K MP5K */
|
||||
// {4, 1 }, /* .45 MAC-10 */ // 10
|
||||
//
|
||||
// {4, 1 }, /* Thompson M1A1 */
|
||||
// {4, 1 }, /* Colt Commando */
|
||||
// {4, 1 }, /* H&K MP53 */
|
||||
// {4, 1 }, /* AKSU-74 */
|
||||
// {2, 1 }, /* 5.7mm FN P90 */
|
||||
// {4, 1 }, /* Type-85 */
|
||||
// {3, 1 }, /* SKS */
|
||||
// {2, 1 }, /* Dragunov */
|
||||
// {2, 1 }, /* M24 */
|
||||
// {3, 1 }, /* Steyr AUG */ //20
|
||||
//
|
||||
// {3, 1 }, /* H&K G41 */
|
||||
// {3, 1 }, /* Ruger Mini-14 */
|
||||
// {3, 1 }, /* C-7 */
|
||||
// {3, 1 }, /* FA-MAS */
|
||||
// {3, 1 }, /* AK-74 */
|
||||
// {3, 1 }, /* AKM */
|
||||
// {3, 1 }, /* M-14 */
|
||||
// {3, 1 }, /* FN-FAL */
|
||||
// {3, 1 }, /* H&K G3A3 */
|
||||
// {3, 1 }, /* H&K G11 */ // 30
|
||||
//
|
||||
// {5, 1 }, /* Remington M870 */
|
||||
// {3, 1 }, /* SPAS-15 */
|
||||
// {2, 1 }, /* CAWS */
|
||||
// {2, 1 }, /* FN Minimi */
|
||||
// {2, 1 }, /* RPK-74 */
|
||||
// {2, 1 }, /* H&K 21E */
|
||||
// {5, 0 }, /* combat knife */
|
||||
// {7, 0 }, /* throwing knife */
|
||||
// {0, 0 }, /* rock */
|
||||
// {2, 0 }, /* grenade launcher*/ // 40
|
||||
//
|
||||
// {2, 0 }, /* mortar */
|
||||
// {0, 0 }, /* another rock */
|
||||
// {0, 0 }, /* claws */
|
||||
// {0, 0 }, /* claws */
|
||||
// {0, 0 }, /* claws */
|
||||
// {0, 0 }, /* claws */
|
||||
// {0, 0 }, /* tentacles */
|
||||
// {0, 0 }, /* spit */
|
||||
// {2, 0 }, /* brass knuckles */
|
||||
// {6, 0 }, /* underslung g.l. */ // 50
|
||||
//
|
||||
// {4, 0 }, /* rocket launcher */
|
||||
// {0, 0 }, /* bloodcat claws */
|
||||
// {0, 0 }, /* bloodcat bite */
|
||||
// {2, 0 }, /* machete */
|
||||
// {1, 0 }, /* rocket rifle */
|
||||
// {0, 0 }, /* Automag III */
|
||||
// {0, 0 }, /* spit */
|
||||
// {0, 0 }, /* spit */
|
||||
// {0, 0 }, /* spit */
|
||||
// {0, 0 }, /* tank cannon */ // 60
|
||||
//
|
||||
// {2, 1 }, /* dart gun */
|
||||
// {0, 0 }, /* bloody throwing knife */
|
||||
// {0, 0 }, /* flamethrower */
|
||||
// {3, 0 }, /* Crowbar */
|
||||
// {1, 0 }, /* Auto Rocket Rifle */
|
||||
// {2, 1 }, /* barrett - nothing */
|
||||
// {2, 1 }, /* val silent - nothing */
|
||||
// {2, 1 }, /* psg - nothing */
|
||||
// {2, 1 }, /* tar 21 - nothing */
|
||||
// {0, 0 }, /* nothing */ // 70
|
||||
//
|
||||
////---AMMO---
|
||||
// {50, 0 }, /* CLIP9_15 */
|
||||
// {40, 0 }, /* CLIP9_30 */
|
||||
// {8, 0 }, /* CLIP9_15_AP */
|
||||
// {4, 0 }, /* CLIP9_30_AP */
|
||||
// {7, 0 }, /* CLIP9_15_HP */
|
||||
// {4, 0 }, /* CLIP9_30_HP */
|
||||
// {50, 0 }, /* CLIP38_6 */
|
||||
// {8, 0 }, /* CLIP38_6_AP */
|
||||
// {6, 0 }, /* CLIP38_6_HP */
|
||||
// {40, 0 }, /* CLIP45_7 */ // 80
|
||||
//
|
||||
// {25, 0 }, /* CLIP45_30 */
|
||||
// {6, 0 }, /* CLIP45_7_AP */
|
||||
// {8, 0 }, /* CLIP45_30_AP */
|
||||
// {6, 0 }, /* CLIP45_7_HP */
|
||||
// {5, 0 }, /* CLIP45_30_HP */
|
||||
// {40, 0 }, /* CLIP357_6 */
|
||||
// {20, 0 }, /* CLIP357_9 */
|
||||
// {6, 0 }, /* CLIP357_6_AP */
|
||||
// {5, 0 }, /* CLIP357_9_AP */
|
||||
// {4, 0 }, /* CLIP357_6_HP */ //90
|
||||
//
|
||||
// {4, 0 }, /* CLIP357_9_HP */
|
||||
// {25, 0 }, /* CLIP545_30_AP */
|
||||
// {5, 0 }, /* CLIP545_30_HP */
|
||||
// {15, 0 }, /* CLIP556_30_AP */
|
||||
// {5, 0 }, /* CLIP556_30_HP */
|
||||
// {15, 0 }, /* CLIP762W_10_AP */
|
||||
// {12, 0 }, /* CLIP762W_30_AP */
|
||||
// {4, 0 }, /* CLIP762W_10_HP */
|
||||
// {5, 0 }, /* CLIP762W_30_HP */
|
||||
// {10, 0 }, /* CLIP762N_5_AP */ //100
|
||||
//
|
||||
// {10, 0 }, /* CLIP762N_20_AP */
|
||||
// {5, 0 }, /* CLIP762N_5_HP */
|
||||
// {5, 0 }, /* CLIP762N_20_HP */
|
||||
// {10, 0 }, /* CLIP47_50_SAP */
|
||||
// {10, 0 }, /* CLIP57_50_AP */
|
||||
// {5, 0 }, /* CLIP57_50_HP */
|
||||
// {20, 0 }, /* CLIP12G_7 */
|
||||
// {40, 0 }, /* CLIP12G_7_BUCKSHOT */
|
||||
// {10, 0 }, /* CLIPCAWS_10_SAP */
|
||||
// {10, 0 }, /* CLIPCAWS_10_FLECH */ //110
|
||||
//
|
||||
// {5, 0 }, /* CLIPROCKET_AP */
|
||||
// {5, 0 }, /* CLIPROCKET_HE */
|
||||
// {5, 0 }, /* CLIPROCKET_HEAT */
|
||||
// {20, 0 }, /* sleep dart */
|
||||
// {0, 0 }, /* Clip Flame */
|
||||
// {6, 0 }, /* CLIP50_11 */
|
||||
// {5, 0 }, /* CLIP9H_20 */ //120
|
||||
// {8, 0 }, /* CLIP9_50 */
|
||||
// {4, 0 }, /* CLIP9_50_AP */
|
||||
// {4, 0 }, /* CLIP9_50_HP */
|
||||
//
|
||||
// {2, 0 }, /* DRUM545_75_AP */
|
||||
// {1, 0 }, /* DRUM545_75_HP */
|
||||
// {2, 0 }, /* BELT556_200_AP */
|
||||
// {1, 0 }, /* BELT556_200_HP */
|
||||
// {2, 0 }, /* BELT762N_100_AP */
|
||||
// {1, 0 }, /* BELT762N_100_HP */
|
||||
// {10, 0 }, /* CLIP57_20_AP */
|
||||
// {5, 0 }, /* CLIP57_20_HP */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */ //130
|
||||
//
|
||||
////---EXPLOSIVES---
|
||||
// {7, 0 }, /* stun grenade */
|
||||
// {7, 0 }, /* tear gas grenade */
|
||||
// {5, 0 }, /* mustard gas grenade*/
|
||||
// {7, 0 }, /* mini hand grenade */
|
||||
// {6, 0 }, /* reg hand grenade */
|
||||
// {0, 0 }, /* RDX */
|
||||
// {6, 0 }, /* TNT (="explosives")*/
|
||||
// {0, 0 }, /* HMX (=RDX+TNT) */
|
||||
// {0, 0 }, /* C1 (=RDX+min oil) */
|
||||
// {6, 0 }, /* mortar shell */ //140
|
||||
//
|
||||
// {0, 0 }, /* mine */
|
||||
// {2, 0 }, /* C4 ("plastique") */
|
||||
// {0, 0 }, /* trip flare */
|
||||
// {0, 0 }, /* trip klaxon */
|
||||
// {4, 0 }, /* shaped charge */
|
||||
// {4, 0 }, /* break light */
|
||||
// {5, 0 }, /* 40mm HE grenade */
|
||||
// {5, 0 }, /* 40mm gas grenade */
|
||||
// {5, 0 }, /* 40mm stun grenade */
|
||||
// {5, 0 }, /* 40mm smoke grenade */ //150
|
||||
//
|
||||
// {7, 0 }, /* smoke hand grenade */
|
||||
// {0, 0 }, /* tank shell */
|
||||
// {0, 0 }, /* structure ignite */
|
||||
// {0, 0 }, /* creature cocktail */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */ //160
|
||||
//
|
||||
////---ARMOUR---
|
||||
// {2, 1 }, /* Flak jacket */
|
||||
// {0, 0 }, /* Flak jacket w X */
|
||||
// {0, 0 }, /* Flak jacket w Y */
|
||||
// {1, 1 }, /* Kevlar vest */
|
||||
// {0, 0 }, /* Kevlar vest w X */
|
||||
// {0, 0 }, /* Kevlar vest w Y */
|
||||
// {1, 1 }, /* Spectra vest */
|
||||
// {0, 0 }, /* Spectra vest w X*/
|
||||
// {0, 0 }, /* Spectra vest w Y*/
|
||||
// {1, 1 }, /* Kevlar leggings */ //170
|
||||
//
|
||||
// {0, 0 }, /* Kevlar legs w X */
|
||||
// {0, 0 }, /* Kevlar legs w Y */
|
||||
// {1, 1 }, /* Spectra leggings*/
|
||||
// {0, 0 }, /* Spectra legs w X*/
|
||||
// {0, 0 }, /* Spectra legs w Y*/
|
||||
// {3, 1 }, /* Steel helmet */
|
||||
// {1, 1 }, /* Kevlar helmet */
|
||||
// {0, 0 }, /* Kevlar helm w X */
|
||||
// {0, 0 }, /* Kevlar helm w Y */
|
||||
// {1, 1 }, /* Spectra helmet */ //180
|
||||
//
|
||||
// {0, 0 }, /* Spectra helm w X*/
|
||||
// {0, 0 }, /* Spectra helm w Y*/
|
||||
// {0, 0 }, /* Ceramic plates */
|
||||
// {0, 0 }, /* hide */
|
||||
// {0, 0 }, /* hide */
|
||||
// {0, 0 }, /* hide */
|
||||
// {0, 0 }, /* hide */
|
||||
// {1, 0 }, /* Leather jacket */
|
||||
// {1, 0 }, /* Leather jacket w kevlar */
|
||||
// {0, 0 }, /* Leather jacket w kevlar 18 */ //190
|
||||
//
|
||||
// {1, 0 }, /* Leather jacket w kevlar Y */
|
||||
// {0, 0 }, /* hide */
|
||||
// {0, 0 }, /* hide */
|
||||
// {0, 0 }, /* T-shirt (Arulco) */
|
||||
// {0, 0 }, /* T-shirt (Deidranna) */
|
||||
// {1, 1 }, /* Kevlar 2 Vest */
|
||||
// {0, 0 }, /* Kevlar 2 Vest w 18 */
|
||||
// {0, 0 }, /* Kevlar 2 Vest w Y */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */ //200
|
||||
//
|
||||
////---MISC---
|
||||
// {8, 0 }, /* First aid kit */
|
||||
// {6, 0 }, /* Medical Kit */
|
||||
// {4, 1 }, /* Tool Kit */
|
||||
// {3, 1 }, /* Locksmith kit */
|
||||
// {4, 0 }, /* Camouflage kit*/
|
||||
// {0, 0 }, /* nothing */ // Boobytrap kit - unused
|
||||
// {6, 1 }, /* Silencer */
|
||||
// {6, 1 }, /* Sniper scope */
|
||||
// {6, 1 }, /* Bipod */
|
||||
// {6, 1 }, /* Extended ear */ // 210
|
||||
//
|
||||
// {6, 1 }, /* Night goggles */
|
||||
// {8, 0 }, /* Sun goggles */
|
||||
// {6, 1 }, /* Gas mask */
|
||||
// {10, 0 }, /* Canteen */
|
||||
// {2, 0 }, /* Metal detector*/
|
||||
// {6, 0 }, /* Compound 18 */
|
||||
// {0, 0 }, /* Jar w/Queen Blood */
|
||||
// {0, 0 }, /* Jar w/Elixir */
|
||||
// {0, 0 }, /* Money */
|
||||
// {0, 0 }, /* Glass jar */ //220
|
||||
//
|
||||
// {0, 0 }, /* Jar w/Creature Blood */
|
||||
// {0, 0 }, /* Adrenaline Booster */
|
||||
// {6, 0 }, /* Detonator */
|
||||
// {6, 0 }, /* Rem Detonator */
|
||||
// {0, 0 }, /* VideoTape */
|
||||
// {0, 0 }, /* Deed */
|
||||
// {0, 0 }, /* Letter */
|
||||
// {0, 0 }, /* Terrorist Info */
|
||||
// {0, 0 }, /* Chalice */
|
||||
// {0, 0 }, /* Mission4 */ //230
|
||||
//
|
||||
// {0, 0 }, /* Mission5 */
|
||||
// {0, 0 }, /* Mission6 */
|
||||
// {0, 0 }, /* Switch */
|
||||
// {0, 0 }, /* Action Item */
|
||||
// {0, 0 }, /* Syringe2 */
|
||||
// {0, 0 }, /* Syringe3 */
|
||||
// {0, 0 }, /* Syringe4 */
|
||||
// {0, 0 }, /* Syringe5 */
|
||||
// {0, 0 }, /* Jar w/Human blood */
|
||||
// {0, 0 }, /* Ownership item */ //240
|
||||
//
|
||||
// {6, 1 }, /* Laser scope */
|
||||
// {6, 0 }, /* Remote trigger*/
|
||||
// {3, 0 }, /* Wirecutters */ //243
|
||||
// {3, 0 }, /* Duckbill */
|
||||
// {0, 0 }, /* Alcohol */
|
||||
// {1, 1 }, /* UV Goggles */
|
||||
// {0, 0 }, /* Discarded LAW */
|
||||
// {0, 0 }, /* head - generic */
|
||||
// {0, 0 }, /* head - Imposter*/
|
||||
// {0, 0 }, /* head - T-Rex */ // 250
|
||||
//
|
||||
// {0, 0 }, /* head - Slay */
|
||||
// {0, 0 }, /* head - Druggist */
|
||||
// {0, 0 }, /* head - Matron */
|
||||
// {0, 0 }, /* head - Tiffany */
|
||||
// {0, 0 }, /* wine */
|
||||
// {0, 0 }, /* beer */
|
||||
// {0, 0 }, /* pornos */
|
||||
// {0, 0 }, /* video camera */
|
||||
// {0, 0 }, /* robot remote control */
|
||||
// {0, 0 }, /* creature claws */ // 260
|
||||
//
|
||||
// {0, 0 }, /* creature flesh */
|
||||
// {0, 0 }, /* creature organ */
|
||||
// {0, 0 }, /* remote trigger */
|
||||
// {0, 0 }, /* gold watch */
|
||||
// {0, 0 }, /* golf clubs */
|
||||
// {0, 0 }, /* walkman */
|
||||
// {0, 0 }, /* portable TV */
|
||||
// {0, 0 }, /* Money for player's account */
|
||||
// {0, 0 }, /* cigars */
|
||||
// {0, 0 }, /* nothing */ // 270
|
||||
//
|
||||
// {0, 0 }, /* key */ // 271
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
//
|
||||
// {6, 1 }, /* flash suppressor */ // 281
|
||||
// {2, 1 }, /* rpg 7 */
|
||||
// {4, 0 }, /* RPG_HE_ROCKET */
|
||||
// {4, 0 }, /* RPG_AP_ROCKET */
|
||||
// {4, 0 }, /* RPG_FRAG_ROCKET */
|
||||
// {6, 1 }, /* reflex_scoped */
|
||||
// {6, 1 }, /* reflex_unscoped */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
//
|
||||
// {0, 0 }, /* key */ // 291
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* key */
|
||||
//
|
||||
// {0, 0 }, /* key */ // 301
|
||||
// {0, 0 }, /* key */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
//
|
||||
// {0, 0 }, /* nothing */ // 311
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
//
|
||||
// {0, 0 }, /* nothing */ // 321
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {3, 1 }, /* m900 */
|
||||
// {6, 1 }, /* m950 */
|
||||
// {3, 1 }, /* m960a - 330 */
|
||||
//
|
||||
// {4, 1 }, /* micro uzi - 331 */
|
||||
// {2, 1 }, /* enfield */
|
||||
// {5, 1 }, /* MP5 */
|
||||
// {3, 1 }, /* mp5sd */
|
||||
// {2, 1 }, /* mp5n */
|
||||
// {3, 1 }, /* ump45 */
|
||||
// {4, 1 }, /* five7 */
|
||||
// {6, 1 }, /* p7m8 */
|
||||
// {5, 1 }, /* g36k */
|
||||
// {4, 1 }, /* g36c */
|
||||
//
|
||||
// {2, 1 }, /* MSG */ // 341
|
||||
// {3, 1 }, /* Bennelli */
|
||||
// {3, 1 }, /* AK103 */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
// {0, 0 }, /* nothing */
|
||||
//
|
||||
//};
|
||||
|
||||
|
||||
//MADD MARKER
|
||||
INT16 WeaponROF[ MAXITEMS ];//=
|
||||
//{
|
||||
// 0, /* Nothing */
|
||||
//
|
||||
// 40, /* Glock 17 */
|
||||
// 1300, /* Glock 18 */
|
||||
// 45, /* Beretta 92F */
|
||||
// 1100, /* Beretta 93R */
|
||||
// 25, /* .38 S&W Special */
|
||||
// 23, /* .357 Barracuda */
|
||||
// 27, /* .357 DesertEagle*/
|
||||
// 35, /* .45 M1911 */
|
||||
// 900, /* H&K MP5K */
|
||||
// 1090, /* .45 MAC-10 */ // 10
|
||||
//
|
||||
// 700, /* Thompson M1A1 */
|
||||
// 900, /* Colt Commando */
|
||||
// 800, /* H&K MP53 */
|
||||
// 900, /* AKSU-74 */
|
||||
// 900, /* 5.7mm FN P90 */
|
||||
// 780, /* Type-85 */
|
||||
// 40, /* SKS */
|
||||
// 20, /* Dragunov */
|
||||
// 20, /* M24 */
|
||||
// 650, /* Steyr AUG */ //20
|
||||
//
|
||||
// 850, /* H&K G41 */
|
||||
// 750, /* Ruger Mini-14 */
|
||||
// 600, /* C-7 */
|
||||
// 900, /* FA-MAS */
|
||||
// 650, /* AK-74 */
|
||||
// 600, /* AKM */
|
||||
// 750, /* M-14 */
|
||||
// 650, /* FN-FAL */
|
||||
// 500, /* H&K G3A3 */
|
||||
// 600, /* H&K G11 */ // 30
|
||||
//
|
||||
// 21, /* Remington M870 */
|
||||
// 30, /* SPAS-15 */
|
||||
// -1, /* CAWS */
|
||||
// 750, /* FN Minimi */
|
||||
// 800, /* RPK-74 */
|
||||
// 800, /* H&K 21E */
|
||||
// 0, /* combat knife */
|
||||
// 0, /* throwing knife */
|
||||
// 0, /* rock */
|
||||
// 1, /* grenade launcher */ // 40
|
||||
//
|
||||
// 1, /* mortar */
|
||||
// 0, /* another rock */
|
||||
// 0, /* claws */
|
||||
// 0, /* claws */
|
||||
// 0, /* claws */
|
||||
// 0, /* claws */
|
||||
// 0, /* tentacles */
|
||||
// 0, /* spit */
|
||||
// 0, /* brass knuckles */
|
||||
// 1, /* underslung g.l. */ // 50
|
||||
//
|
||||
// 1, /* rocket launcher */
|
||||
// 0, /* nothing */
|
||||
// 0, /* nothing */
|
||||
// 0, /* machete */
|
||||
// 1, /* rocket rifle */
|
||||
// 666, /* Automag III */
|
||||
// 0, /* spit */
|
||||
// 0, /* spit */
|
||||
// 0, /* spit */
|
||||
// 1, /* tank cannon */
|
||||
// 1, /* dart gun */
|
||||
//
|
||||
//0, // BLOODY_THROWING_KNIFE,
|
||||
//1, // FLAMETHROWER,
|
||||
//0, // CROWBAR,
|
||||
//1, // AUTO_ROCKET_RIFLE, //65
|
||||
//
|
||||
//20, // BARRETT, //previously unused
|
||||
//25, // VAL_SILENT, //previously unused
|
||||
//22,// PSG, //previously unused
|
||||
//900, // TAR21, //previously unused
|
||||
//
|
||||
// 0, // Max_weapons 70
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 80
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 90
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 100
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 110
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 120
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 130
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 140
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 150
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 160
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 170
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 180
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 190
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 200
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 210
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 220
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 230
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 240
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 250
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 260
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 270
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 280
|
||||
// 0, // nothing
|
||||
// 1, // rpg 7
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 290
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 300
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 310
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 320
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 1300, /* m900 */
|
||||
// 600, /* m950 */
|
||||
// 600, /* m960a - 330 */
|
||||
// 800, /* micro uzi */
|
||||
// 600, /* enfield */
|
||||
// 800, // mp5
|
||||
// 800, // mp5sd
|
||||
// 900, // mp5n
|
||||
// 800, // ump45
|
||||
// 45, // five7
|
||||
// 50, // p7m8
|
||||
// 750, // G36k
|
||||
// 750, // G36c 340
|
||||
// 2, // MSG90A1
|
||||
// 35, // bennelli
|
||||
// 600, // ak103
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing
|
||||
// 0, // nothing 350
|
||||
//};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// SetupStoreInventory sets up the initial quantity on hand for all of Bobby Ray's inventory items
|
||||
void SetupStoreInventory( STORE_INVENTORY *pInventoryArray, BOOLEAN fUsed )
|
||||
{
|
||||
UINT16 i;
|
||||
UINT16 usItemIndex;
|
||||
UINT8 ubNumBought;
|
||||
|
||||
//loop through all items BR can stock to init a starting quantity on hand
|
||||
for(i = 0; i < LaptopSaveInfo.usInventoryListLength[fUsed]; i++)
|
||||
{
|
||||
usItemIndex = pInventoryArray[ i ].usItemIndex;
|
||||
Assert(usItemIndex < MAXITEMS);
|
||||
|
||||
ubNumBought = DetermineInitialInvItems( -1, usItemIndex, StoreInventory[ usItemIndex ][ fUsed ], fUsed);
|
||||
if ( ubNumBought > 0)
|
||||
{
|
||||
// If doing used items
|
||||
if( fUsed )
|
||||
{
|
||||
// then there should only be 1 of them, and it's damaged
|
||||
pInventoryArray[i].ubQtyOnHand = 1;
|
||||
pInventoryArray[i].ubItemQuality = 20 + (UINT8) Random( 60 );
|
||||
}
|
||||
else // new
|
||||
{
|
||||
// Madd
|
||||
pInventoryArray[i].ubQtyOnHand = ubNumBought * gGameOptions.ubBobbyRay;
|
||||
pInventoryArray[i].ubItemQuality = 100;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// doesn't sell / not in stock
|
||||
pInventoryArray[i].ubQtyOnHand = 0;
|
||||
pInventoryArray[i].ubItemQuality = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DoesGunOfSameClassExistInInventory( UINT8 ubItemIndex, UINT8 ubDealerID )
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
STORE_INVENTORY *pInventoryArray;
|
||||
|
||||
pInventoryArray = GetPtrToStoreInventory( ubDealerID );
|
||||
if( pInventoryArray == NULL )
|
||||
return( FALSE );
|
||||
|
||||
|
||||
//go through all of the guns
|
||||
for(i=0; i<MAXITEMS; i++)
|
||||
{
|
||||
if ( Item[i].usItemClass == 0 )
|
||||
break;
|
||||
//if it's the class we are looking for
|
||||
if( Weapon[ i ].ubWeaponClass == ubItemIndex )
|
||||
{
|
||||
// and it's a sufficiently cool gun to be counted as good
|
||||
if (Item[ i ].ubCoolness >= 4)
|
||||
{
|
||||
//if there is already a qty on hand, then we found a match
|
||||
if( pInventoryArray[ i ].ubQtyOnHand )
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
STORE_INVENTORY *GetPtrToStoreInventory( UINT8 ubDealerID )
|
||||
{
|
||||
if( ubDealerID >= BOBBY_RAY_LISTS )
|
||||
return( NULL );
|
||||
|
||||
|
||||
if( ubDealerID == BOBBY_RAY_NEW )
|
||||
return( LaptopSaveInfo.BobbyRayInventory );
|
||||
else if( ubDealerID == BOBBY_RAY_USED )
|
||||
return( LaptopSaveInfo.BobbyRayUsedInventory );
|
||||
else
|
||||
Assert( 0 );
|
||||
// else
|
||||
// return( gArmsDealersInventory[ ubDealerID - TONYS_ITEMS ] );
|
||||
|
||||
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
INT16 CountNumberOfItemsInStoreInventory( UINT8 ubArmsDealerID )
|
||||
{
|
||||
UINT16 cnt;
|
||||
INT16 ubNumItems=0;
|
||||
|
||||
STORE_INVENTORY *pInventoryArray;
|
||||
|
||||
pInventoryArray = GetPtrToStoreInventory( ubArmsDealerID );
|
||||
if( pInventoryArray == NULL )
|
||||
return( -1 );
|
||||
|
||||
|
||||
for( cnt=0; cnt<MAXITEMS; cnt++ )
|
||||
{
|
||||
if( pInventoryArray[cnt].ubQtyOnHand > 0 )
|
||||
ubNumItems++;
|
||||
}
|
||||
|
||||
return( ubNumItems );
|
||||
}
|
||||
*/
|
||||
////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef __STORE_INVENTORY_H_
|
||||
#define __STORE_INVENTORY_H_
|
||||
|
||||
#include "Items.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT16 usItemIndex; //Index into the item table
|
||||
UINT8 ubQtyOnHand;
|
||||
UINT8 ubQtyOnOrder; //The number of items on order
|
||||
UINT8 ubItemQuality; // the % damaged listed from 0 to 100
|
||||
BOOLEAN fPreviouslyEligible; // whether or not dealer has been eligible to sell this item in days prior to today
|
||||
|
||||
UINT8 filler;
|
||||
|
||||
} STORE_INVENTORY;
|
||||
|
||||
|
||||
//Enums used for the access the MAX dealers array
|
||||
enum
|
||||
{
|
||||
BOBBY_RAY_NEW,
|
||||
BOBBY_RAY_USED,
|
||||
|
||||
BOBBY_RAY_LISTS,
|
||||
};
|
||||
|
||||
extern UINT8 StoreInventory[MAXITEMS][BOBBY_RAY_LISTS];
|
||||
extern INT16 WeaponROF[ MAXITEMS ];
|
||||
|
||||
|
||||
|
||||
void SetupStoreInventory( STORE_INVENTORY *pInventoryArray, BOOLEAN fUsed );
|
||||
BOOLEAN DoesGunOfSameClassExistInInventory( UINT8 ubItemIndex, UINT8 ubDealerID );
|
||||
STORE_INVENTORY *GetPtrToStoreInventory( UINT8 ubDealerID );
|
||||
//INT16 CountNumberOfItemsInStoreInventory( UINT8 ubArmsDealerID );
|
||||
|
||||
#endif
|
||||
+1262
File diff suppressed because it is too large
Load Diff
+105
@@ -0,0 +1,105 @@
|
||||
#ifndef __AIM_H
|
||||
#define __AIM_H
|
||||
|
||||
#include "Cursors.h"
|
||||
|
||||
|
||||
//
|
||||
// AIM defines
|
||||
//
|
||||
|
||||
|
||||
#define AIMHISTORYFILE "BINARYDATA\\AimHist.edt"
|
||||
#define AIM_HISTORY_LINE_SIZE 400 * 2
|
||||
|
||||
#define MAX_NUMBER_MERCS 40
|
||||
extern UINT8 AimMercArray[ MAX_NUMBER_MERCS ];
|
||||
|
||||
#define NUM_AIM_SCREENS 6
|
||||
|
||||
#define IMAGE_OFFSET_X LAPTOP_SCREEN_UL_X
|
||||
#define IMAGE_OFFSET_Y LAPTOP_SCREEN_WEB_UL_Y
|
||||
|
||||
#define AIM_LOGO_TEXT_X iScreenWidthOffset + 175
|
||||
#define AIM_LOGO_TEXT_Y iScreenHeightOffset + 101
|
||||
#define AIM_LOGO_TEXT_WIDTH 360
|
||||
|
||||
// Aim Symbol 203, 51
|
||||
#define AIM_SYMBOL_SIZE_X 203
|
||||
#define AIM_SYMBOL_SIZE_Y 51
|
||||
|
||||
//262, 28
|
||||
#define AIM_SYMBOL_X IMAGE_OFFSET_X + 149
|
||||
#define AIM_SYMBOL_Y IMAGE_OFFSET_Y + 3
|
||||
#define AIM_SYMBOL_WIDTH 203
|
||||
#define AIM_SYMBOL_HEIGHT 51
|
||||
|
||||
// RustBackGround
|
||||
#define RUSTBACKGROUND_SIZE_X 125
|
||||
#define RUSTBACKGROUND_SIZE_Y 100
|
||||
|
||||
#define RUSTBACKGROUND_1_X IMAGE_OFFSET_X
|
||||
#define RUSTBACKGROUND_1_Y IMAGE_OFFSET_Y
|
||||
|
||||
//Bottom Buttons
|
||||
#define NUM_AIM_BOTTOMBUTTONS 6
|
||||
#define BOTTOM_BUTTON_START_WIDTH 75
|
||||
#define BOTTOM_BUTTON_START_HEIGHT 18
|
||||
#define BOTTOM_BUTTON_START_X LAPTOP_SCREEN_UL_X + 25
|
||||
|
||||
#define BOTTOM_BUTTON_START_Y LAPTOP_SCREEN_WEB_LR_Y - BOTTOM_BUTTON_START_HEIGHT - 57
|
||||
#define BOTTOM_BUTTON_AMOUNT NUM_AIM_SCREENS
|
||||
#define BOTTOM_BUTTON_GAP 0
|
||||
#define BOTTOM_BUTTON_TEXT_Y BOTTOM_BUTTON_START_Y + 6
|
||||
#define BOTTOM_BUTTON_END_X BOTTOM_BUTTON_START_X + BOTTOM_BUTTON_START_WIDTH * 6
|
||||
#define BOTTOM_BUTTON_END_Y BOTTOM_BUTTON_START_Y + BOTTOM_BUTTON_START_HEIGHT
|
||||
|
||||
#define AIM_FONT10ROMAN FONT10ROMAN
|
||||
#define AIM_FONT12ROMAN FONT12ROMAN
|
||||
#define AIM_FONT14SANSERIF FONT14SANSERIF
|
||||
#define AIM_LOGO_FONT FONT10ARIAL
|
||||
#define AIM_COPYRIGHT_FONT FONT10ARIAL
|
||||
#define AIM_WARNING_FONT FONT12ARIAL
|
||||
#define AIM_FONT12ARIAL FONT12ARIAL
|
||||
#define AIM_FONT_MCOLOR_WHITE FONT_MCOLOR_WHITE
|
||||
#define IM_FONT_MCOLOR_DKRED FONT_MCOLOR_RED
|
||||
#define AIM_GREEN 157
|
||||
#define AIM_MAINTITLE_COLOR AIM_GREEN
|
||||
#define AIM_MAINTITLE_FONT FONT14ARIAL
|
||||
#define AIM_BUTTON_ON_COLOR FONT_MCOLOR_DKWHITE
|
||||
#define AIM_BUTTON_OFF_COLOR 138
|
||||
#define AIM_BUTTON_DISABLED_COLOR 141
|
||||
#define AIM_CONTENTBUTTON_WIDTH 205
|
||||
#define AIM_CONTENTBUTTON_HEIGHT 19
|
||||
#define AIM_FONT_GOLD 170
|
||||
|
||||
enum
|
||||
{
|
||||
AIM_SLOGAN,
|
||||
AIM_WARNING_1,
|
||||
AIM_WARNING_2,
|
||||
AIM_COPYRIGHT_1,
|
||||
AIM_COPYRIGHT_2,
|
||||
AIM_COPYRIGHT_3
|
||||
};
|
||||
|
||||
void GameInitAIM();
|
||||
BOOLEAN EnterAIM();
|
||||
void ExitAIM();
|
||||
void HandleAIM();
|
||||
void RenderAIM();
|
||||
|
||||
BOOLEAN ExitAimMenuBar(void);
|
||||
BOOLEAN InitAimMenuBar(void);
|
||||
|
||||
BOOLEAN RemoveAimDefaults();
|
||||
BOOLEAN InitAimDefaults();
|
||||
BOOLEAN DrawAimDefaults();
|
||||
|
||||
BOOLEAN DisplayAimSlogan();
|
||||
BOOLEAN DisplayAimCopyright();
|
||||
|
||||
void ResetAimButtons(UINT32 *Buttons, UINT16 uNumberOfButtons);
|
||||
void DisableAimButton();
|
||||
|
||||
#endif
|
||||
+5171
File diff suppressed because it is too large
Load Diff
+302
@@ -0,0 +1,302 @@
|
||||
#ifndef __EMAIL_H
|
||||
#define __EMAIL_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// defines
|
||||
#define MAX_EMAIL_LINES 10 //max number of lines can be shown in a message
|
||||
#define MAX_MESSAGES_PAGE 18 // max number of messages per page
|
||||
|
||||
|
||||
#define IMP_EMAIL_INTRO 0
|
||||
#define IMP_EMAIL_INTRO_LENGTH 10
|
||||
#define ENRICO_CONGRATS (IMP_EMAIL_INTRO + IMP_EMAIL_INTRO_LENGTH)
|
||||
#define ENRICO_CONGRATS_LENGTH 3
|
||||
#define IMP_EMAIL_AGAIN (ENRICO_CONGRATS + ENRICO_CONGRATS_LENGTH)
|
||||
#define IMP_EMAIL_AGAIN_LENGTH 6
|
||||
#define MERC_INTRO (IMP_EMAIL_AGAIN + IMP_EMAIL_AGAIN_LENGTH)
|
||||
#define MERC_INTRO_LENGTH 5
|
||||
#define MERC_NEW_SITE_ADDRESS ( MERC_INTRO + MERC_INTRO_LENGTH )
|
||||
#define MERC_NEW_SITE_ADDRESS_LENGTH 2
|
||||
#define AIM_MEDICAL_DEPOSIT_REFUND ( MERC_NEW_SITE_ADDRESS + MERC_NEW_SITE_ADDRESS_LENGTH )
|
||||
#define AIM_MEDICAL_DEPOSIT_REFUND_LENGTH 3
|
||||
#define IMP_EMAIL_PROFILE_RESULTS ( AIM_MEDICAL_DEPOSIT_REFUND + AIM_MEDICAL_DEPOSIT_REFUND_LENGTH )
|
||||
#define IMP_EMAIL_PROFILE_RESULTS_LENGTH 1
|
||||
#define MERC_WARNING ( IMP_EMAIL_PROFILE_RESULTS_LENGTH + IMP_EMAIL_PROFILE_RESULTS )
|
||||
#define MERC_WARNING_LENGTH 2
|
||||
#define MERC_INVALID ( MERC_WARNING + MERC_WARNING_LENGTH )
|
||||
#define MERC_INVALID_LENGTH 2
|
||||
#define NEW_MERCS_AT_MERC ( MERC_INVALID + MERC_INVALID_LENGTH )
|
||||
#define NEW_MERCS_AT_MERC_LENGTH 2
|
||||
#define MERC_FIRST_WARNING ( NEW_MERCS_AT_MERC + NEW_MERCS_AT_MERC_LENGTH )
|
||||
#define MERC_FIRST_WARNING_LENGTH 2
|
||||
// merc up a level emails
|
||||
#define MERC_UP_LEVEL_BIFF ( MERC_FIRST_WARNING + MERC_FIRST_WARNING_LENGTH )
|
||||
#define MERC_UP_LEVEL_LENGTH_BIFF 2
|
||||
#define MERC_UP_LEVEL_HAYWIRE ( MERC_UP_LEVEL_LENGTH_BIFF + MERC_UP_LEVEL_BIFF )
|
||||
#define MERC_UP_LEVEL_LENGTH_HAYWIRE 2
|
||||
#define MERC_UP_LEVEL_GASKET ( MERC_UP_LEVEL_LENGTH_HAYWIRE + MERC_UP_LEVEL_HAYWIRE )
|
||||
#define MERC_UP_LEVEL_LENGTH_GASKET 2
|
||||
#define MERC_UP_LEVEL_RAZOR ( MERC_UP_LEVEL_LENGTH_GASKET + MERC_UP_LEVEL_GASKET )
|
||||
#define MERC_UP_LEVEL_LENGTH_RAZOR 2
|
||||
#define MERC_UP_LEVEL_FLO ( MERC_UP_LEVEL_LENGTH_RAZOR + MERC_UP_LEVEL_RAZOR )
|
||||
#define MERC_UP_LEVEL_LENGTH_FLO 2
|
||||
#define MERC_UP_LEVEL_GUMPY ( MERC_UP_LEVEL_LENGTH_FLO + MERC_UP_LEVEL_FLO )
|
||||
#define MERC_UP_LEVEL_LENGTH_GUMPY 2
|
||||
#define MERC_UP_LEVEL_LARRY ( MERC_UP_LEVEL_LENGTH_GUMPY + MERC_UP_LEVEL_GUMPY )
|
||||
#define MERC_UP_LEVEL_LENGTH_LARRY 2
|
||||
#define MERC_UP_LEVEL_COUGAR ( MERC_UP_LEVEL_LENGTH_LARRY + MERC_UP_LEVEL_LARRY )
|
||||
#define MERC_UP_LEVEL_LENGTH_COUGAR 2
|
||||
#define MERC_UP_LEVEL_NUMB ( MERC_UP_LEVEL_LENGTH_COUGAR + MERC_UP_LEVEL_COUGAR )
|
||||
#define MERC_UP_LEVEL_LENGTH_NUMB 2
|
||||
#define MERC_UP_LEVEL_BUBBA ( MERC_UP_LEVEL_LENGTH_NUMB + MERC_UP_LEVEL_NUMB )
|
||||
#define MERC_UP_LEVEL_LENGTH_BUBBA 2
|
||||
// merc left-me-a-message-and-now-I'm-back emails
|
||||
#define AIM_REPLY_BARRY ( MERC_UP_LEVEL_LENGTH_BUBBA + MERC_UP_LEVEL_BUBBA )
|
||||
#define AIM_REPLY_LENGTH_BARRY 2
|
||||
#define AIM_REPLY_MELTDOWN (AIM_REPLY_BARRY + ( 39 * AIM_REPLY_LENGTH_BARRY ))
|
||||
#define AIM_REPLY_LENGTH_MELTDOWN AIM_REPLY_LENGTH_BARRY
|
||||
|
||||
// old EXISTING emails when player starts game. They must look "read"
|
||||
#define OLD_ENRICO_1 ( AIM_REPLY_LENGTH_MELTDOWN + AIM_REPLY_MELTDOWN )
|
||||
#define OLD_ENRICO_1_LENGTH 3
|
||||
#define OLD_ENRICO_2 ( OLD_ENRICO_1 + OLD_ENRICO_1_LENGTH )
|
||||
#define OLD_ENRICO_2_LENGTH 3
|
||||
#define RIS_REPORT ( OLD_ENRICO_2 + OLD_ENRICO_2_LENGTH )
|
||||
#define RIS_REPORT_LENGTH 2
|
||||
#define OLD_ENRICO_3 ( RIS_REPORT + RIS_REPORT_LENGTH )
|
||||
#define OLD_ENRICO_3_LENGTH 3
|
||||
|
||||
// emails that occur from Enrico once player accomplishes things
|
||||
#define ENRICO_MIGUEL ( OLD_ENRICO_3 + OLD_ENRICO_3_LENGTH )
|
||||
#define ENRICO_MIGUEL_LENGTH 3
|
||||
#define ENRICO_PROG_20 ( ENRICO_MIGUEL + ENRICO_MIGUEL_LENGTH )
|
||||
#define ENRICO_PROG_20_LENGTH 3
|
||||
#define ENRICO_PROG_55 ( ENRICO_PROG_20 + ENRICO_PROG_20_LENGTH )
|
||||
#define ENRICO_PROG_55_LENGTH 3
|
||||
#define ENRICO_PROG_80 ( ENRICO_PROG_55 + ENRICO_PROG_55_LENGTH )
|
||||
#define ENRICO_PROG_80_LENGTH 3
|
||||
#define ENRICO_SETBACK ( ENRICO_PROG_80 + ENRICO_PROG_80_LENGTH )
|
||||
#define ENRICO_SETBACK_LENGTH 3
|
||||
#define ENRICO_SETBACK_2 ( ENRICO_SETBACK + ENRICO_SETBACK_LENGTH )
|
||||
#define ENRICO_SETBACK_2_LENGTH 3
|
||||
#define ENRICO_CREATURES ( ENRICO_SETBACK_2 + ENRICO_SETBACK_2_LENGTH )
|
||||
#define ENRICO_CREATURES_LENGTH 3
|
||||
|
||||
// insurance company emails
|
||||
#define INSUR_PAYMENT ( ENRICO_CREATURES + ENRICO_CREATURES_LENGTH )
|
||||
#define INSUR_PAYMENT_LENGTH 3
|
||||
#define INSUR_SUSPIC ( INSUR_PAYMENT + INSUR_PAYMENT_LENGTH )
|
||||
#define INSUR_SUSPIC_LENGTH 3
|
||||
#define INSUR_INVEST_OVER ( INSUR_SUSPIC + INSUR_SUSPIC_LENGTH )
|
||||
#define INSUR_INVEST_OVER_LENGTH 3
|
||||
#define INSUR_SUSPIC_2 ( INSUR_INVEST_OVER + INSUR_INVEST_OVER_LENGTH )
|
||||
#define INSUR_SUSPIC_2_LENGTH 3
|
||||
|
||||
#define BOBBYR_NOW_OPEN ( INSUR_SUSPIC_2 + INSUR_SUSPIC_2_LENGTH )
|
||||
#define BOBBYR_NOW_OPEN_LENGTH 3
|
||||
|
||||
#define KING_PIN_LETTER ( BOBBYR_NOW_OPEN + BOBBYR_NOW_OPEN_LENGTH )
|
||||
#define KING_PIN_LETTER_LENGTH 4
|
||||
|
||||
#define LACK_PLAYER_PROGRESS_1 ( KING_PIN_LETTER + KING_PIN_LETTER_LENGTH )
|
||||
#define LACK_PLAYER_PROGRESS_1_LENGTH 3
|
||||
|
||||
#define LACK_PLAYER_PROGRESS_2 ( LACK_PLAYER_PROGRESS_1 + LACK_PLAYER_PROGRESS_1_LENGTH )
|
||||
#define LACK_PLAYER_PROGRESS_2_LENGTH 3
|
||||
|
||||
#define LACK_PLAYER_PROGRESS_3 ( LACK_PLAYER_PROGRESS_2 + LACK_PLAYER_PROGRESS_2_LENGTH )
|
||||
#define LACK_PLAYER_PROGRESS_3_LENGTH 3
|
||||
|
||||
//A package from bobby r has arrived in Drassen
|
||||
#define BOBBYR_SHIPMENT_ARRIVED ( LACK_PLAYER_PROGRESS_3 + LACK_PLAYER_PROGRESS_3_LENGTH )
|
||||
#define BOBBYR_SHIPMENT_ARRIVED_LENGTH 4
|
||||
|
||||
// John Kulba has left the gifts for theplayers in drassen
|
||||
#define JOHN_KULBA_GIFT_IN_DRASSEN ( BOBBYR_SHIPMENT_ARRIVED + BOBBYR_SHIPMENT_ARRIVED_LENGTH )
|
||||
#define JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH 4
|
||||
|
||||
//when a merc dies on ANOTHER assignment ( ie not with the player )
|
||||
#define MERC_DIED_ON_OTHER_ASSIGNMENT ( JOHN_KULBA_GIFT_IN_DRASSEN + JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH )
|
||||
#define MERC_DIED_ON_OTHER_ASSIGNMENT_LENGTH 5
|
||||
|
||||
#define INSUR_1HOUR_FRAUD ( MERC_DIED_ON_OTHER_ASSIGNMENT + MERC_DIED_ON_OTHER_ASSIGNMENT_LENGTH )
|
||||
#define INSUR_1HOUR_FRAUD_LENGTH 3
|
||||
|
||||
//when a merc is fired, and is injured
|
||||
#define AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND ( INSUR_1HOUR_FRAUD + INSUR_1HOUR_FRAUD_LENGTH )
|
||||
#define AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH 3
|
||||
|
||||
//when a merc is fired, and is dead
|
||||
#define AIM_MEDICAL_DEPOSIT_NO_REFUND ( AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND + AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH )
|
||||
#define AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH 3
|
||||
|
||||
#define BOBBY_R_MEDUNA_SHIPMENT ( AIM_MEDICAL_DEPOSIT_NO_REFUND + AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH )
|
||||
#define BOBBY_R_MEDUNA_SHIPMENT_LENGTH 4
|
||||
|
||||
|
||||
struct message{
|
||||
STR16 pString;
|
||||
struct message *Next;
|
||||
struct message *Prev;
|
||||
};
|
||||
|
||||
typedef struct message EmailMessage;
|
||||
typedef EmailMessage *MessagePtr;
|
||||
|
||||
|
||||
struct email
|
||||
{
|
||||
STR16 pSubject;
|
||||
UINT16 usOffset;
|
||||
UINT16 usLength;
|
||||
UINT8 ubSender;
|
||||
UINT32 iDate;
|
||||
INT32 iId;
|
||||
INT32 iFirstData;
|
||||
UINT32 uiSecondData;
|
||||
BOOLEAN fRead;
|
||||
BOOLEAN fNew;
|
||||
|
||||
INT32 iThirdData;
|
||||
INT32 iFourthData;
|
||||
UINT32 uiFifthData;
|
||||
UINT32 uiSixData;
|
||||
|
||||
struct email *Next;
|
||||
struct email *Prev;
|
||||
};
|
||||
|
||||
typedef struct email Email;
|
||||
typedef Email *EmailPtr;
|
||||
|
||||
|
||||
// This used when saving the emails to disk.
|
||||
typedef struct
|
||||
{
|
||||
UINT16 usOffset;
|
||||
UINT16 usLength;
|
||||
UINT8 ubSender;
|
||||
UINT32 iDate;
|
||||
INT32 iId;
|
||||
INT32 iFirstData;
|
||||
UINT32 uiSecondData;
|
||||
|
||||
INT32 iThirdData;
|
||||
INT32 iFourthData;
|
||||
UINT32 uiFifthData;
|
||||
UINT32 uiSixData;
|
||||
|
||||
BOOLEAN fRead;
|
||||
BOOLEAN fNew;
|
||||
} SavedEmailStruct;
|
||||
|
||||
|
||||
|
||||
struct pagemessages{
|
||||
INT32 iIds[MAX_MESSAGES_PAGE];
|
||||
INT32 iPageId;
|
||||
struct pagemessages *Next;
|
||||
struct pagemessages *Prev;
|
||||
};
|
||||
|
||||
|
||||
typedef struct pagemessages Page;
|
||||
typedef Page *PagePtr;
|
||||
|
||||
struct messagerecord{
|
||||
// CHAR16 pRecord[ 320 ];
|
||||
CHAR16 pRecord[ 640 ];
|
||||
struct messagerecord *Next;
|
||||
};
|
||||
|
||||
typedef struct messagerecord Record;
|
||||
typedef Record *RecordPtr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
RecordPtr pFirstRecord;
|
||||
RecordPtr pLastRecord;
|
||||
INT32 iPageNumber;
|
||||
} EmailPageInfoStruct;
|
||||
|
||||
enum {
|
||||
SENDER=0,
|
||||
RECEIVED,
|
||||
SUBJECT,
|
||||
READ,
|
||||
};
|
||||
|
||||
enum {
|
||||
MAIL_ENRICO=0,
|
||||
CHAR_PROFILE_SITE,
|
||||
GAME_HELP,
|
||||
IMP_PROFILE_RESULTS,
|
||||
SPECK_FROM_MERC,
|
||||
RIS_EMAIL,
|
||||
BARRY_MAIL,
|
||||
MELTDOWN_MAIL = BARRY_MAIL+ 39,
|
||||
INSURANCE_COMPANY,
|
||||
BOBBY_R,
|
||||
KING_PIN,
|
||||
JOHN_KULBA,
|
||||
AIM_SITE,
|
||||
};
|
||||
|
||||
// the length of the subject in char
|
||||
#define EMAIL_SUBJECT_LENGTH 128
|
||||
|
||||
extern BOOLEAN fUnReadMailFlag;
|
||||
extern BOOLEAN fNewMailFlag;
|
||||
extern BOOLEAN fOldUnreadFlag;
|
||||
extern BOOLEAN fOldNewMailFlag;
|
||||
extern BOOLEAN fDeleteMailFlag;
|
||||
extern BOOLEAN fDisplayMessageFlag;
|
||||
extern BOOLEAN fReDrawNewMailFlag;
|
||||
extern BOOLEAN fOpenMostRecentUnReadFlag;
|
||||
extern EmailPtr pEmailList;
|
||||
extern UINT32 guiEmailWarning;
|
||||
|
||||
|
||||
void GameInitEmail();
|
||||
BOOLEAN EnterEmail();
|
||||
void ExitEmail();
|
||||
void HandleEmail();
|
||||
void RenderEmail();
|
||||
|
||||
#define CHECK_X iScreenWidthOffset + 15
|
||||
#define CHECK_Y iScreenHeightOffset + 13
|
||||
#define VIEWER_X iScreenWidthOffset + 155
|
||||
#define VIEWER_Y iScreenHeightOffset + 70 + 21
|
||||
#define MAIL_STRING_SIZE 640
|
||||
|
||||
|
||||
// message manipulation
|
||||
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 uiFirstData, UINT32 uiSecondData );
|
||||
void RemoveEmailMessage(INT32 iId);
|
||||
EmailPtr GetEmailMessage(INT32 iId);
|
||||
void LookForUnread();
|
||||
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate);
|
||||
void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate);
|
||||
BOOLEAN DisplayNewMailBox();
|
||||
void CreateDestroyNewMailButton();
|
||||
void CreateDestroyDeleteNoticeMailButton();
|
||||
void AddDeleteRegionsToMessageRegion(INT32 iViewerY);
|
||||
void DisplayEmailHeaders( void );
|
||||
void ReDrawNewMailBox( void );
|
||||
void ReDisplayBoxes( void );
|
||||
void ShutDownEmailList();
|
||||
void AddMessageToPages(INT32 iMessageId);
|
||||
void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iFirstData, UINT32 uiSecondData );
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
void AddAllEmails();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1834
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,83 @@
|
||||
#ifndef __FILES_H
|
||||
#define __FILES_H
|
||||
|
||||
|
||||
#define FILES_DAT_FILE "TEMP\\files.dat"
|
||||
|
||||
void GameInitFiles();
|
||||
void EnterFiles();
|
||||
void ExitFiles();
|
||||
void HandleFiles();
|
||||
void RenderFiles();
|
||||
|
||||
|
||||
struct files{
|
||||
UINT8 ubCode; // the code index in the files code table
|
||||
UINT8 ubFormat; // layout format
|
||||
UINT32 uiIdNumber; // unique id number
|
||||
UINT32 uiDate; // time in the world in global time (resolution, minutes)
|
||||
BOOLEAN fRead;
|
||||
STR8 pPicFileNameList[2];
|
||||
|
||||
struct files *Next; // next unit in the list
|
||||
|
||||
};
|
||||
|
||||
struct filestring{
|
||||
STR16 pString;
|
||||
struct filestring *Next;
|
||||
};
|
||||
|
||||
typedef struct filestring FileString;
|
||||
typedef struct filestring *FileStringPtr;
|
||||
|
||||
// files codes
|
||||
enum{
|
||||
FILES_WELCOME_NOTICE,
|
||||
};
|
||||
|
||||
|
||||
// special codes for special files
|
||||
enum{
|
||||
ENRICO_BACKGROUND = 0,
|
||||
SLAY_BACKGROUND,
|
||||
MATRON_BACKGROUND,
|
||||
IMPOSTER_BACKGROUND,
|
||||
TIFFANY_BACKGROUND,
|
||||
REXALL_BACKGROUND,
|
||||
ELGIN_BACKGROUND,
|
||||
|
||||
};
|
||||
extern UINT8 ubFileRecordsLength[];
|
||||
extern BOOLEAN fEnteredFileViewerFromNewFileIcon;
|
||||
extern BOOLEAN fNewFilesInFileViewer;
|
||||
|
||||
|
||||
|
||||
typedef struct files FilesUnit;
|
||||
typedef struct files *FilesUnitPtr;
|
||||
|
||||
extern FilesUnitPtr pFilesListHead;
|
||||
|
||||
struct filerecordwidth{
|
||||
INT32 iRecordNumber;
|
||||
INT32 iRecordWidth;
|
||||
INT32 iRecordHeightAdjustment;
|
||||
UINT8 ubFlags;
|
||||
struct filerecordwidth *Next;
|
||||
};
|
||||
|
||||
typedef struct filerecordwidth FileRecordWidth;
|
||||
typedef struct filerecordwidth *FileRecordWidthPtr;
|
||||
UINT32 AddFilesToPlayersLog(UINT8 ubCode, UINT32 uiDate , UINT8 ubFormat, STR8 pFirstPicFile, STR8 pSecondPicFile );
|
||||
|
||||
// add a file about this terrorist
|
||||
BOOLEAN AddFileAboutTerrorist( INT32 iProfileId );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+2717
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,76 @@
|
||||
#ifndef __FINANCES_H
|
||||
#define __FINANCES_H
|
||||
|
||||
void GameInitFinances();
|
||||
void EnterFinances();
|
||||
void ExitFinances();
|
||||
void HandleFinances();
|
||||
void RenderFinances();
|
||||
|
||||
#define FINANCES_DATA_FILE "TEMP\\finances.dat"
|
||||
|
||||
// the financial structure
|
||||
struct finance{
|
||||
UINT8 ubCode; // the code index in the finance code table
|
||||
UINT32 uiIdNumber; // unique id number
|
||||
UINT8 ubSecondCode; // secondary code
|
||||
UINT32 uiDate; // time in the world in global time
|
||||
INT32 iAmount; // the amount of the transaction
|
||||
INT32 iBalanceToDate;
|
||||
struct finance *Next; // next unit in the list
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ACCRUED_INTEREST,
|
||||
ANONYMOUS_DEPOSIT,
|
||||
TRANSACTION_FEE,
|
||||
HIRED_MERC,
|
||||
BOBBYR_PURCHASE,
|
||||
PAY_SPECK_FOR_MERC,
|
||||
MEDICAL_DEPOSIT,
|
||||
IMP_PROFILE,
|
||||
PURCHASED_INSURANCE,
|
||||
REDUCED_INSURANCE,
|
||||
EXTENDED_INSURANCE,
|
||||
CANCELLED_INSURANCE,
|
||||
INSURANCE_PAYOUT,
|
||||
EXTENDED_CONTRACT_BY_1_DAY,
|
||||
EXTENDED_CONTRACT_BY_1_WEEK,
|
||||
EXTENDED_CONTRACT_BY_2_WEEKS,
|
||||
DEPOSIT_FROM_GOLD_MINE,
|
||||
DEPOSIT_FROM_SILVER_MINE,
|
||||
PURCHASED_FLOWERS,
|
||||
FULL_MEDICAL_REFUND,
|
||||
PARTIAL_MEDICAL_REFUND,
|
||||
NO_MEDICAL_REFUND,
|
||||
PAYMENT_TO_NPC,
|
||||
TRANSFER_FUNDS_TO_MERC,
|
||||
TRANSFER_FUNDS_FROM_MERC,
|
||||
TRAIN_TOWN_MILITIA,
|
||||
PURCHASED_ITEM_FROM_DEALER,
|
||||
MERC_DEPOSITED_MONEY_TO_PLAYER_ACCOUNT,
|
||||
SOLD_ITEMS
|
||||
};
|
||||
|
||||
|
||||
typedef struct finance FinanceUnit;
|
||||
typedef struct finance *FinanceUnitPtr;
|
||||
|
||||
extern FinanceUnitPtr pFinanceListHead;
|
||||
//extern INT32 iCurrentBalance;
|
||||
UINT32 AddTransactionToPlayersBook(UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiDate, INT32 iAmount);
|
||||
template <typename string1>
|
||||
void InsertDollarSignInToString( string1 pString );
|
||||
template <typename string1>
|
||||
void InsertCommasForDollarFigure( string1 pString );
|
||||
INT32 GetTodaysDaysIncome( void );
|
||||
INT32 GetProjectedTotalDailyIncome( void );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "florist.h"
|
||||
#include "florist Cards.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "Florist Gallery.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define FLORIST_CARDS_SENTENCE_FONT FONT12ARIAL
|
||||
#define FLORIST_CARDS_SENTENCE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLORIST_CARD_FIRST_POS_X LAPTOP_SCREEN_UL_X + 7
|
||||
#define FLORIST_CARD_FIRST_POS_Y LAPTOP_SCREEN_WEB_UL_Y + 72
|
||||
#define FLORIST_CARD_FIRST_OFFSET_X 174
|
||||
#define FLORIST_CARD_FIRST_OFFSET_Y 109
|
||||
|
||||
#define FLORIST_CARD_CARD_WIDTH 135
|
||||
#define FLORIST_CARD_CARD_HEIGHT 100
|
||||
|
||||
#define FLORIST_CARD_TEXT_WIDTH 121
|
||||
#define FLORIST_CARD_TEXT_HEIGHT 90
|
||||
|
||||
#define FLORIST_CARD_TITLE_SENTENCE_X LAPTOP_SCREEN_UL_X
|
||||
#define FLORIST_CARD_TITLE_SENTENCE_Y LAPTOP_SCREEN_WEB_UL_Y + 53
|
||||
#define FLORIST_CARD_TITLE_SENTENCE_WIDTH 613 - 111
|
||||
|
||||
#define FLORIST_CARD_BACK_BUTTON_X LAPTOP_SCREEN_UL_X + 8
|
||||
#define FLORIST_CARD_BACK_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 12
|
||||
|
||||
//#define FLORIST_CARD_
|
||||
//#define FLORIST_CARD_
|
||||
//#define FLORIST_CARD_
|
||||
|
||||
UINT32 guiCardBackground;
|
||||
|
||||
INT8 gbCurrentlySelectedCard;
|
||||
|
||||
//link to the card gallery
|
||||
MOUSE_REGION gSelectedFloristCardsRegion[9];
|
||||
void SelectFloristCardsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
INT32 guiFlowerCardsButtonImage;
|
||||
void BtnFlowerCardsBackButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiFlowerCardsBackButton;
|
||||
|
||||
|
||||
|
||||
void GameInitFloristCards()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterFloristCards()
|
||||
{
|
||||
UINT16 i, j, usPosX, usPosY;
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 ubCount;
|
||||
|
||||
InitFloristDefaults();
|
||||
|
||||
// load the Flower Account Box graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\CardBlank.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCardBackground));
|
||||
|
||||
ubCount = 0;
|
||||
usPosY = FLORIST_CARD_FIRST_POS_Y;
|
||||
for(j=0; j<3; j++)
|
||||
{
|
||||
usPosX = FLORIST_CARD_FIRST_POS_X;
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
MSYS_DefineRegion( &gSelectedFloristCardsRegion[ubCount], usPosX, usPosY, (UINT16)(usPosX + FLORIST_CARD_CARD_WIDTH), (UINT16)(usPosY + FLORIST_CARD_CARD_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectFloristCardsRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedFloristCardsRegion[ubCount]);
|
||||
MSYS_SetRegionUserData( &gSelectedFloristCardsRegion[ubCount], 0, ubCount );
|
||||
ubCount++;
|
||||
usPosX += FLORIST_CARD_FIRST_OFFSET_X;
|
||||
}
|
||||
usPosY += FLORIST_CARD_FIRST_OFFSET_Y;
|
||||
}
|
||||
|
||||
|
||||
guiFlowerCardsButtonImage = LoadButtonImage("LAPTOP\\FloristButtons.sti", -1,0,-1,1,-1 );
|
||||
|
||||
guiFlowerCardsBackButton = CreateIconAndTextButton( guiFlowerCardsButtonImage, sFloristCards[FLORIST_CARDS_BACK], FLORIST_BUTTON_TEXT_FONT,
|
||||
FLORIST_BUTTON_TEXT_UP_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
FLORIST_BUTTON_TEXT_DOWN_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
TEXT_CJUSTIFIED,
|
||||
FLORIST_CARD_BACK_BUTTON_X, FLORIST_CARD_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnFlowerCardsBackButtonCallback);
|
||||
SetButtonCursor(guiFlowerCardsBackButton, CURSOR_WWW );
|
||||
|
||||
|
||||
//passing the currently selected card to -1, so it is not used
|
||||
gbCurrentlySelectedCard = -1;
|
||||
|
||||
RenderFloristCards();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitFloristCards()
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
RemoveFloristDefaults();
|
||||
DeleteVideoObjectFromIndex( guiCardBackground );
|
||||
|
||||
//card gallery
|
||||
for(i=0; i<9; i++)
|
||||
MSYS_RemoveRegion( &gSelectedFloristCardsRegion[i]);
|
||||
|
||||
UnloadButtonImage( guiFlowerCardsButtonImage );
|
||||
RemoveButton( guiFlowerCardsBackButton );
|
||||
}
|
||||
|
||||
void HandleFloristCards()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RenderFloristCards()
|
||||
{
|
||||
UINT8 i,j, ubCount;
|
||||
UINT16 usPosX, usPosY;
|
||||
wchar_t sTemp[ 640 ];
|
||||
UINT32 uiStartLoc=0;
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 usHeightOffset;
|
||||
|
||||
DisplayFloristDefaults();
|
||||
|
||||
DrawTextToScreen( sFloristCards[FLORIST_CARDS_CLICK_SELECTION], FLORIST_CARD_TITLE_SENTENCE_X, FLORIST_CARD_TITLE_SENTENCE_Y, FLORIST_CARD_TITLE_SENTENCE_WIDTH, FONT10ARIAL, FLORIST_CARDS_SENTENCE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
GetVideoObject(&hPixHandle, guiCardBackground);
|
||||
usPosY = FLORIST_CARD_FIRST_POS_Y;
|
||||
ubCount = 0;
|
||||
for(j=0; j<3; j++)
|
||||
{
|
||||
usPosX = FLORIST_CARD_FIRST_POS_X;
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
//The flowe account box
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, usPosX, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Get and display the card saying
|
||||
uiStartLoc = FLOR_CARD_TEXT_TITLE_SIZE * ubCount;
|
||||
LoadEncryptedDataFromFile(FLOR_CARD_TEXT_FILE, sTemp, uiStartLoc, FLOR_CARD_TEXT_TITLE_SIZE);
|
||||
|
||||
// DisplayWrappedString((UINT16)(usPosX+7), (UINT16)(usPosY+15), FLORIST_CARD_TEXT_WIDTH, 2, FLORIST_CARDS_SENTENCE_FONT, FLORIST_CARDS_SENTENCE_COLOR, sTemp, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
usHeightOffset = IanWrappedStringHeight( (UINT16)(usPosX+7), (UINT16)(usPosY), FLORIST_CARD_TEXT_WIDTH, 2,
|
||||
FLORIST_CARDS_SENTENCE_FONT, FLORIST_CARDS_SENTENCE_COLOR, sTemp,
|
||||
0, FALSE, 0);
|
||||
|
||||
usHeightOffset = ( FLORIST_CARD_TEXT_HEIGHT - usHeightOffset ) / 2;
|
||||
|
||||
|
||||
IanDisplayWrappedString( (UINT16)(usPosX+7), (UINT16)(usPosY+10+usHeightOffset), FLORIST_CARD_TEXT_WIDTH, 2,
|
||||
FLORIST_CARDS_SENTENCE_FONT, FLORIST_CARDS_SENTENCE_COLOR, sTemp,
|
||||
0, FALSE, 0);
|
||||
|
||||
ubCount++;
|
||||
usPosX += FLORIST_CARD_FIRST_OFFSET_X;
|
||||
}
|
||||
usPosY += FLORIST_CARD_FIRST_OFFSET_Y;
|
||||
}
|
||||
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectFloristCardsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gbCurrentlySelectedCard = (UINT8) MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_FLORIST_ORDERFORM;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BtnFlowerCardsBackButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_FLORIST_ORDERFORM;
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef __FLORIST_CARDS_H
|
||||
#define __FLORIST_CARDS_H
|
||||
|
||||
|
||||
#define FLOR_CARD_TEXT_FILE "BINARYDATA\\FlowerCard.edt"
|
||||
#define FLOR_CARD_TEXT_TITLE_SIZE 5 * 80 * 2
|
||||
|
||||
|
||||
|
||||
void GameInitFloristCards();
|
||||
BOOLEAN EnterFloristCards();
|
||||
void ExitFloristCards();
|
||||
void HandleFloristCards();
|
||||
void RenderFloristCards();
|
||||
|
||||
|
||||
extern INT8 gbCurrentlySelectedCard;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,421 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "florist.h"
|
||||
#include "florist Gallery.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "stdio.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define FLOR_GALLERY_TITLE_FONT FONT10ARIAL
|
||||
#define FLOR_GALLERY_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_TITLE_FONT FONT14ARIAL
|
||||
#define FLOR_GALLERY_FLOWER_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_PRICE_FONT FONT12ARIAL
|
||||
#define FLOR_GALLERY_FLOWER_PRICE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_DESC_FONT FONT12ARIAL
|
||||
#define FLOR_GALLERY_FLOWER_DESC_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLOR_GALLERY_NUMBER_FLORAL_BUTTONS 3
|
||||
#define FLOR_GALLERY_NUMBER_FLORAL_IMAGES 10
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_DESC_TEXT_FONT FONT12ARIAL
|
||||
#define FLOR_GALLERY_FLOWER_DESC_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLOR_GALLERY_BACK_BUTTON_X LAPTOP_SCREEN_UL_X + 8
|
||||
#define FLOR_GALLERY_BACK_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 12
|
||||
|
||||
#define FLOR_GALLERY_NEXT_BUTTON_X LAPTOP_SCREEN_UL_X + 420
|
||||
#define FLOR_GALLERY_NEXT_BUTTON_Y FLOR_GALLERY_BACK_BUTTON_Y
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_BUTTON_X LAPTOP_SCREEN_UL_X + 7
|
||||
#define FLOR_GALLERY_FLOWER_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 74
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_BUTTON_OFFSET_Y 112
|
||||
|
||||
#define FLOR_GALLERY_TITLE_TEXT_X LAPTOP_SCREEN_UL_X + 0
|
||||
#define FLOR_GALLERY_TITLE_TEXT_Y LAPTOP_SCREEN_WEB_UL_Y + 48
|
||||
#define FLOR_GALLERY_TITLE_TEXT_WIDTH 613 - 611
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_TITLE_X FLOR_GALLERY_FLOWER_BUTTON_X + 88
|
||||
|
||||
#define FLOR_GALLERY_DESC_WIDTH 390
|
||||
|
||||
#define FLOR_GALLERY_FLOWER_TITLE_OFFSET_Y 9
|
||||
#define FLOR_GALLERY_FLOWER_PRICE_OFFSET_Y FLOR_GALLERY_FLOWER_TITLE_OFFSET_Y + 17
|
||||
#define FLOR_GALLERY_FLOWER_DESC_OFFSET_Y FLOR_GALLERY_FLOWER_PRICE_OFFSET_Y + 15
|
||||
|
||||
|
||||
UINT32 guiFlowerImages[ 3 ];
|
||||
|
||||
UINT32 guiCurrentlySelectedFlower=0;
|
||||
|
||||
UINT8 gubCurFlowerIndex=0;
|
||||
UINT8 gubCurNumberOfFlowers=0;
|
||||
UINT8 gubPrevNumberOfFlowers=0;
|
||||
BOOLEAN gfRedrawFloristGallery=FALSE;
|
||||
|
||||
BOOLEAN FloristGallerySubPagesVisitedFlag[ 4 ];
|
||||
|
||||
//Floral buttons
|
||||
extern INT32 guiGalleryButtonImage; // symbol already defined in florist.cpp (jonathanl)
|
||||
void BtnGalleryFlowerButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiGalleryButton[ FLOR_GALLERY_NUMBER_FLORAL_BUTTONS ];
|
||||
|
||||
//Next Previous buttons
|
||||
INT32 guiFloralGalleryButtonImage;
|
||||
void BtnFloralGalleryNextButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnFloralGalleryBackButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiFloralGalleryButton[2];
|
||||
|
||||
|
||||
BOOLEAN InitFlowerButtons();
|
||||
void DeleteFlowerButtons();
|
||||
BOOLEAN DisplayFloralDescriptions();
|
||||
void ChangingFloristGallerySubPage( UINT8 ubSubPageNumber );
|
||||
|
||||
|
||||
void GameInitFloristGallery()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EnterInitFloristGallery()
|
||||
{
|
||||
memset( &FloristGallerySubPagesVisitedFlag, 0, 4);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN EnterFloristGallery()
|
||||
{
|
||||
InitFloristDefaults();
|
||||
|
||||
//the next previous buttons
|
||||
guiFloralGalleryButtonImage = LoadButtonImage("LAPTOP\\FloristButtons.sti", -1,0,-1,1,-1 );
|
||||
|
||||
guiFloralGalleryButton[0] = CreateIconAndTextButton( guiFloralGalleryButtonImage, sFloristGalleryText[FLORIST_GALLERY_PREV], FLORIST_BUTTON_TEXT_FONT,
|
||||
FLORIST_BUTTON_TEXT_UP_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
FLORIST_BUTTON_TEXT_DOWN_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
TEXT_CJUSTIFIED,
|
||||
FLOR_GALLERY_BACK_BUTTON_X, FLOR_GALLERY_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnFloralGalleryBackButtonCallback);
|
||||
SetButtonCursor(guiFloralGalleryButton[0], CURSOR_WWW );
|
||||
|
||||
guiFloralGalleryButton[1] = CreateIconAndTextButton( guiFloralGalleryButtonImage, sFloristGalleryText[FLORIST_GALLERY_NEXT], FLORIST_BUTTON_TEXT_FONT,
|
||||
FLORIST_BUTTON_TEXT_UP_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
FLORIST_BUTTON_TEXT_DOWN_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
TEXT_CJUSTIFIED,
|
||||
FLOR_GALLERY_NEXT_BUTTON_X, FLOR_GALLERY_NEXT_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnFloralGalleryNextButtonCallback);
|
||||
SetButtonCursor(guiFloralGalleryButton[1], CURSOR_WWW );
|
||||
|
||||
RenderFloristGallery();
|
||||
|
||||
InitFlowerButtons();
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitFloristGallery()
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
RemoveFloristDefaults();
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
RemoveButton( guiFloralGalleryButton[i] );
|
||||
|
||||
UnloadButtonImage( guiFloralGalleryButtonImage );
|
||||
|
||||
DeleteFlowerButtons();
|
||||
|
||||
}
|
||||
|
||||
void HandleFloristGallery()
|
||||
{
|
||||
if( gfRedrawFloristGallery )
|
||||
{
|
||||
gfRedrawFloristGallery=FALSE;
|
||||
|
||||
//
|
||||
DeleteFlowerButtons();
|
||||
InitFlowerButtons();
|
||||
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RenderFloristGallery()
|
||||
{
|
||||
DisplayFloristDefaults();
|
||||
|
||||
DrawTextToScreen(sFloristGalleryText[FLORIST_GALLERY_CLICK_TO_ORDER], FLOR_GALLERY_TITLE_TEXT_X, FLOR_GALLERY_TITLE_TEXT_Y, FLOR_GALLERY_TITLE_TEXT_WIDTH, FLOR_GALLERY_TITLE_FONT, FLOR_GALLERY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
DrawTextToScreen(sFloristGalleryText[FLORIST_GALLERY_ADDIFTIONAL_FEE], FLOR_GALLERY_TITLE_TEXT_X, FLOR_GALLERY_TITLE_TEXT_Y+11, FLOR_GALLERY_TITLE_TEXT_WIDTH, FLOR_GALLERY_TITLE_FONT, FLOR_GALLERY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
DisplayFloralDescriptions();
|
||||
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
void BtnFloralGalleryNextButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
|
||||
if( (gubCurFlowerIndex + 3 ) <= FLOR_GALLERY_NUMBER_FLORAL_IMAGES )
|
||||
gubCurFlowerIndex += 3;
|
||||
|
||||
ChangingFloristGallerySubPage( gubCurFlowerIndex );
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
|
||||
gfRedrawFloristGallery = TRUE;
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BtnFloralGalleryBackButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
|
||||
if( gubCurFlowerIndex != 0 )
|
||||
{
|
||||
if( gubCurFlowerIndex >=3 )
|
||||
gubCurFlowerIndex -= 3;
|
||||
else
|
||||
gubCurFlowerIndex = 0;
|
||||
|
||||
ChangingFloristGallerySubPage( gubCurFlowerIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_FLORIST;
|
||||
}
|
||||
|
||||
gfRedrawFloristGallery = TRUE;
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BtnGalleryFlowerButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
guiCurrentlySelectedFlower = (UINT8) MSYS_GetBtnUserData( btn, 0 );
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_FLORIST_ORDERFORM;
|
||||
|
||||
gfShowBookmarks = FALSE;
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN InitFlowerButtons()
|
||||
{
|
||||
UINT16 i,j, count;
|
||||
UINT16 usPosY;
|
||||
char sTemp[40];
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
|
||||
if( (FLOR_GALLERY_NUMBER_FLORAL_IMAGES - gubCurFlowerIndex) >= 3 )
|
||||
gubCurNumberOfFlowers = 3;
|
||||
else
|
||||
gubCurNumberOfFlowers = FLOR_GALLERY_NUMBER_FLORAL_IMAGES - gubCurFlowerIndex;
|
||||
|
||||
gubPrevNumberOfFlowers = gubCurNumberOfFlowers;
|
||||
|
||||
//the 10 pictures of the flowers
|
||||
count = gubCurFlowerIndex;
|
||||
for(i=0; i<gubCurNumberOfFlowers; i++)
|
||||
{
|
||||
// load the handbullet graphic and add it
|
||||
sprintf( sTemp, "LAPTOP\\Flower_%d.sti", count);
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiFlowerImages[i]));
|
||||
count++;
|
||||
}
|
||||
|
||||
//the buttons with the flower pictures on them
|
||||
usPosY = FLOR_GALLERY_FLOWER_BUTTON_Y;
|
||||
// usPosX = FLOR_GALLERY_FLOWER_BUTTON_X;
|
||||
count = gubCurFlowerIndex;
|
||||
guiGalleryButtonImage = LoadButtonImage("LAPTOP\\GalleryButtons.sti", -1,0,-1,1,-1 );
|
||||
for(j=0; j<gubCurNumberOfFlowers; j++)
|
||||
{
|
||||
guiGalleryButton[j] = QuickCreateButton( guiGalleryButtonImage, FLOR_GALLERY_FLOWER_BUTTON_X, usPosY,
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnGalleryFlowerButtonCallback);
|
||||
SetButtonCursor( guiGalleryButton[j], CURSOR_WWW);
|
||||
MSYS_SetBtnUserData( guiGalleryButton[j], 0, count);
|
||||
|
||||
SpecifyButtonIcon( guiGalleryButton[j], guiFlowerImages[ j ], 0, 5, 5, FALSE );
|
||||
usPosY += FLOR_GALLERY_FLOWER_BUTTON_OFFSET_Y;
|
||||
count ++;
|
||||
}
|
||||
|
||||
//if its the first page, display the 'back' text in place of the 'prev' text on the top left button
|
||||
if( gubCurFlowerIndex == 0 )
|
||||
SpecifyButtonText( guiFloralGalleryButton[0], sFloristGalleryText[FLORIST_GALLERY_HOME] );
|
||||
else
|
||||
SpecifyButtonText( guiFloralGalleryButton[0], sFloristGalleryText[FLORIST_GALLERY_PREV] );
|
||||
|
||||
//if it is the last page disable the next button
|
||||
if( gubCurFlowerIndex == FLOR_GALLERY_NUMBER_FLORAL_IMAGES-1 )
|
||||
DisableButton( guiFloralGalleryButton[1] );
|
||||
else
|
||||
EnableButton( guiFloralGalleryButton[1] );
|
||||
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void DeleteFlowerButtons()
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
for(i=0; i<gubPrevNumberOfFlowers; i++)
|
||||
{
|
||||
DeleteVideoObjectFromIndex( guiFlowerImages[i] );
|
||||
}
|
||||
|
||||
UnloadButtonImage( guiGalleryButtonImage );
|
||||
|
||||
for(i=0; i<gubPrevNumberOfFlowers; i++)
|
||||
{
|
||||
RemoveButton( guiGalleryButton[i] );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN DisplayFloralDescriptions()
|
||||
{
|
||||
wchar_t sTemp[ 640 ];
|
||||
UINT32 uiStartLoc=0, i;
|
||||
UINT16 usPosY, usPrice;
|
||||
|
||||
if( (FLOR_GALLERY_NUMBER_FLORAL_IMAGES - gubCurFlowerIndex) >= 3 )
|
||||
gubCurNumberOfFlowers = 3;
|
||||
else
|
||||
gubCurNumberOfFlowers = FLOR_GALLERY_NUMBER_FLORAL_IMAGES - gubCurFlowerIndex;
|
||||
|
||||
usPosY = FLOR_GALLERY_FLOWER_BUTTON_Y;
|
||||
for(i=0; i<gubCurNumberOfFlowers; i++)
|
||||
{
|
||||
//Display Flower title
|
||||
uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * (i + gubCurFlowerIndex);
|
||||
LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_TITLE_SIZE);
|
||||
DrawTextToScreen(sTemp, FLOR_GALLERY_FLOWER_TITLE_X, (UINT16)(usPosY+FLOR_GALLERY_FLOWER_TITLE_OFFSET_Y), 0, FLOR_GALLERY_FLOWER_TITLE_FONT, FLOR_GALLERY_FLOWER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
//Display Flower Price
|
||||
uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * (i + gubCurFlowerIndex) + FLOR_GALLERY_TEXT_TITLE_SIZE;
|
||||
LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_PRICE_SIZE);
|
||||
swscanf( sTemp, L"%hu", &usPrice);
|
||||
swprintf( sTemp, L"$%d.00 %s", usPrice, pMessageStrings[ MSG_USDOLLAR_ABBREVIATION ] );
|
||||
DrawTextToScreen(sTemp, FLOR_GALLERY_FLOWER_TITLE_X, (UINT16)(usPosY+FLOR_GALLERY_FLOWER_PRICE_OFFSET_Y), 0, FLOR_GALLERY_FLOWER_PRICE_FONT, FLOR_GALLERY_FLOWER_PRICE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
//Display Flower Desc
|
||||
uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * (i + gubCurFlowerIndex) + FLOR_GALLERY_TEXT_TITLE_SIZE + FLOR_GALLERY_TEXT_PRICE_SIZE;
|
||||
LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_DESC_SIZE);
|
||||
DisplayWrappedString(FLOR_GALLERY_FLOWER_TITLE_X, (UINT16)(usPosY+FLOR_GALLERY_FLOWER_DESC_OFFSET_Y), FLOR_GALLERY_DESC_WIDTH, 2, FLOR_GALLERY_FLOWER_DESC_FONT, FLOR_GALLERY_FLOWER_DESC_COLOR, sTemp, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
usPosY += FLOR_GALLERY_FLOWER_BUTTON_OFFSET_Y;
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void ChangingFloristGallerySubPage( UINT8 ubSubPageNumber )
|
||||
{
|
||||
fLoadPendingFlag = TRUE;
|
||||
|
||||
//there are 3 flowers per page
|
||||
if( ubSubPageNumber == FLOR_GALLERY_NUMBER_FLORAL_IMAGES )
|
||||
ubSubPageNumber = 4;
|
||||
else
|
||||
ubSubPageNumber = ubSubPageNumber / 3;
|
||||
|
||||
if( FloristGallerySubPagesVisitedFlag[ ubSubPageNumber ] == FALSE )
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = FALSE;
|
||||
|
||||
FloristGallerySubPagesVisitedFlag[ ubSubPageNumber ] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fConnectingToSubPage = TRUE;
|
||||
fFastLoadFlag = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef __FLORIST_GALLERY_H
|
||||
#define __FLORIST_GALLERY_H
|
||||
|
||||
|
||||
#define FLOR_GALLERY_TEXT_FILE "BINARYDATA\\FlowerDesc.edt"
|
||||
#define FLOR_GALLERY_TEXT_TITLE_SIZE 80 * 2
|
||||
#define FLOR_GALLERY_TEXT_PRICE_SIZE 80 * 2
|
||||
#define FLOR_GALLERY_TEXT_DESC_SIZE 4 * 80 * 2
|
||||
#define FLOR_GALLERY_TEXT_TOTAL_SIZE 6 * 80 * 2
|
||||
|
||||
|
||||
|
||||
void GameInitFloristGallery();
|
||||
BOOLEAN EnterFloristGallery();
|
||||
void ExitFloristGallery();
|
||||
void HandleFloristGallery();
|
||||
void RenderFloristGallery();
|
||||
void EnterInitFloristGallery();
|
||||
|
||||
extern UINT32 guiCurrentlySelectedFlower;
|
||||
extern UINT8 gubCurFlowerIndex;
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
#ifndef __FLORIST_ORDER_FORM_H
|
||||
#define __FLORIST_ORDER_FORM_H
|
||||
|
||||
void GameInitFloristOrderForm();
|
||||
BOOLEAN EnterFloristOrderForm();
|
||||
void ExitFloristOrderForm();
|
||||
void HandleFloristOrderForm();
|
||||
void RenderFloristOrderForm();
|
||||
|
||||
|
||||
void InitFloristOrderForm();
|
||||
|
||||
void InitFloristOrderFormVariables();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,302 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "florist.h"
|
||||
#include "florist Order Form.h"
|
||||
#include "florist Gallery.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "florist Cards.h"
|
||||
#include "Text.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define FLORIST_SENTENCE_FONT FONT12ARIAL
|
||||
#define FLORIST_SENTENCE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLORIST_TITLE_FONT FONT14ARIAL
|
||||
#define FLORIST_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define FLORIST_BACKGROUND_WIDTH 125
|
||||
#define FLORIST_BACKGROUND_HEIGHT 100
|
||||
|
||||
#define FLORIST_BIG_TITLE_X LAPTOP_SCREEN_UL_X + 113
|
||||
#define FLORIST_BIG_TITLE_Y LAPTOP_SCREEN_WEB_UL_Y + 0
|
||||
|
||||
#define FLORIST_SMALL_TITLE_X LAPTOP_SCREEN_UL_X + 195
|
||||
#define FLORIST_SMALL_TITLE_Y LAPTOP_SCREEN_WEB_UL_Y + 0
|
||||
#define FLORIST_SMALL_TITLE_WIDTH 100
|
||||
#define FLORIST_SMALL_TITLE_HEIGHT 49
|
||||
|
||||
|
||||
#define FLORIST_FIRST_BULLET_X LAPTOP_SCREEN_UL_X + 5
|
||||
#define FLORIST_FIRST_BULLET_Y LAPTOP_SCREEN_WEB_UL_Y + 135
|
||||
|
||||
#define FLORIST_BULLET_OFFSET_Y 54
|
||||
|
||||
#define FLORIST_NUMBER_OF_BULLETS 4
|
||||
|
||||
#define FLORIST_GALLERY_BUTTON_X LAPTOP_SCREEN_UL_X + 210
|
||||
#define FLORIST_GALLERY_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 360
|
||||
|
||||
#define FLORIST_FIRST_SENTENCE_COLUMN_TEXT_X LAPTOP_SCREEN_UL_X + 53
|
||||
#define FLORIST_FIRST_SENTENCE_COLUMN_TEXT_WIDTH 136
|
||||
|
||||
#define FLORIST_SECOND_SENTENCE_COLUMN_TEXT_X LAPTOP_SCREEN_UL_X + 200
|
||||
#define FLORIST_SECOND_SENTENCE_COLUMN_TEXT_WIDTH 300
|
||||
|
||||
#define FLORIST_COMPANY_INFO_TEXT_X LAPTOP_SCREEN_UL_X + 117
|
||||
#define FLORIST_COMPANY_INFO_TEXT_WIDTH 290
|
||||
|
||||
#define FLORIST_COMPANY_INFO_LINE_1_Y LAPTOP_SCREEN_WEB_UL_Y + 79
|
||||
#define FLORIST_COMPANY_INFO_LINE_2_Y LAPTOP_SCREEN_WEB_UL_Y + 94
|
||||
#define FLORIST_COMPANY_INFO_LINE_3_Y LAPTOP_SCREEN_WEB_UL_Y + 107
|
||||
#define FLORIST_COMPANY_INFO_LINE_4_Y LAPTOP_SCREEN_WEB_UL_Y + 119
|
||||
|
||||
UINT32 guiFloristBackground;
|
||||
UINT32 guiHandBullet;
|
||||
UINT32 guiLargeTitleSymbol;
|
||||
UINT32 guiSmallTitleSymbol;
|
||||
|
||||
|
||||
BOOLEAN gfHomePageActive=FALSE; //Specifies whether or not the home page or the sub pages are active
|
||||
|
||||
//Buttons
|
||||
|
||||
//Graphic for button
|
||||
INT32 guiGalleryButtonImage;
|
||||
void BtnGalleryButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
UINT32 guiGalleryButton;
|
||||
|
||||
|
||||
//link to the flower home page by clicking on the flower title
|
||||
MOUSE_REGION gSelectedFloristTitleHomeLinkRegion;
|
||||
void SelectFloristTitleHomeLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
void GameInitFlorist()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterFlorist()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
SetBookMark( FLORIST_BOOKMARK );
|
||||
|
||||
InitFloristDefaults();
|
||||
|
||||
// load the handbullet graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\HandBullet.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiHandBullet));
|
||||
|
||||
guiGalleryButtonImage = LoadButtonImage("LAPTOP\\FloristButtons.sti", -1,0,-1,1,-1 );
|
||||
|
||||
guiGalleryButton = CreateIconAndTextButton( guiGalleryButtonImage, sFloristText[FLORIST_GALLERY], FLORIST_BUTTON_TEXT_FONT,
|
||||
FLORIST_BUTTON_TEXT_UP_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
FLORIST_BUTTON_TEXT_DOWN_COLOR, FLORIST_BUTTON_TEXT_SHADOW_COLOR,
|
||||
TEXT_CJUSTIFIED,
|
||||
FLORIST_GALLERY_BUTTON_X, FLORIST_GALLERY_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BtnGalleryButtonCallback);
|
||||
SetButtonCursor(guiGalleryButton, CURSOR_WWW );
|
||||
|
||||
//reset the currently selected card
|
||||
gbCurrentlySelectedCard = -1;
|
||||
|
||||
//Initialize the Florsit Order Page (reset some variables)
|
||||
InitFloristOrderForm();
|
||||
|
||||
//Initialize the flower index for the gallery page
|
||||
gubCurFlowerIndex = 0;
|
||||
|
||||
|
||||
RenderFlorist();
|
||||
fReDrawScreenFlag = TRUE;
|
||||
|
||||
//set some variables for the order form
|
||||
InitFloristOrderFormVariables();
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ExitFlorist()
|
||||
{
|
||||
|
||||
DeleteVideoObjectFromIndex(guiHandBullet);
|
||||
|
||||
RemoveFloristDefaults();
|
||||
|
||||
UnloadButtonImage( guiGalleryButtonImage );
|
||||
|
||||
RemoveButton( guiGalleryButton );
|
||||
}
|
||||
|
||||
void HandleFlorist()
|
||||
{
|
||||
}
|
||||
|
||||
void RenderFlorist()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 i, usPosY;
|
||||
UINT8 ubTextCounter;
|
||||
|
||||
GetVideoObject(&hPixHandle, guiHandBullet);
|
||||
|
||||
DisplayFloristDefaults();
|
||||
|
||||
//compnay info
|
||||
DisplayWrappedString(FLORIST_COMPANY_INFO_TEXT_X, FLORIST_COMPANY_INFO_LINE_1_Y, FLORIST_COMPANY_INFO_TEXT_WIDTH, 2, FLORIST_SENTENCE_FONT, FLORIST_SENTENCE_COLOR, sFloristText[ FLORIST_DROP_ANYWHERE ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
DisplayWrappedString(FLORIST_COMPANY_INFO_TEXT_X, FLORIST_COMPANY_INFO_LINE_2_Y, FLORIST_COMPANY_INFO_TEXT_WIDTH, 2, FLORIST_SENTENCE_FONT, FLORIST_SENTENCE_COLOR, sFloristText[ FLORIST_PHONE_NUMBER ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
DisplayWrappedString(FLORIST_COMPANY_INFO_TEXT_X, FLORIST_COMPANY_INFO_LINE_3_Y, FLORIST_COMPANY_INFO_TEXT_WIDTH, 2, FLORIST_SENTENCE_FONT, FLORIST_SENTENCE_COLOR, sFloristText[ FLORIST_STREET_ADDRESS ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
DisplayWrappedString(FLORIST_COMPANY_INFO_TEXT_X, FLORIST_COMPANY_INFO_LINE_4_Y, FLORIST_COMPANY_INFO_TEXT_WIDTH, 2, FLORIST_SENTENCE_FONT, FLORIST_SENTENCE_COLOR, sFloristText[ FLORIST_WWW_ADDRESS ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
|
||||
usPosY = FLORIST_FIRST_BULLET_Y;
|
||||
ubTextCounter = FLORIST_ADVERTISEMENT_1;
|
||||
for( i=0; i<FLORIST_NUMBER_OF_BULLETS; i++)
|
||||
{
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, FLORIST_FIRST_BULLET_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
DisplayWrappedString(FLORIST_FIRST_SENTENCE_COLUMN_TEXT_X, (UINT16)(usPosY+20), FLORIST_FIRST_SENTENCE_COLUMN_TEXT_WIDTH, 2, FLORIST_SENTENCE_FONT, FLORIST_SENTENCE_COLOR, sFloristText[ubTextCounter], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
ubTextCounter++;
|
||||
|
||||
DisplayWrappedString(FLORIST_SECOND_SENTENCE_COLUMN_TEXT_X, (UINT16)(usPosY+15), FLORIST_SECOND_SENTENCE_COLUMN_TEXT_WIDTH, 2, FLORIST_SENTENCE_FONT, FLORIST_SENTENCE_COLOR, sFloristText[ubTextCounter], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
ubTextCounter++;
|
||||
|
||||
usPosY += FLORIST_BULLET_OFFSET_Y;
|
||||
}
|
||||
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_UL_Y);
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN InitFloristDefaults()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
// load the Florist background graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\leafback.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiFloristBackground));
|
||||
|
||||
//if its the first page
|
||||
if( guiCurrentLaptopMode == LAPTOP_MODE_FLORIST )
|
||||
{
|
||||
// load the small title graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_LARGEFLORISTSYMBOL );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiLargeTitleSymbol));
|
||||
}
|
||||
else
|
||||
{
|
||||
// load the leaf back graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_SMALLFLORISTSYMBOL );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiSmallTitleSymbol));
|
||||
|
||||
|
||||
//flower title homepage link
|
||||
MSYS_DefineRegion( &gSelectedFloristTitleHomeLinkRegion, FLORIST_SMALL_TITLE_X, FLORIST_SMALL_TITLE_Y, (UINT16)(FLORIST_SMALL_TITLE_X + FLORIST_SMALL_TITLE_WIDTH), (UINT16)(FLORIST_SMALL_TITLE_Y + FLORIST_SMALL_TITLE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectFloristTitleHomeLinkRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedFloristTitleHomeLinkRegion);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void DisplayFloristDefaults()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
WebPageTileBackground(4, 4, FLORIST_BACKGROUND_WIDTH, FLORIST_BACKGROUND_HEIGHT, guiFloristBackground);
|
||||
|
||||
//if its the first page
|
||||
if( guiCurrentLaptopMode == LAPTOP_MODE_FLORIST )
|
||||
{
|
||||
gfHomePageActive = TRUE;
|
||||
GetVideoObject(&hPixHandle, guiLargeTitleSymbol);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FLORIST_BIG_TITLE_X, FLORIST_BIG_TITLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfHomePageActive = FALSE;
|
||||
GetVideoObject(&hPixHandle, guiSmallTitleSymbol);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FLORIST_SMALL_TITLE_X, FLORIST_SMALL_TITLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveFloristDefaults()
|
||||
{
|
||||
DeleteVideoObjectFromIndex( guiFloristBackground );
|
||||
|
||||
//if its the first page
|
||||
if( gfHomePageActive )
|
||||
{
|
||||
//delete the big title
|
||||
DeleteVideoObjectFromIndex( guiLargeTitleSymbol );
|
||||
}
|
||||
else
|
||||
{
|
||||
//delete the little title
|
||||
DeleteVideoObjectFromIndex( guiSmallTitleSymbol );
|
||||
|
||||
MSYS_RemoveRegion( &gSelectedFloristTitleHomeLinkRegion );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BtnGalleryButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_FLORIST_FLOWER_GALLERY;
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
}
|
||||
}
|
||||
|
||||
void SelectFloristTitleHomeLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_FLORIST;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef __FLORIST_H
|
||||
#define __FLORIST_H
|
||||
|
||||
|
||||
|
||||
#define FLORIST_BUTTON_TEXT_FONT FONT14ARIAL
|
||||
#define FLORIST_BUTTON_TEXT_UP_COLOR 2
|
||||
#define FLORIST_BUTTON_TEXT_DOWN_COLOR 2
|
||||
#define FLORIST_BUTTON_TEXT_SHADOW_COLOR 128
|
||||
|
||||
|
||||
|
||||
|
||||
void GameInitFlorist();
|
||||
BOOLEAN EnterFlorist();
|
||||
void ExitFlorist();
|
||||
void HandleFlorist();
|
||||
void RenderFlorist();
|
||||
|
||||
void RemoveFloristDefaults();
|
||||
void DisplayFloristDefaults();
|
||||
BOOLEAN InitFloristDefaults();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,355 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "laptop.h"
|
||||
#include "funeral.h"
|
||||
#include "WCheck.h"
|
||||
#include "Utilities.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Cursors.h"
|
||||
#include "Text.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define FUNERAL_SENTENCE_FONT FONT12ARIAL
|
||||
#define FUNERAL_SENTENCE_COLOR 2//FONT_MCOLOR_WHITE
|
||||
#define FUNERAL_SENTENCE_SHADOW_COLOR FONT_MCOLOR_WHITE//FONT_MCOLOR_DKWHITE
|
||||
|
||||
#define FUNERAL_SMALL_FONT FONT10ARIAL
|
||||
|
||||
#define FUNERAL_TITLE_FONT FONT14ARIAL
|
||||
#define FUNERAL_TITLE_COLOR FONT_MCOLOR_WHITE
|
||||
#define FUNERAL_TITLE_SHADOW_COLOR FONT_MCOLOR_DKWHITE
|
||||
|
||||
#define FUNERAL_RIP_SHADOW_COLOR FONT_MCOLOR_DKWHITE
|
||||
|
||||
|
||||
#define FUNERAL_MCGILICUTTYS_SIGN_X LAPTOP_SCREEN_UL_X + 92
|
||||
#define FUNERAL_MCGILICUTTYS_SIGN_Y LAPTOP_SCREEN_WEB_UL_Y + 0
|
||||
|
||||
#define FUNERAL_MORTUARY_SIGN_X LAPTOP_SCREEN_UL_X + 58
|
||||
#define FUNERAL_MORTUARY_SIGN_Y LAPTOP_SCREEN_WEB_UL_Y + 43
|
||||
|
||||
#define FUNERAL_LEFT_COLUMN_X LAPTOP_SCREEN_UL_X + 0
|
||||
#define FUNERAL_LEFT_COLUMN_Y LAPTOP_SCREEN_WEB_UL_Y + 43
|
||||
|
||||
#define FUNERAL_RIGHT_COLUMN_X LAPTOP_SCREEN_UL_X + 442
|
||||
#define FUNERAL_RIGHT_COLUMN_Y LAPTOP_SCREEN_WEB_UL_Y + 43
|
||||
|
||||
#define FUNERAL_LINK_1_X LAPTOP_SCREEN_UL_X + 37
|
||||
#define FUNERAL_LINK_1_Y LAPTOP_SCREEN_WEB_UL_Y + 329
|
||||
#define FUNERAL_LINK_1_WIDTH 85
|
||||
#define FUNERAL_LINK_1_HEIGHT 60
|
||||
|
||||
#define FUNERAL_LINK_OFFSET_X 85
|
||||
#define FUNERAL_NUMBER_OF_LINKS 5
|
||||
|
||||
#define FUNERAL_LINK_TEXT_OFFSET_X 4
|
||||
#define FUNERAL_LINK_TEXT_OFFSET_Y 17
|
||||
#define FUNERAL_LINK_TEXT_WIDTH 76
|
||||
|
||||
|
||||
#define FUNERAL_MARBLE_WIDTH 125
|
||||
#define FUNERAL_MARBLE_HEIGHT 100
|
||||
|
||||
#define FUNERAL_SENTENCE_WIDTH 380
|
||||
|
||||
#define FUNERAL_SENTENCE_1_X LAPTOP_SCREEN_UL_X + 60
|
||||
#define FUNERAL_SENTENCE_1_Y LAPTOP_SCREEN_WEB_UL_Y + 164
|
||||
|
||||
#define FUNERAL_SENTENCE_2_X FUNERAL_SENTENCE_1_X
|
||||
#define FUNERAL_SENTENCE_2_Y LAPTOP_SCREEN_WEB_UL_Y + 198
|
||||
|
||||
#define FUNERAL_SENTENCE_3_X FUNERAL_SENTENCE_1_X
|
||||
#define FUNERAL_SENTENCE_3_Y LAPTOP_SCREEN_WEB_UL_Y + 227
|
||||
|
||||
#define FUNERAL_SENTENCE_4_X FUNERAL_SENTENCE_1_X
|
||||
#define FUNERAL_SENTENCE_4_Y LAPTOP_SCREEN_WEB_UL_Y + 261
|
||||
|
||||
#define FUNERAL_SENTENCE_5_X FUNERAL_SENTENCE_1_X
|
||||
#define FUNERAL_SENTENCE_5_Y LAPTOP_SCREEN_WEB_UL_Y + 303
|
||||
|
||||
|
||||
#define FUNERAL_CLOSED_RIP_SIGN_X LAPTOP_SCREEN_UL_X + 72
|
||||
#define FUNERAL_CLOSED_RIP_SIGN_Y LAPTOP_SCREEN_WEB_UL_Y + 151
|
||||
#define FUNERAL_CLOSED_WIDTH 364
|
||||
#define FUNERAL_CLOSED_HEIGHT 204
|
||||
|
||||
#define FUNERAL_RIP_SENTENCE_WIDTH 260
|
||||
|
||||
#define FUNERAL_RIP_SENTENCE_1_X FUNERAL_CLOSED_RIP_SIGN_X + 55
|
||||
#define FUNERAL_RIP_SENTENCE_1_Y FUNERAL_CLOSED_RIP_SIGN_Y + 98
|
||||
|
||||
#define FUNERAL_RIP_SENTENCE_2_X FUNERAL_RIP_SENTENCE_1_X
|
||||
#define FUNERAL_RIP_SENTENCE_2_Y FUNERAL_CLOSED_RIP_SIGN_Y + 162
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Image Identifiers
|
||||
UINT32 guiClosedSign;
|
||||
UINT32 guiLeftColumn;
|
||||
UINT32 guiLinkCarving;
|
||||
UINT32 guiMarbleBackground;
|
||||
UINT32 guiMcGillicuttys;
|
||||
UINT32 guiMortuary;
|
||||
UINT32 guiRightColumn;
|
||||
|
||||
|
||||
|
||||
//Clicking on Funeral link
|
||||
MOUSE_REGION gSelectedFuneralLinkRegion[ FUNERAL_NUMBER_OF_LINKS ];
|
||||
void SelectFuneralLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
//Clicking on rip sign to make it disappear
|
||||
MOUSE_REGION gSelectedRipSignRegion;
|
||||
void SelectRipSignRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
|
||||
|
||||
void DisplayFuneralRipTombStone();
|
||||
|
||||
|
||||
|
||||
void GameInitFuneral()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN EnterFuneral()
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT16 usPosX, i;
|
||||
|
||||
// load the Closed graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_CLOSED );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiClosedSign));
|
||||
|
||||
// load the Left column graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\LeftColumn.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiLeftColumn));
|
||||
|
||||
// load the Link carving graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\LinkCarving.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiLinkCarving));
|
||||
|
||||
// load the Marble graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\Marble.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMarbleBackground));
|
||||
|
||||
// load the McGillicuttys sign graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_MCGILLICUTTYS );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMcGillicuttys));
|
||||
|
||||
// load the Mortuary graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
GetMLGFilename( VObjectDesc.ImageFile, MLG_MORTUARY );
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMortuary));
|
||||
|
||||
// load the right column graphic and add it
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("LAPTOP\\RightColumn.sti", VObjectDesc.ImageFile);
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiRightColumn));
|
||||
|
||||
|
||||
usPosX = FUNERAL_LINK_1_X;
|
||||
for(i=0; i<FUNERAL_NUMBER_OF_LINKS; i++)
|
||||
{
|
||||
//Mouse region for the bottom links
|
||||
|
||||
MSYS_DefineRegion( &gSelectedFuneralLinkRegion[i], usPosX, FUNERAL_LINK_1_Y, (UINT16)(usPosX + FUNERAL_LINK_1_WIDTH), (UINT16)(FUNERAL_LINK_1_Y + FUNERAL_LINK_1_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectFuneralLinkRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedFuneralLinkRegion[i]);
|
||||
MSYS_SetRegionUserData( &gSelectedFuneralLinkRegion[i], 0, i );
|
||||
|
||||
usPosX += FUNERAL_LINK_OFFSET_X;
|
||||
}
|
||||
|
||||
MSYS_DefineRegion( &gSelectedRipSignRegion, FUNERAL_CLOSED_RIP_SIGN_X, FUNERAL_CLOSED_RIP_SIGN_Y, (UINT16)(FUNERAL_CLOSED_RIP_SIGN_X + FUNERAL_CLOSED_WIDTH), (UINT16)(FUNERAL_CLOSED_RIP_SIGN_Y + FUNERAL_CLOSED_HEIGHT), MSYS_PRIORITY_HIGH+1,
|
||||
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectRipSignRegionCallBack );
|
||||
MSYS_AddRegion(&gSelectedRipSignRegion);
|
||||
MSYS_DisableRegion(&gSelectedRipSignRegion);
|
||||
|
||||
|
||||
SetBookMark( FUNERAL_BOOKMARK );
|
||||
|
||||
return( TRUE );
|
||||
|
||||
}
|
||||
|
||||
void ExitFuneral()
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
DeleteVideoObjectFromIndex(guiClosedSign);
|
||||
DeleteVideoObjectFromIndex(guiLeftColumn);
|
||||
DeleteVideoObjectFromIndex(guiLinkCarving);
|
||||
DeleteVideoObjectFromIndex(guiMarbleBackground);
|
||||
DeleteVideoObjectFromIndex(guiMcGillicuttys);
|
||||
DeleteVideoObjectFromIndex(guiMortuary);
|
||||
DeleteVideoObjectFromIndex(guiRightColumn);
|
||||
|
||||
for(i=0; i<FUNERAL_NUMBER_OF_LINKS; i++)
|
||||
{
|
||||
MSYS_RemoveRegion( &gSelectedFuneralLinkRegion[i]);
|
||||
}
|
||||
|
||||
MSYS_RemoveRegion( &gSelectedRipSignRegion );
|
||||
}
|
||||
|
||||
void HandleFuneral()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RenderFuneral()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 i, usPosX, usStringHeight;
|
||||
|
||||
WebPageTileBackground(4, 4, FUNERAL_MARBLE_WIDTH, FUNERAL_MARBLE_HEIGHT, guiMarbleBackground);
|
||||
|
||||
// LeftColumn
|
||||
GetVideoObject(&hPixHandle, guiLeftColumn);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FUNERAL_LEFT_COLUMN_X, FUNERAL_LEFT_COLUMN_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Mcgillicuttys
|
||||
GetVideoObject(&hPixHandle, guiMcGillicuttys);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FUNERAL_MCGILICUTTYS_SIGN_X, FUNERAL_MCGILICUTTYS_SIGN_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// Mortuary
|
||||
GetVideoObject(&hPixHandle, guiMortuary);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FUNERAL_MORTUARY_SIGN_X, FUNERAL_MORTUARY_SIGN_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
// right column
|
||||
GetVideoObject(&hPixHandle, guiRightColumn);
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FUNERAL_RIGHT_COLUMN_X, FUNERAL_RIGHT_COLUMN_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
|
||||
// LinkCarving
|
||||
GetVideoObject(&hPixHandle, guiLinkCarving);
|
||||
|
||||
usPosX = FUNERAL_LINK_1_X;
|
||||
for(i=0; i<FUNERAL_NUMBER_OF_LINKS; i++)
|
||||
{
|
||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,usPosX, FUNERAL_LINK_1_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
//Calculate the height of the string, as it needs to be vertically centered.
|
||||
usStringHeight = IanWrappedStringHeight( 0, 0, FUNERAL_LINK_TEXT_WIDTH, 2,
|
||||
FUNERAL_SENTENCE_FONT, 0, sFuneralString[i+FUNERAL_SEND_FLOWERS],
|
||||
0, 0, 0 );
|
||||
DisplayWrappedString( (UINT16)(usPosX+FUNERAL_LINK_TEXT_OFFSET_X), (UINT16)(FUNERAL_LINK_1_Y + (FUNERAL_LINK_1_HEIGHT - usStringHeight) / 2), FUNERAL_LINK_TEXT_WIDTH, 2, FUNERAL_SENTENCE_FONT, FUNERAL_TITLE_COLOR, sFuneralString[i+FUNERAL_SEND_FLOWERS], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
|
||||
usPosX += FUNERAL_LINK_OFFSET_X;
|
||||
}
|
||||
|
||||
//display all the sentences
|
||||
|
||||
// sentence 1
|
||||
DisplayWrappedString(FUNERAL_SENTENCE_1_X, FUNERAL_SENTENCE_1_Y, FUNERAL_SENTENCE_WIDTH, 2, FUNERAL_TITLE_FONT, FUNERAL_TITLE_COLOR, sFuneralString[FUNERAL_INTRO_1], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
SetFontShadow( FUNERAL_SENTENCE_SHADOW_COLOR );
|
||||
|
||||
// sentence 2
|
||||
DisplayWrappedString(FUNERAL_SENTENCE_2_X, FUNERAL_SENTENCE_2_Y, FUNERAL_SENTENCE_WIDTH, 2, FUNERAL_SENTENCE_FONT, FUNERAL_SENTENCE_COLOR, sFuneralString[FUNERAL_INTRO_2], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
// sentence 3
|
||||
DisplayWrappedString(FUNERAL_SENTENCE_3_X, FUNERAL_SENTENCE_3_Y, FUNERAL_SENTENCE_WIDTH, 2, FUNERAL_SENTENCE_FONT, FUNERAL_SENTENCE_COLOR, sFuneralString[FUNERAL_INTRO_3], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
// sentence 4
|
||||
DisplayWrappedString(FUNERAL_SENTENCE_4_X, FUNERAL_SENTENCE_4_Y, FUNERAL_SENTENCE_WIDTH, 2, FUNERAL_SENTENCE_FONT, FUNERAL_SENTENCE_COLOR, sFuneralString[FUNERAL_INTRO_4], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
// sentence 5
|
||||
DisplayWrappedString(FUNERAL_SENTENCE_5_X, FUNERAL_SENTENCE_5_Y, FUNERAL_SENTENCE_WIDTH, 2, FUNERAL_SENTENCE_FONT, FUNERAL_SENTENCE_COLOR, sFuneralString[FUNERAL_INTRO_5], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
|
||||
|
||||
MarkButtonsDirty( );
|
||||
RenderWWWProgramTitleBar( );
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
}
|
||||
|
||||
|
||||
void DisplayFuneralRipTombStone()
|
||||
{
|
||||
HVOBJECT hPixHandle;
|
||||
|
||||
// rip tombstone
|
||||
GetVideoObject(&hPixHandle, guiClosedSign);
|
||||
BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, guiClosedSign, 0, FUNERAL_CLOSED_RIP_SIGN_X+5, FUNERAL_CLOSED_RIP_SIGN_Y+5);
|
||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0,FUNERAL_CLOSED_RIP_SIGN_X, FUNERAL_CLOSED_RIP_SIGN_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||
|
||||
SetFontShadow( FUNERAL_RIP_SHADOW_COLOR );
|
||||
|
||||
// sentence 10
|
||||
DisplayWrappedString(FUNERAL_RIP_SENTENCE_1_X, FUNERAL_RIP_SENTENCE_1_Y, FUNERAL_RIP_SENTENCE_WIDTH, 2, FUNERAL_SMALL_FONT, FUNERAL_SENTENCE_COLOR, sFuneralString[FUNERAL_OUR_CONDOLENCES], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);//FUNERAL_TITLE_FONT
|
||||
|
||||
// sentence 11
|
||||
DisplayWrappedString(FUNERAL_RIP_SENTENCE_2_X, FUNERAL_RIP_SENTENCE_2_Y, FUNERAL_RIP_SENTENCE_WIDTH, 2, FUNERAL_SMALL_FONT, FUNERAL_SENTENCE_COLOR, sFuneralString[FUNERAL_OUR_SYMPATHIES], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
|
||||
InvalidateRegion(FUNERAL_CLOSED_RIP_SIGN_X,FUNERAL_CLOSED_RIP_SIGN_Y, FUNERAL_CLOSED_RIP_SIGN_X+FUNERAL_CLOSED_WIDTH+5, FUNERAL_CLOSED_RIP_SIGN_Y+FUNERAL_CLOSED_HEIGHT+5);
|
||||
|
||||
//enable the region to make the sign disappear
|
||||
MSYS_EnableRegion(&gSelectedRipSignRegion);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SelectFuneralLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
UINT32 uiUserData;
|
||||
|
||||
uiUserData = MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
if( uiUserData == 0 )
|
||||
GoToWebPage( FLORIST_BOOKMARK );
|
||||
else
|
||||
{
|
||||
RenderFuneral();
|
||||
DisplayFuneralRipTombStone();
|
||||
}
|
||||
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void SelectRipSignRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
MSYS_DisableRegion(&gSelectedRipSignRegion);
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __FUNERAL_H
|
||||
#define __FUNERAL_H
|
||||
|
||||
void GameInitFuneral();
|
||||
BOOLEAN EnterFuneral();
|
||||
void ExitFuneral();
|
||||
void HandleFuneral();
|
||||
void RenderFuneral();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user