Merged New Inventory Project into main branch

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2008-03-08 15:15:25 +00:00
parent e16d166277
commit 43ca24dda8
649 changed files with 93359 additions and 82507 deletions
+27 -26
View File
@@ -100,11 +100,11 @@ UINT32 guiRightColumn;
//Clicking on Funeral link
MOUSE_REGION gSelectedFuneralLinkRegion[ FUNERAL_NUMBER_OF_LINKS ];
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;
MOUSE_REGION gSelectedRipSignRegion;
void SelectRipSignRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
@@ -120,7 +120,7 @@ void GameInitFuneral()
BOOLEAN EnterFuneral()
{
VOBJECT_DESC VObjectDesc;
VOBJECT_DESC VObjectDesc;
UINT16 usPosX, i;
// load the Closed graphic and add it
@@ -148,7 +148,7 @@ BOOLEAN EnterFuneral()
GetMLGFilename( VObjectDesc.ImageFile, MLG_MCGILLICUTTYS );
CHECKF(AddVideoObject(&VObjectDesc, &guiMcGillicuttys));
// load the Mortuary graphic and add it
// load the Mortuary graphic and add it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
GetMLGFilename( VObjectDesc.ImageFile, MLG_MORTUARY );
CHECKF(AddVideoObject(&VObjectDesc, &guiMortuary));
@@ -165,17 +165,17 @@ BOOLEAN EnterFuneral()
//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 );
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);
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectRipSignRegionCallBack );
MSYS_AddRegion(&gSelectedRipSignRegion);
MSYS_DisableRegion(&gSelectedRipSignRegion);
SetBookMark( FUNERAL_BOOKMARK );
@@ -198,7 +198,7 @@ void ExitFuneral()
for(i=0; i<FUNERAL_NUMBER_OF_LINKS; i++)
{
MSYS_RemoveRegion( &gSelectedFuneralLinkRegion[i]);
MSYS_RemoveRegion( &gSelectedFuneralLinkRegion[i]);
}
MSYS_RemoveRegion( &gSelectedRipSignRegion );
@@ -211,7 +211,7 @@ void HandleFuneral()
void RenderFuneral()
{
HVOBJECT hPixHandle;
HVOBJECT hPixHandle;
UINT16 i, usPosX, usStringHeight;
WebPageTileBackground(4, 4, FUNERAL_MARBLE_WIDTH, FUNERAL_MARBLE_HEIGHT, guiMarbleBackground);
@@ -242,9 +242,9 @@ void RenderFuneral()
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 );
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);
@@ -273,15 +273,15 @@ void RenderFuneral()
SetFontShadow(DEFAULT_SHADOW);
MarkButtonsDirty( );
MarkButtonsDirty( );
RenderWWWProgramTitleBar( );
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
}
void DisplayFuneralRipTombStone()
{
HVOBJECT hPixHandle;
HVOBJECT hPixHandle;
// rip tombstone
GetVideoObject(&hPixHandle, guiClosedSign);
@@ -298,16 +298,16 @@ void DisplayFuneralRipTombStone()
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);
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);
MSYS_EnableRegion(&gSelectedRipSignRegion);
}
void SelectFuneralLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
@@ -329,27 +329,28 @@ void SelectFuneralLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
}
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);
MSYS_DisableRegion(&gSelectedRipSignRegion);
fPausedReDrawScreenFlag = TRUE;
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
}