New feature: Diseaes affect your mercenaries. They can be contracted in varíous ways and have varying effects.

For more info, see http://www.ja-galaxy-forum.com/ubbthreads.php/topics/334918#Post334918

Requires GameDir >= r2099.

Does not break savegame compatibility.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-08-10 13:45:11 +00:00
parent 09244c2369
commit 36e9d15edc
96 changed files with 5569 additions and 1573 deletions
+2 -32
View File
@@ -22,45 +22,15 @@
#endif
#define CAMPAIGN_HISTORY_BACKGROUND_WIDTH 125
#define BACKGROUND_WIDTH 125
#define CAMPAIGN_HISTORY_BACKGROUND_HEIGHT 100
#define CAMPAIGN_HISTORY_BIG_TITLE_X 115 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_BIG_TITLE_Y 10 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_RED_BAR_X LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_RED_BAR_Y LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_TOP_RED_BAR_X LAPTOP_SCREEN_UL_X + 66
#define CAMPAIGN_HISTORY_TOP_RED_BAR_Y 109 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_TOP_RED_BAR_Y1 31 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_RED_BAR_Y 345 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X 77 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_Y 392 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_WIDTH 107
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_OFFSET 148
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X_2 CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X + CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_OFFSET
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X_3 CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X_2 + CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_OFFSET
#define CAMPAIGN_HISTORY_SUBTITLE_X CAMPAIGN_HISTORY_BIG_TITLE_X
#define CAMPAIGN_HISTORY_SUBTITLE_Y CAMPAIGN_HISTORY_BIG_TITLE_Y + 20
#define CAMPAIGN_HISTORY_BULLET_TEXT_1_Y 188 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BULLET_TEXT_2_Y 215 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BULLET_TEXT_3_Y 242 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_SLOGAN_X CAMPAIGN_HISTORY_SUBTITLE_X
#define CAMPAIGN_HISTORY_BOTTOM_SLOGAN_Y 285 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_SLOGAN_WIDTH 370
#define CAMPAIGN_HISTORY_SMALL_TITLE_X 64 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_SMALL_TITLE_Y 5 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_SMALL_TITLE_WIDTH 434 - 170
#define CAMPAIGN_HISTORY_SMALL_TITLE_HEIGHT 40 - 10
extern UINT32 guiInsuranceBackGround;
extern UINT32 guiInsuranceSmallTitleImage;
@@ -203,7 +173,7 @@ void DisplayCampaignHistoryDefaults()
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
WebPageTileBackground(4, 4, CAMPAIGN_HISTORY_BACKGROUND_WIDTH, CAMPAIGN_HISTORY_BACKGROUND_HEIGHT, guiInsuranceBackGround);
WebPageTileBackground( 4, 4, BACKGROUND_WIDTH, CAMPAIGN_HISTORY_BACKGROUND_HEIGHT, guiInsuranceBackGround );
//Display the title slogan
GetCampaignHistoryText( TEXT_CAMPAIGNHISTORY_NAME_PRESSORGANISATION, sText );
+6 -19
View File
@@ -6,26 +6,13 @@
* @author Flugente (bears-pit.com)
*/
//#include "insurance.h"
#define CAMPHIS_FONT_COLOR 2
#define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED
#define CAMPHIS_FONT_BIG FONT14ARIAL
#define CAMPHIS_FONT_MED FONT12ARIAL
#define CAMPHIS_FONT_SMALL FONT10ARIAL
#define CAMPHIS_FONT_COLOR 2
#define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED
#define CAMPHIS_FONT_BIG FONT14ARIAL
#define CAMPHIS_FONT_MED FONT12ARIAL
#define CAMPHIS_FONT_SMALL FONT10ARIAL
#define CAMPHIS_FONT_BTN_COLOR FONT_MCOLOR_WHITE
#define CAMPHIS_FONT_BTN_SHADOW_COLOR 2
#define CAMPHIS_FONT_SHADOW FONT_MCOLOR_WHITE
#define CAMPAIGN_HISTORY_BULLET_TEXT_OFFSET_X 21
#define CAMPHIS_INFO_LEFT_ARROW_BUTTON_X 71 + LAPTOP_SCREEN_UL_X
#define CAMPHIS_INFO_LEFT_ARROW_BUTTON_Y 354 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPHIS_INFO_RIGHT_ARROW_BUTTON_X 409 + LAPTOP_SCREEN_UL_X
#define CAMPHIS_INFO_RIGHT_ARROW_BUTTON_Y CAMPHIS_INFO_LEFT_ARROW_BUTTON_Y
#define CAMPHIS_FONT_SHADOW FONT_MCOLOR_WHITE
#define CAMPAIGN_HISTORY_LINK_START_X LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_LINK_START_Y LAPTOP_SCREEN_WEB_UL_Y + 5
-2
View File
@@ -168,11 +168,9 @@ Incident_Stats::AddStat( SOLDIERTYPE* pSoldier, UINT8 aType )
break;
case CREATURE_TEAM:
#ifdef ENABLE_ZOMBIES
if ( pSoldier->IsZombie() )
group = CAMPAIGNHISTORY_SD_ZOMBIE;
else
#endif
group = CAMPAIGNHISTORY_SD_CREATURE;
break;
+1 -1
View File
@@ -494,7 +494,7 @@ void AssignBackgroundHelpText( UINT16 ubNumber, MOUSE_REGION* pMouseregion )
for ( UINT8 i = 0; i < BG_MAX; ++i)
{
if ( BG_DISLIKEBG == i )
if ( BG_DISLIKEBG == i && zBackground[ubNumber].value[i] )
{
swprintf( atStr, szBackgroundText_Value[i] );
wcscat( apStr, atStr );
+8
View File
@@ -666,6 +666,10 @@
RelativePath=".\Store Inventory.h"
>
</File>
<File
RelativePath=".\WHO.h"
>
</File>
</Filter>
<Filter
Name="Source Files"
@@ -976,6 +980,10 @@
RelativePath=".\Store Inventory.cpp"
>
</File>
<File
RelativePath=".\WHO.cpp"
>
</File>
<File
RelativePath=".\XML_AIMAvailability.cpp"
>
+8
View File
@@ -658,6 +658,10 @@
RelativePath="Store Inventory.h"
>
</File>
<File
RelativePath="WHO.h"
>
</File>
</Filter>
<Filter
Name="Source Files"
@@ -962,6 +966,10 @@
RelativePath="Store Inventory.cpp"
>
</File>
<File
RelativePath="WHO.cpp"
>
</File>
<File
RelativePath=".\XML_AIMAvailability.cpp"
>
+2
View File
@@ -105,6 +105,7 @@
<ClInclude Include="sirtech.h" />
<ClInclude Include="Speck Quotes.h" />
<ClInclude Include="Store Inventory.h" />
<ClInclude Include="WHO.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="aim.cpp" />
@@ -184,6 +185,7 @@
<ClCompile Include="PostalService.cpp" />
<ClCompile Include="sirtech.cpp" />
<ClCompile Include="Store Inventory.cpp" />
<ClCompile Include="WHO.cpp" />
<ClCompile Include="XML_AIMAvailability.cpp" />
<ClCompile Include="XML_BriefingRoom.cpp" />
<ClCompile Include="XML_CampaignStatsEvents.cpp" />
+6
View File
@@ -213,6 +213,9 @@
<ClInclude Include="Store Inventory.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="WHO.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BriefingRoom.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -449,6 +452,9 @@
<ClCompile Include="Store Inventory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="WHO.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_DeliveryMethods.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+2
View File
@@ -105,6 +105,7 @@
<ClInclude Include="sirtech.h" />
<ClInclude Include="Speck Quotes.h" />
<ClInclude Include="Store Inventory.h" />
<ClInclude Include="WHO.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="aim.cpp" />
@@ -184,6 +185,7 @@
<ClCompile Include="PostalService.cpp" />
<ClCompile Include="sirtech.cpp" />
<ClCompile Include="Store Inventory.cpp" />
<ClCompile Include="WHO.cpp" />
<ClCompile Include="XML_AIMAvailability.cpp" />
<ClCompile Include="XML_BriefingRoom.cpp" />
<ClCompile Include="XML_CampaignStatsEvents.cpp" />
+6
View File
@@ -255,6 +255,9 @@
<ClInclude Include="DynamicDialogueWidget.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="WHO.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="aim.cpp">
@@ -521,5 +524,8 @@
<ClCompile Include="DynamicDialogueWidget.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="WHO.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+396
View File
@@ -0,0 +1,396 @@
/**
* @file
* @author Flugente (bears-pit.com)
*/
#ifdef PRECOMPILEDHEADERS
#include "Laptop All.h"
#else
#include "laptop.h"
#include "insurance.h"
#include "insurance Contract.h"
#include "WCheck.h"
#include "Utilities.h"
#include "WordWrap.h"
#include "Cursors.h"
#include "Line.h"
#include "Insurance Text.h"
#include "Encrypted File.h"
#include "Text.h"
#include "Multi Language Graphic Utils.h"
#include "WHO.h"
#include "random.h"
#include "Interface.h"
#include "Soldier Add.h"
#include "Soldier Profile.h"
#include "DropDown.h"
#include "Overhead.h"
#include "Map Screen Interface.h"
#include "Quests.h"
#include "finances.h"
#include "Game Clock.h"
#endif
#define MERCOMP_FONT_COLOR 2
#define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED
#define CAMPHIS_FONT_BIG FONT14ARIAL
#define CAMPHIS_FONT_MED FONT12ARIAL
#define CAMPHIS_FONT_SMALL FONT10ARIAL
#define MERCOMP_FONT_SHADOW FONT_MCOLOR_WHITE
#define CAMPAIGN_HISTORY_LINK_START_X LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_LINK_START_Y LAPTOP_SCREEN_WEB_UL_Y + 5
#define CAMPAIGN_HISTORY_LINK_TEXT_WIDTH 107
#define CAMPAIGN_HISTORY_LINK_STEP_Y 14
#define BACKGROUND_WIDTH 125
#define CAMPAIGN_HISTORY_BACKGROUND_HEIGHT 100
#define CAMPAIGN_HISTORY_BIG_TITLE_X 115 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_BIG_TITLE_Y 10 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_SUBTITLE_X CAMPAIGN_HISTORY_BIG_TITLE_X
#define CAMPAIGN_HISTORY_SUBTITLE_Y CAMPAIGN_HISTORY_BIG_TITLE_Y + 20
#define NUM_LINKS 3
#define MCA_START_CONTENT_Y (LAPTOP_SCREEN_WEB_UL_Y + NUM_LINKS * 17)
extern UINT32 guiInsuranceBackGround;
extern UINT32 guiInsuranceSmallTitleImage;
extern UINT32 guiInsuranceBigRedLineImage;
extern UINT32 guiMercCompareBulletImage;
extern UINT32 guiMercCompareLogoImage;
//link to the various pages
MOUSE_REGION gLinkRegion_WHO[NUM_LINKS];
void SelectLinkRegionCallBack_WHO( MOUSE_REGION * pRegion, INT32 iReason )
{
if ( iReason & MSYS_CALLBACK_REASON_INIT )
{
}
else if ( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
UINT32 uiLink = MSYS_GetRegionUserData( pRegion, 0 );
if ( uiLink == 0 )
guiCurrentLaptopMode = LAPTOP_MODE_WHO_MAIN;
else if ( uiLink == 1 )
guiCurrentLaptopMode = LAPTOP_MODE_WHO_CONTRACT;
else if ( uiLink == 2 )
guiCurrentLaptopMode = LAPTOP_MODE_WHO_TIPS;
}
else if ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP )
{
}
}
void InitDefaults_WHO( )
{
VOBJECT_DESC VObjectDesc;
// load the Insurance bullet graphic and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\bullet.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiMercCompareBulletImage ) );
// load the Flower Account Box graphic and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\BackGroundTile.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiInsuranceBackGround ) );
// load the red bar on the side of the page and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\LargeBar.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiInsuranceBigRedLineImage ) );
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\PressLogos.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiMercCompareLogoImage ) );
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
for ( int i = 0; i<NUM_LINKS; ++i )
{
MSYS_DefineRegion( &gLinkRegion_WHO[i], usPosX, usPosY, (UINT16)(usPosX + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH), usPosY + CAMPAIGN_HISTORY_LINK_STEP_Y, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack_WHO );
MSYS_AddRegion( &gLinkRegion_WHO[i] );
MSYS_SetRegionUserData( &gLinkRegion_WHO[i], 0, i );
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
}
}
void DisplayDefaults_WHO( )
{
HVOBJECT hPixHandle;
GetVideoObject( &hPixHandle, guiMercCompareLogoImage );
SetFontShadow( MERCOMP_FONT_SHADOW );
CHAR16 sText[800];
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
WebPageTileBackground( 4, 4, BACKGROUND_WIDTH, CAMPAIGN_HISTORY_BACKGROUND_HEIGHT, guiInsuranceBackGround );
//Display the title slogan
swprintf( sText, szWHOWebSite[TEXT_WHO_WEBSITENAME] );
DrawTextToScreen( sText, CAMPAIGN_HISTORY_BIG_TITLE_X, CAMPAIGN_HISTORY_BIG_TITLE_Y, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, CAMPHIS_FONT_BIG, MERCOMP_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, 0 );
//Display the subtitle slogan
swprintf( sText, szWHOWebSite[TEXT_WHO_SLOGAN] );
DrawTextToScreen( sText, CAMPAIGN_HISTORY_SUBTITLE_X, CAMPAIGN_HISTORY_SUBTITLE_Y, 0, CAMPHIS_FONT_BIG, MERCOMP_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosX = CAMPAIGN_HISTORY_LINK_START_X;
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
for ( int i = 0; i<NUM_LINKS; ++i )
{
swprintf( sText, szWHOWebSite[TEXT_WHO_SUBSITE1 + i] );
DisplayWrappedString( usPosX, usPosY, CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
//Display the red bar under the link at the bottom. and the text
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_UL_X + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, usPosY - 2, FROMRGB( 0, 30, 180 ) );
}
// closing line that separates header from individual page
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_LR_X, usPosY - 2, FROMRGB( 0, 30, 180 ) );
usPosX = LAPTOP_SCREEN_LR_X - 110;
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
BltVideoObject( FRAME_BUFFER, hPixHandle, 2, usPosX, usPosY, VO_BLT_SRCTRANSPARENCY, NULL );
SetFontShadow( DEFAULT_SHADOW );
}
void RemoveDefaults_WHO( )
{
DeleteVideoObjectFromIndex( guiInsuranceBackGround );
DeleteVideoObjectFromIndex( guiInsuranceBigRedLineImage );
DeleteVideoObjectFromIndex( guiMercCompareBulletImage );
DeleteVideoObjectFromIndex( guiMercCompareLogoImage );
for ( int i = 0; i<NUM_LINKS; ++i )
MSYS_RemoveRegion( &gLinkRegion_WHO[i] );
}
////////////////////////// MAIN PAGE ////////////////////////////////
BOOLEAN EnterWHOMain( )
{
InitDefaults_WHO( );
RenderWHOMain( );
return(TRUE);
}
void ExitWHOMain( )
{
RemoveDefaults_WHO( );
}
void HandleWHOMain( )
{
}
void RenderWHOMain( )
{
CHAR16 sText[800];
swprintf( sText, L"" );
UINT16 usPosX, usPosY;
DisplayDefaults_WHO( );
SetFontShadow( MERCOMP_FONT_SHADOW );
usPosX = LAPTOP_SCREEN_UL_X;
usPosY = MCA_START_CONTENT_Y;
for ( int i = TEXT_WHO_MAIN1; i < TEXT_WHO_CONTRACT1; ++i )
{
swprintf( sText, szWHOWebSite[i] );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += 10;
}
SetFontShadow( DEFAULT_SHADOW );
MarkButtonsDirty( );
RenderWWWProgramTitleBar( );
InvalidateRegion( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y );
}
////////////////////////// MAIN PAGE ////////////////////////////////
////////////////////////// CONTRACT PAGE ////////////////////////////////
MOUSE_REGION gLinkRegion_WHO_Contract;
BOOLEAN gLinkRegionDefined = FALSE;
void SelectLinkRegionCallBack_WHO_Contract( MOUSE_REGION * pRegion, INT32 iReason )
{
if ( iReason & MSYS_CALLBACK_REASON_INIT )
{
}
else if ( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
gubFact[FACT_DISEASE_WHODATA_SUBSCRIBED] = !gubFact[FACT_DISEASE_WHODATA_SUBSCRIBED];
// if we've just subscribed, set data
if ( gubFact[FACT_DISEASE_WHODATA_SUBSCRIBED] && !gubFact[FACT_DISEASE_WHODATA_ACCESS] )
{
gubFact[FACT_DISEASE_WHODATA_ACCESS] = TRUE;
AddTransactionToPlayersBook( WHO_SUBSCRIPTION, 0, GetWorldTotalMin( ), (-1) * (INT32)gGameExternalOptions.sDiseaseWHOSubscriptionCost );
}
RenderWHOContract( );
}
else if ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP )
{
}
}
BOOLEAN EnterWHOContract( )
{
InitDefaults_WHO( );
RenderWHOContract( );
return(TRUE);
}
void ExitWHOContract( )
{
if ( gLinkRegionDefined )
{
MSYS_RemoveRegion( &gLinkRegion_WHO_Contract );
gLinkRegionDefined = FALSE;
}
RemoveDefaults_WHO( );
}
void HandleWHOContract( )
{
}
void RenderWHOContract( )
{
CHAR16 sText[800];
swprintf( sText, L"" );
UINT16 usPosX, usPosY;
DisplayDefaults_WHO( );
SetFontShadow( MERCOMP_FONT_SHADOW );
usPosX = LAPTOP_SCREEN_UL_X;
usPosY = MCA_START_CONTENT_Y;
swprintf( sText, szWHOWebSite[TEXT_WHO_CONTRACT1] );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
swprintf( sText, szWHOWebSite[TEXT_WHO_CONTRACT1 + 1] );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
swprintf( sText, szWHOWebSite[TEXT_WHO_CONTRACT1 + 2], gGameExternalOptions.sDiseaseWHOSubscriptionCost );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += 10;
swprintf( sText, szWHOWebSite[TEXT_WHO_CONTRACT1 + 3] );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += 10;
if ( gubFact[FACT_DISEASE_WHODATA_SUBSCRIBED] )
swprintf( sText, szWHOWebSite[TEXT_WHO_CONTRACT_ACQUIRED] );
else
swprintf( sText, szWHOWebSite[TEXT_WHO_CONTRACT_ACQUIRED_NOT] );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += 10;
if ( !gLinkRegionDefined )
{
MSYS_DefineRegion( &gLinkRegion_WHO_Contract, usPosX, usPosY, (UINT16)(usPosX + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH), usPosY + CAMPAIGN_HISTORY_LINK_STEP_Y, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack_WHO_Contract );
MSYS_AddRegion( &gLinkRegion_WHO_Contract );
MSYS_SetRegionUserData( &gLinkRegion_WHO_Contract, 0, 1 );
gLinkRegionDefined = TRUE;
}
swprintf( sText, gubFact[FACT_DISEASE_WHODATA_SUBSCRIBED] ? szWHOWebSite[TEXT_WHO_CONTRACT_BUTTON_UNSUBSCRIBE] : szWHOWebSite[TEXT_WHO_CONTRACT_BUTTON_SUBSCRIBE] );
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
//Display the red bar under the link at the bottom. and the text
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_UL_X + 140, usPosY - 2, FROMRGB( 0, 30, 180 ) );
SetFontShadow( DEFAULT_SHADOW );
MarkButtonsDirty( );
RenderWWWProgramTitleBar( );
InvalidateRegion( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y );
}
////////////////////////// CONTRACT PAGE ////////////////////////////////
////////////////////////// HELPFUL TIPS PAGE ////////////////////////////////
BOOLEAN EnterWHOTips( )
{
InitDefaults_WHO( );
RenderWHOTips( );
return(TRUE);
}
void ExitWHOTips( )
{
RemoveDefaults_WHO( );
}
void HandleWHOTips( )
{
}
void RenderWHOTips( )
{
CHAR16 sText[800];
swprintf( sText, L"" );
UINT16 usPosX, usPosY;
HVOBJECT hPixHandle;
//Get the bullet
GetVideoObject( &hPixHandle, guiMercCompareBulletImage );
DisplayDefaults_WHO( );
SetFontShadow( MERCOMP_FONT_SHADOW );
usPosX = LAPTOP_SCREEN_UL_X;
usPosY = MCA_START_CONTENT_Y;
for ( int i = TEXT_WHO_TIPS1; i < TEXT_WHO_MAX; ++i )
{
// display bullet
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, usPosX, usPosY, VO_BLT_SRCTRANSPARENCY, NULL );
swprintf( sText, szWHOWebSite[ i ] );
usPosY += DisplayWrappedString( usPosX + 25, usPosY, LAPTOP_SCREEN_LR_X - (LAPTOP_SCREEN_UL_X + 25), 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
}
SetFontShadow( DEFAULT_SHADOW );
MarkButtonsDirty( );
RenderWWWProgramTitleBar( );
InvalidateRegion( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y );
}
////////////////////////// HELPFUL TIPS PAGE ////////////////////////////////
+27
View File
@@ -0,0 +1,27 @@
#ifndef __WHO_H
#define __WHO_H
/**
* @file
* @author Flugente (bears-pit.com)
*/
// main page (explains what this is all about)
BOOLEAN EnterWHOMain( );
void ExitWHOMain( );
void HandleWHOMain( );
void RenderWHOMain( );
// on this site you can conclude a contract with the WHO to get strategic data on diseases
BOOLEAN EnterWHOContract( );
void ExitWHOContract( );
void HandleWHOContract( );
void RenderWHOContract( );
// this page contains helpful tips on diseases
BOOLEAN EnterWHOTips( );
void ExitWHOTips( );
void HandleWHOTips( );
void RenderWHOTips( );
#endif //__WHO_H
+4
View File
@@ -1591,6 +1591,10 @@ void ProcessTransactionString(STR16 pString, FinanceUnitPtr pFinance)
swprintf(pString, L"%s", pTransactionText[ PRISONER_RANSOM ]);
break;
// Flugente: disease: subscription to WHO data
case WHO_SUBSCRIPTION:
swprintf( pString, L"%s", pTransactionText[WHO_SUBSCRIPTION] );
break;
}
+1
View File
@@ -54,6 +54,7 @@ enum
FACILITY_OPERATIONS, // HEADROCK HAM 3.6: Facility costs (daily payment)
MILITIA_UPKEEP, // HEADROCK HAM 3.6: Militia Upkeep Costs (daily payment)
PRISONER_RANSOM, // Flugente: ransom for released prisoners
WHO_SUBSCRIPTION, // Flugente: subscription do WHO data
TEXT_NUM_FINCANCES
};
+173 -126
View File
@@ -88,6 +88,7 @@
#include "CampaignHistoryMain.h" // added by Flugente
#include "CampaignHistory_Summary.h" // added by Flugente
#include "MercCompare.h" // added by Flugente
#include "WHO.h" // added by Flugente
#endif
#include "connect.h"
@@ -1041,26 +1042,38 @@ INT32 EnterLaptop()
gfShowBookmarks=FALSE;
LoadBookmark( );
if (!is_networked)
SetBookMark(AIM_BOOKMARK);
#ifdef JA2UB
//JA25 UB
SetBookMark(MERC_BOOKMARK);
#endif
if ( gGameExternalOptions.gEncyclopedia && !is_networked )
SetBookMark(ENCYCLOPEDIA_BOOKMARK);
if ( gGameExternalOptions.gBriefingRoom && !is_networked )
SetBookMark(BRIEFING_ROOM_BOOKMARK);
if ( gGameExternalOptions.fCampaignHistoryWebSite && !is_networked )
SetBookMark(CAMPAIGNHISTORY_BOOKMARK);
SetBookMark(MERC_BOOKMARK);
#endif
if ( !is_networked )
SetBookMark( MERCCOMPARE_BOOKMARK );
{
SetBookMark( AIM_BOOKMARK );
if ( gGameExternalOptions.gEncyclopedia )
SetBookMark( ENCYCLOPEDIA_BOOKMARK );
if ( gGameExternalOptions.gBriefingRoom )
SetBookMark( BRIEFING_ROOM_BOOKMARK );
if ( gGameExternalOptions.fCampaignHistoryWebSite )
SetBookMark( CAMPAIGNHISTORY_BOOKMARK );
else
RemoveBookmark( CAMPAIGNHISTORY_BOOKMARK );
if ( gGameExternalOptions.fDynamicOpinions )
SetBookMark( MERCCOMPARE_BOOKMARK );
else
RemoveBookmark( MERCCOMPARE_BOOKMARK );
if ( gGameExternalOptions.fDisease && gGameExternalOptions.fDiseaseStrategic )
SetBookMark( WHO_BOOKMARK );
else
RemoveBookmark( WHO_BOOKMARK );
}
LoadLoadPending( );
DrawDeskTopBackground( );
@@ -1463,6 +1476,18 @@ void RenderLaptop()
case LAPTOP_MODE_MERCCOMPARE_MAIN:
RenderMercCompareMain();
break;
case LAPTOP_MODE_WHO_MAIN:
RenderWHOMain( );
break;
case LAPTOP_MODE_WHO_CONTRACT:
RenderWHOContract( );
break;
case LAPTOP_MODE_WHO_TIPS:
RenderWHOTips( );
break;
}
if( guiCurrentLaptopMode >= LAPTOP_MODE_WWW )
@@ -1896,6 +1921,18 @@ void EnterNewLaptopMode()
EnterBobbyRShipments();
break;
case LAPTOP_MODE_WHO_MAIN:
EnterWHOMain( );
break;
case LAPTOP_MODE_WHO_CONTRACT:
EnterWHOContract( );
break;
case LAPTOP_MODE_WHO_TIPS:
EnterWHOTips( );
break;
}
// first time using webbrowser in this laptop session
@@ -2145,6 +2182,18 @@ void HandleLapTopHandles()
case LAPTOP_MODE_MERCCOMPARE_MAIN:
HandleMercCompareMain();
break;
case LAPTOP_MODE_WHO_MAIN:
HandleWHOMain( );
break;
case LAPTOP_MODE_WHO_CONTRACT:
HandleWHOContract( );
break;
case LAPTOP_MODE_WHO_TIPS:
HandleWHOTips( );
break;
}
}
@@ -2703,6 +2752,18 @@ UINT32 ExitLaptopMode(UINT32 uiMode)
case LAPTOP_MODE_MERCCOMPARE_MAIN:
ExitMercCompareMain();
break;
case LAPTOP_MODE_WHO_MAIN:
ExitWHOMain();
break;
case LAPTOP_MODE_WHO_CONTRACT:
ExitWHOContract( );
break;
case LAPTOP_MODE_WHO_TIPS:
ExitWHOTips( );
break;
}
if( ( uiMode != LAPTOP_MODE_NONE )&&( uiMode < LAPTOP_MODE_WWW ) )
@@ -3676,7 +3737,7 @@ void SetBookMark(INT32 iBookId)
{
while(LaptopSaveInfo.iBookMarkList[iCounter]!=-1)
{
// move trhough list until empty
// move through list until empty
if( LaptopSaveInfo.iBookMarkList[iCounter]==iBookId)
{
// found it, return
@@ -3957,7 +4018,7 @@ void DeleteBookmarkRegions()
while( LaptopSaveInfo.iBookMarkList[iCounter] != -1 )
{
MSYS_RemoveRegion(&gBookmarkMouseRegions[iCounter]);
iCounter++;
++iCounter;
}
// now one for the cancel
@@ -4278,6 +4339,27 @@ if( (gubQuest[ QUEST_FIX_LAPTOP ] != QUESTINPROGRESS) || (gGameUBOptions.LaptopQ
}
}
break;
case WHO_BOOKMARK:
{
guiCurrentWWWMode = LAPTOP_MODE_WHO_MAIN;
guiCurrentLaptopMode = LAPTOP_MODE_WHO_MAIN;
// do we have to have a World Wide Wait
if ( LaptopSaveInfo.fVisitedBookmarkAlready[WHO_BOOKMARK] == FALSE )
{
// reset flag and set load pending flag
LaptopSaveInfo.fVisitedBookmarkAlready[WHO_BOOKMARK] = TRUE;
fLoadPendingFlag = TRUE;
}
else
{
// fast reload
fLoadPendingFlag = TRUE;
fFastLoadFlag = TRUE;
}
}
break;
}
#ifdef JA2UB
@@ -6285,8 +6367,7 @@ BOOLEAN RenderWWWProgramTitleBar( void )
// blit title
GetVideoObject(&hHandle, uiTITLEFORWWW);
BltVideoObject( FRAME_BUFFER, hHandle, 0,LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_UL_Y - 2, VO_BLT_SRCTRANSPARENCY,NULL );
// now delete
DeleteVideoObjectFromIndex( uiTITLEFORWWW );
@@ -6299,12 +6380,10 @@ BOOLEAN RenderWWWProgramTitleBar( void )
// no page loaded yet, do not handle yet
if( guiCurrentLaptopMode == LAPTOP_MODE_WWW )
{
mprintf(iScreenWidthOffset + 140 , iScreenHeightOffset + 33 ,pWebTitle[0]);
mprintf(iScreenWidthOffset + 140 , iScreenHeightOffset + 33 ,pWebTitle[0]);
}
else
{
iIndex = guiCurrentLaptopMode - LAPTOP_MODE_WWW-1;
@@ -6318,10 +6397,7 @@ BOOLEAN RenderWWWProgramTitleBar( void )
swprintf( sString, L"%s - %s", pWebTitle[0], pWebPagesTitles[ iIndex ] );
mprintf(iScreenWidthOffset + 140 ,iScreenHeightOffset + 33 ,sString);
}
BlitTitleBarIcons( );
DisplayProgramBoundingBox( FALSE );
@@ -6333,18 +6409,15 @@ BOOLEAN RenderWWWProgramTitleBar( void )
void HandleDefaultWebpageForLaptop( void )
{
// go to first page in bookmark list
if( guiCurrentLaptopMode == LAPTOP_MODE_WWW )
{
// if valid entry go there
if( LaptopSaveInfo.iBookMarkList[ 0 ] != -1 )
{
GoToWebPage( LaptopSaveInfo.iBookMarkList[ 0 ] );
GoToWebPage( LaptopSaveInfo.iBookMarkList[ 0 ] );
}
}
return;
}
@@ -6354,8 +6427,6 @@ void CreateMinimizeRegionsForLaptopProgramIcons( void )
MSYS_DefineRegion( &gLapTopProgramMinIcon,LAPTOP_PROGRAM_ICON_X, LAPTOP_PROGRAM_ICON_Y ,LAPTOP_PROGRAM_ICON_X + LAPTOP_PROGRAM_ICON_WIDTH ,LAPTOP_PROGRAM_ICON_Y + LAPTOP_PROGRAM_ICON_HEIGHT, MSYS_PRIORITY_NORMAL+1,
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, LaptopProgramIconMinimizeCallback );
return;
}
@@ -6365,8 +6436,6 @@ void DestroyMinimizeRegionsForLaptopProgramIcons( void )
// displayed on the top of the laptop program bar
MSYS_RemoveRegion( &gLapTopProgramMinIcon);
return;
}
@@ -6375,83 +6444,87 @@ void LaptopProgramIconMinimizeCallback( MOUSE_REGION * pRegion, INT32 iReason )
// callback handler for the minize region that is attatched to the laptop program icon
if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
switch( guiCurrentLaptopMode )
{
case( LAPTOP_MODE_EMAIL ):
gLaptopProgramStates[ LAPTOP_PROGRAM_MAILER ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[0], guiTITLEBARICONS, 0 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_FILES ):
gLaptopProgramStates[ LAPTOP_PROGRAM_FILES ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[5], guiTITLEBARICONS, 2 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_FINANCES ):
gLaptopProgramStates[ LAPTOP_PROGRAM_FINANCES ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[2], guiTITLEBARICONS, 5 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_HISTORY ):
gLaptopProgramStates[ LAPTOP_PROGRAM_HISTORY ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[4], guiTITLEBARICONS, 4 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_PERSONNEL ):
gLaptopProgramStates[ LAPTOP_PROGRAM_PERSONNEL ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[3], guiTITLEBARICONS, 3 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_NONE ):
// nothing
break;
default:
gLaptopProgramStates[ LAPTOP_PROGRAM_WEB_BROWSER ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pWebTitle[ 0 ], guiTITLEBARICONS, 1 );
SetCurrentToLastProgramOpened( );
gfShowBookmarks = FALSE;
fShowBookmarkInfo = FALSE;
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
}
switch( guiCurrentLaptopMode )
{
case( LAPTOP_MODE_EMAIL ):
gLaptopProgramStates[ LAPTOP_PROGRAM_MAILER ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[0], guiTITLEBARICONS, 0 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_FILES ):
gLaptopProgramStates[ LAPTOP_PROGRAM_FILES ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[5], guiTITLEBARICONS, 2 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_FINANCES ):
gLaptopProgramStates[ LAPTOP_PROGRAM_FINANCES ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[2], guiTITLEBARICONS, 5 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_HISTORY ):
gLaptopProgramStates[ LAPTOP_PROGRAM_HISTORY ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[4], guiTITLEBARICONS, 4 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_PERSONNEL ):
gLaptopProgramStates[ LAPTOP_PROGRAM_PERSONNEL ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pLaptopIcons[3], guiTITLEBARICONS, 3 );
SetCurrentToLastProgramOpened( );
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
case( LAPTOP_MODE_NONE ):
// nothing
break;
default:
gLaptopProgramStates[ LAPTOP_PROGRAM_WEB_BROWSER ] = LAPTOP_PROGRAM_MINIMIZED;
InitTitleBarMaximizeGraphics(guiTITLEBARLAPTOP, pWebTitle[ 0 ], guiTITLEBARICONS, 1 );
SetCurrentToLastProgramOpened( );
gfShowBookmarks = FALSE;
fShowBookmarkInfo = FALSE;
fMinizingProgram = TRUE;
fInitTitle = TRUE;
break;
}
}
return;
}
void DisplayProgramBoundingBox( BOOLEAN fMarkButtons )
{
// the border fot eh program
// the border fot eh program
HVOBJECT hHandle;
GetVideoObject(&hHandle, guiLaptopBACKGROUND);
BltVideoObject(FRAME_BUFFER, hHandle, 1, iScreenWidthOffset + 25, iScreenHeightOffset + 23, VO_BLT_SRCTRANSPARENCY,NULL);
// no laptop mode, no border around the program
// no laptop mode, no border around the program
if( guiCurrentLaptopMode != LAPTOP_MODE_NONE )
{
GetVideoObject(&hHandle, guiLaptopBACKGROUND);
BltVideoObject(FRAME_BUFFER, hHandle, 0, iScreenWidthOffset + 108, iScreenHeightOffset + 23, VO_BLT_SRCTRANSPARENCY,NULL);
GetVideoObject(&hHandle, guiLaptopBACKGROUND);
BltVideoObject(FRAME_BUFFER, hHandle, 0, iScreenWidthOffset + 108, iScreenHeightOffset + 23, VO_BLT_SRCTRANSPARENCY,NULL);
}
if( fMarkButtons || fLoadPendingFlag )
{
MarkButtonsDirty( );
RenderButtons( );
MarkButtonsDirty( );
RenderButtons( );
}
PrintDate( );
PrintBalance( );
@@ -6460,8 +6533,6 @@ void DisplayProgramBoundingBox( BOOLEAN fMarkButtons )
// new files or email?
DisplayTaskBarIcons( );
return;
}
@@ -6501,7 +6572,6 @@ void NewEmailIconCallback( MOUSE_REGION * pRegion, INT32 iReason )
guiCurrentLaptopMode = LAPTOP_MODE_EMAIL;
}
}
}
@@ -6515,7 +6585,6 @@ void NewFileIconCallback( MOUSE_REGION * pRegion, INT32 iReason )
guiCurrentLaptopMode = LAPTOP_MODE_FILES;
}
}
}
void HandleWWWSubSites( void )
@@ -6551,8 +6620,6 @@ void HandleWWWSubSites( void )
gfWWWaitSubSitesVisitedFlags[ LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX - ( LAPTOP_MODE_WWW + 1 ) ] = TRUE;
gfWWWaitSubSitesVisitedFlags[ LAPTOP_MODE_AIM_MEMBERS - ( LAPTOP_MODE_WWW + 1 ) ] = TRUE;
}
return;
}
@@ -6563,8 +6630,6 @@ void UpdateStatusOfDisplayingBookMarks( void )
{
gfShowBookmarks = FALSE;
}
return;
}
@@ -6573,11 +6638,10 @@ void InitalizeSubSitesList( void )
INT32 iCounter = 0;
// init all subsites list to not visited
for( iCounter = LAPTOP_MODE_WWW + 1 ; iCounter <= LAPTOP_MODE_SIRTECH; iCounter++ )
for( iCounter = LAPTOP_MODE_WWW + 1 ; iCounter <= LAPTOP_MODE_SIRTECH; ++iCounter )
{
gfWWWaitSubSitesVisitedFlags[ iCounter - ( LAPTOP_MODE_WWW + 1 ) ] = FALSE;
gfWWWaitSubSitesVisitedFlags[ iCounter - ( LAPTOP_MODE_WWW + 1 ) ] = FALSE;
}
return;
}
@@ -6592,7 +6656,6 @@ void SetSubSiteAsVisted( void )
{
gfWWWaitSubSitesVisitedFlags[ guiCurrentLaptopMode - ( LAPTOP_MODE_WWW + 1 ) ] = TRUE;
}
}
@@ -6735,8 +6798,6 @@ void DisplayWebBookMarkNotify( void )
}
SetFontShadow(DEFAULT_SHADOW);
return;
}
void HandleWebBookMarkNotifyTimer( void )
@@ -6745,7 +6806,6 @@ void HandleWebBookMarkNotifyTimer( void )
INT32 iDifference = 0;
static BOOLEAN fOldShowBookMarkInfo = FALSE;
// check if maxing or mining?
if( ( fMaximizingProgram == TRUE ) || ( fMinizingProgram == TRUE ) )
{
@@ -6779,7 +6839,6 @@ void HandleWebBookMarkNotifyTimer( void )
return;
}
// check if this is the first time in here
if( iBaseTime == 0 )
{
@@ -6797,8 +6856,6 @@ void HandleWebBookMarkNotifyTimer( void )
iBaseTime = 0;
fShowBookmarkInfo = FALSE;
}
return;
}
@@ -6833,7 +6890,6 @@ void ClearOutTempLaptopFiles( void )
FileClearAttributes( "history.dat" );
FileDelete( "history.dat" );
}
}
@@ -6842,7 +6898,6 @@ BOOLEAN SaveLaptopInfoToSavedGame( HWFILE hFile )
UINT32 uiNumBytesWritten=0;
UINT32 uiSize;
// Save The laptop information
FileWrite( hFile, &LaptopSaveInfo, sizeof( LaptopSaveInfoStruct ), &uiNumBytesWritten );
if( uiNumBytesWritten != sizeof( LaptopSaveInfoStruct ) )
@@ -6864,7 +6919,6 @@ BOOLEAN SaveLaptopInfoToSavedGame( HWFILE hFile )
}
}
//If there is any Insurance Payouts in progress
if( LaptopSaveInfo.ubNumberLifeInsurancePayoutUsed )
{
@@ -6890,7 +6944,6 @@ BOOLEAN LoadLaptopInfoFromSavedGame( HWFILE hFile )
UINT32 uiNumBytesRead=0;
UINT32 uiSize;
//if there is memory allocated for the BobbyR orders
if( LaptopSaveInfo.usNumberOfBobbyRayOrderItems )
{
@@ -6939,8 +6992,7 @@ BOOLEAN LoadLaptopInfoFromSavedGame( HWFILE hFile )
LaptopSaveInfo.usNumberOfBobbyRayOrderItems = 0;
LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray = NULL;
}
//If there is any Insurance Payouts in progress
if( LaptopSaveInfo.ubNumberLifeInsurancePayoutUsed )
{
@@ -6962,8 +7014,7 @@ BOOLEAN LoadLaptopInfoFromSavedGame( HWFILE hFile )
LaptopSaveInfo.ubNumberLifeInsurancePayouts = 0;
LaptopSaveInfo.pLifeInsurancePayouts = NULL;
}
return( TRUE );
}
@@ -6993,8 +7044,8 @@ BOOLEAN IsItRaining()
{
if( guiEnvWeather & WEATHER_FORECAST_SHOWERS || guiEnvWeather & WEATHER_FORECAST_THUNDERSHOWERS )
return( TRUE );
else
return( FALSE );
return( FALSE );
}
@@ -7057,7 +7108,3 @@ void ShouldImpReminderEmailBeSentWhenLaptopBackOnline()
}
}
#endif
+6
View File
@@ -150,6 +150,11 @@ enum
LAPTOP_MODE_MERCCOMPARE_MATRIX,
LAPTOP_MODE_MERCCOMPARE_ANALYZE,
LAPTOP_MODE_MERCCOMPARE_CUSTOMERS,
// Flugente: World Health Organization
LAPTOP_MODE_WHO_MAIN,
LAPTOP_MODE_WHO_CONTRACT,
LAPTOP_MODE_WHO_TIPS,
LAPTOP_MODE_BOBBYR_SHIPMENTS,
@@ -226,6 +231,7 @@ enum{
BRIEFING_ROOM_BOOKMARK,
CAMPAIGNHISTORY_BOOKMARK, // added by Flugente
MERCCOMPARE_BOOKMARK, // added by Flugente
WHO_BOOKMARK, // added by Flugente
TEXT_NUM_LAPTOP_BOOKMARKS
};
+145 -189
View File
@@ -30,65 +30,30 @@
#endif
#define MERCOMP_FONT_COLOR 2
#define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED
#define CAMPHIS_FONT_BIG FONT14ARIAL
#define CAMPHIS_FONT_MED FONT12ARIAL
#define CAMPHIS_FONT_SMALL FONT10ARIAL
#define MERCOMP_FONT_COLOR 2
#define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED
#define CAMPHIS_FONT_BIG FONT14ARIAL
#define CAMPHIS_FONT_MED FONT12ARIAL
#define CAMPHIS_FONT_SMALL FONT10ARIAL
#define CAMPHIS_FONT_BTN_COLOR FONT_MCOLOR_WHITE
#define CAMPHIS_FONT_BTN_SHADOW_COLOR 2
#define MERCOMP_FONT_SHADOW FONT_MCOLOR_WHITE
#define CAMPAIGN_HISTORY_BULLET_TEXT_OFFSET_X 21
#define MERCOMP_FONT_SHADOW FONT_MCOLOR_WHITE
#define CAMPAIGN_HISTORY_LINK_START_X LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_LINK_START_Y LAPTOP_SCREEN_WEB_UL_Y + 5
#define CAMPAIGN_HISTORY_LINK_TEXT_WIDTH 107
#define CAMPAIGN_HISTORY_LINK_STEP_Y 14
#define CAMPAIGN_HISTORY_BACKGROUND_WIDTH 125
#define CAMPAIGN_HISTORY_BACKGROUND_HEIGHT 100
#define BACKGROUND_WIDTH 125
#define CAMPAIGN_HISTORY_BACKGROUND_HEIGHT 100
#define CAMPAIGN_HISTORY_BIG_TITLE_X 115 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_BIG_TITLE_Y 10 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BIG_TITLE_X 115 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_BIG_TITLE_Y 10 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_RED_BAR_X LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_RED_BAR_Y LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_SUBTITLE_X CAMPAIGN_HISTORY_BIG_TITLE_X
#define CAMPAIGN_HISTORY_SUBTITLE_Y CAMPAIGN_HISTORY_BIG_TITLE_Y + 20
#define CAMPAIGN_HISTORY_TOP_RED_BAR_X LAPTOP_SCREEN_UL_X + 66
#define CAMPAIGN_HISTORY_TOP_RED_BAR_Y 109 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_TOP_RED_BAR_Y1 31 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_RED_BAR_Y 345 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X 77 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_Y 392 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_WIDTH 107
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_OFFSET 148
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X_2 CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X + CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_OFFSET
#define CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X_3 CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_X_2 + CAMPAIGN_HISTORY_BOTTOM_LINK_RED_BAR_OFFSET
#define CAMPAIGN_HISTORY_SUBTITLE_X CAMPAIGN_HISTORY_BIG_TITLE_X
#define CAMPAIGN_HISTORY_SUBTITLE_Y CAMPAIGN_HISTORY_BIG_TITLE_Y + 20
#define CAMPAIGN_HISTORY_BULLET_TEXT_1_Y 188 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BULLET_TEXT_2_Y 215 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BULLET_TEXT_3_Y 242 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_SLOGAN_X CAMPAIGN_HISTORY_SUBTITLE_X
#define CAMPAIGN_HISTORY_BOTTOM_SLOGAN_Y 285 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_BOTTOM_SLOGAN_WIDTH 370
#define CAMPAIGN_HISTORY_SMALL_TITLE_X 64 + LAPTOP_SCREEN_UL_X
#define CAMPAIGN_HISTORY_SMALL_TITLE_Y 5 + LAPTOP_SCREEN_WEB_UL_Y
#define CAMPAIGN_HISTORY_SMALL_TITLE_WIDTH 434 - 170
#define CAMPAIGN_HISTORY_SMALL_TITLE_HEIGHT 40 - 10
#define MERCCOMPARE_NUM_LINKS 4
#define MCA_START_CONTENT_Y (LAPTOP_SCREEN_WEB_UL_Y + MERCCOMPARE_NUM_LINKS * 17)
#define NUM_LINKS 4
#define MCA_START_CONTENT_Y (LAPTOP_SCREEN_WEB_UL_Y + NUM_LINKS * 17)
extern UINT32 guiInsuranceBackGround;
@@ -98,18 +63,133 @@ UINT32 guiMercCompareBulletImage;
UINT32 guiMercCompareLogoImage;
//link to the various pages
MOUSE_REGION gMercCompareLinkRegion[MERCCOMPARE_NUM_LINKS];
void SelectMercCompareRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason );
MOUSE_REGION gMercCompareLinkRegion[NUM_LINKS];
void GameInitMercCompare( )
void SelectLinkRegionCallBack_MercCompare( MOUSE_REGION * pRegion, INT32 iReason )
{
if ( iReason & MSYS_CALLBACK_REASON_INIT )
{
}
else if ( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
UINT32 uiLink = MSYS_GetRegionUserData( pRegion, 0 );
if ( uiLink == 0 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_MAIN;
else if ( uiLink == 1 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_MATRIX;
else if ( uiLink == 2 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_ANALYZE;
else if ( uiLink == 3 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_CUSTOMERS;
}
else if ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP )
{
}
}
void GetMercCompareText( UINT8 ubNumber, STR16 pString )
{
if ( ubNumber >= TEXT_MERCCOMPARE_MAX )
wcscpy( pString, L"???" );
wcscpy( pString, szMercCompareWebSite[ubNumber] );
}
void InitDefaults( )
{
VOBJECT_DESC VObjectDesc;
// load the Insurance bullet graphic and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\bullet.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiMercCompareBulletImage ) );
// load the Flower Account Box graphic and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\BackGroundTile.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiInsuranceBackGround ) );
// load the red bar on the side of the page and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\LargeBar.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiInsuranceBigRedLineImage ) );
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\PressLogos.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiMercCompareLogoImage ) );
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
for ( int i = 0; i<NUM_LINKS; ++i )
{
MSYS_DefineRegion( &gMercCompareLinkRegion[i], usPosX, usPosY, (UINT16)(usPosX + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH), usPosY + CAMPAIGN_HISTORY_LINK_STEP_Y, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack_MercCompare );
MSYS_AddRegion( &gMercCompareLinkRegion[i] );
MSYS_SetRegionUserData( &gMercCompareLinkRegion[i], 0, i );
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
}
}
void DisplayDefaults( )
{
HVOBJECT hPixHandle;
GetVideoObject( &hPixHandle, guiMercCompareLogoImage );
SetFontShadow( MERCOMP_FONT_SHADOW );
CHAR16 sText[800];
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
WebPageTileBackground( 4, 4, BACKGROUND_WIDTH, CAMPAIGN_HISTORY_BACKGROUND_HEIGHT, guiInsuranceBackGround );
//Display the title slogan
GetMercCompareText( TEXT_MERCCOMPARE_WEBSITENAME, sText );
DrawTextToScreen( sText, CAMPAIGN_HISTORY_BIG_TITLE_X, CAMPAIGN_HISTORY_BIG_TITLE_Y, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, CAMPHIS_FONT_BIG, MERCOMP_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, 0 );
//Display the subtitle slogan
GetMercCompareText( TEXT_MERCCOMPARE_SLOGAN, sText );
DrawTextToScreen( sText, CAMPAIGN_HISTORY_SUBTITLE_X, CAMPAIGN_HISTORY_SUBTITLE_Y, 0, CAMPHIS_FONT_BIG, MERCOMP_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosX = CAMPAIGN_HISTORY_LINK_START_X;
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
for ( int i = 0; i<NUM_LINKS; ++i )
{
GetMercCompareText( TEXT_MERCCOMPARE_SUBSITE1 + i, sText );
DisplayWrappedString( usPosX, usPosY, CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
//Display the red bar under the link at the bottom. and the text
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_UL_X + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, usPosY - 2, FROMRGB( 0, 255, 0 ) );
}
// closing line that separates header from individual page
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_LR_X, usPosY - 2, FROMRGB( 0, 255, 0 ) );
usPosX = LAPTOP_SCREEN_LR_X - 110;
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
BltVideoObject( FRAME_BUFFER, hPixHandle, 1, usPosX, usPosY, VO_BLT_SRCTRANSPARENCY, NULL );
SetFontShadow( DEFAULT_SHADOW );
}
void RemoveDefaults( )
{
DeleteVideoObjectFromIndex( guiInsuranceBackGround );
DeleteVideoObjectFromIndex( guiInsuranceBigRedLineImage );
DeleteVideoObjectFromIndex( guiMercCompareBulletImage );
DeleteVideoObjectFromIndex( guiMercCompareLogoImage );
for ( int i = 0; i<NUM_LINKS; ++i )
MSYS_RemoveRegion( &gMercCompareLinkRegion[i] );
}
BOOLEAN EnterMercCompareMain( )
{
InitMercCompareDefaults( );
InitDefaults( );
RenderMercCompareMain( );
@@ -118,7 +198,7 @@ BOOLEAN EnterMercCompareMain( )
void ExitMercCompareMain( )
{
RemoveMercCompareDefaults( );
RemoveDefaults( );
}
void HandleMercCompareMain( )
@@ -136,7 +216,7 @@ void RenderMercCompareMain( )
//Get the bullet
GetVideoObject( &hPixHandle, guiMercCompareBulletImage );
DisplayMercCompareDefaults( );
DisplayDefaults( );
SetFontShadow( MERCOMP_FONT_SHADOW );
@@ -170,135 +250,11 @@ void RenderMercCompareMain( )
}
void InitMercCompareDefaults( )
{
VOBJECT_DESC VObjectDesc;
// load the Insurance bullet graphic and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\bullet.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiMercCompareBulletImage ) );
// load the Flower Account Box graphic and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\BackGroundTile.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiInsuranceBackGround ) );
// load the red bar on the side of the page and add it
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\LargeBar.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiInsuranceBigRedLineImage ) );
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP( "LAPTOP\\PressLogos.sti", VObjectDesc.ImageFile );
CHECKV( AddVideoObject( &VObjectDesc, &guiMercCompareLogoImage ) );
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
for ( int i = 0; i<MERCCOMPARE_NUM_LINKS; ++i )
{
MSYS_DefineRegion( &gMercCompareLinkRegion[i], usPosX, usPosY, (UINT16)(usPosX + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH), usPosY + CAMPAIGN_HISTORY_LINK_STEP_Y, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectMercCompareRegionCallBack );
MSYS_AddRegion( &gMercCompareLinkRegion[i] );
MSYS_SetRegionUserData( &gMercCompareLinkRegion[i], 0, i );
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
}
}
void DisplayMercCompareDefaults( )
{
HVOBJECT hPixHandle;
GetVideoObject( &hPixHandle, guiMercCompareLogoImage );
SetFontShadow( MERCOMP_FONT_SHADOW );
CHAR16 sText[800];
UINT16 usPosX = CAMPAIGN_HISTORY_LINK_START_X;
UINT16 usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
WebPageTileBackground( 4, 4, CAMPAIGN_HISTORY_BACKGROUND_WIDTH, CAMPAIGN_HISTORY_BACKGROUND_HEIGHT, guiInsuranceBackGround );
//Display the title slogan
GetMercCompareText( TEXT_MERCCOMPARE_WEBSITENAME, sText );
DrawTextToScreen( sText, CAMPAIGN_HISTORY_BIG_TITLE_X, CAMPAIGN_HISTORY_BIG_TITLE_Y, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, CAMPHIS_FONT_BIG, MERCOMP_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, 0 );
//Display the subtitle slogan
GetMercCompareText( TEXT_MERCCOMPARE_SLOGAN, sText );
DrawTextToScreen( sText, CAMPAIGN_HISTORY_SUBTITLE_X, CAMPAIGN_HISTORY_SUBTITLE_Y, 0, CAMPHIS_FONT_BIG, MERCOMP_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosX = CAMPAIGN_HISTORY_LINK_START_X;
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
for ( int i = 0; i<MERCCOMPARE_NUM_LINKS; ++i )
{
GetMercCompareText( TEXT_MERCCOMPARE_SUBSITE1 + i, sText );
DisplayWrappedString( usPosX, usPosY, CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
//Display the red bar under the link at the bottom. and the text
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_UL_X + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, usPosY - 2, FROMRGB( 0, 255, 0 ) );
}
// closing line that separates header from individual page
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_LR_X, usPosY - 2, FROMRGB( 0, 255, 0 ) );
usPosX = LAPTOP_SCREEN_LR_X - 110;
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
BltVideoObject( FRAME_BUFFER, hPixHandle, 1, usPosX, usPosY, VO_BLT_SRCTRANSPARENCY, NULL );
SetFontShadow( DEFAULT_SHADOW );
}
void RemoveMercCompareDefaults( )
{
DeleteVideoObjectFromIndex( guiInsuranceBackGround );
DeleteVideoObjectFromIndex( guiInsuranceBigRedLineImage );
DeleteVideoObjectFromIndex( guiMercCompareBulletImage );
DeleteVideoObjectFromIndex( guiMercCompareLogoImage );
for ( int i = 0; i<MERCCOMPARE_NUM_LINKS; ++i )
MSYS_RemoveRegion( &gMercCompareLinkRegion[i] );
}
void GetMercCompareText( UINT8 ubNumber, STR16 pString )
{
if ( ubNumber >= TEXT_MERCCOMPARE_MAX )
wcscpy( pString, L"???" );
wcscpy( pString, szMercCompareWebSite[ubNumber] );
}
void SelectMercCompareRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason )
{
if ( iReason & MSYS_CALLBACK_REASON_INIT )
{
}
else if ( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
UINT32 uiLink = MSYS_GetRegionUserData( pRegion, 0 );
if ( uiLink == 0 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_MAIN;
else if ( uiLink == 1 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_MATRIX;
else if ( uiLink == 2 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_ANALYZE;
else if ( uiLink == 3 )
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_CUSTOMERS;
}
else if ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP )
{
}
}
////////////////////////// MERC COMPARE CUSTOMERS ////////////////////////////////
BOOLEAN EnterMercCompareCustomers( )
{
InitMercCompareDefaults( );
InitDefaults( );
RenderMercCompareCustomers( );
@@ -307,7 +263,7 @@ BOOLEAN EnterMercCompareCustomers( )
void ExitMercCompareCustomers( )
{
RemoveMercCompareDefaults( );
RemoveDefaults( );
}
void HandleMercCompareCustomers( )
@@ -325,7 +281,7 @@ void RenderMercCompareCustomers( )
//Get the bullet
GetVideoObject( &hPixHandle, guiMercCompareBulletImage );
DisplayMercCompareDefaults( );
DisplayDefaults( );
SetFontShadow( MERCOMP_FONT_SHADOW );
@@ -383,7 +339,7 @@ template<> void DropDownTemplate<DROPDOWNNR_MERCCOMPARE2>::SetRefresh( ) { fMerc
BOOLEAN EnterMercCompareAnalyze()
{
InitMercCompareDefaults( );
InitDefaults( );
// We fill two dropdowns with all mercs on our team
std::vector<std::pair<INT16, STR16> > mercvector;
@@ -422,7 +378,7 @@ BOOLEAN EnterMercCompareAnalyze()
void ExitMercCompareAnalyze()
{
RemoveMercCompareDefaults( );
RemoveDefaults( );
DropDownTemplate<DROPDOWNNR_MERCCOMPARE1>::getInstance( ).Destroy( );
DropDownTemplate<DROPDOWNNR_MERCCOMPARE2>::getInstance( ).Destroy( );
@@ -447,7 +403,7 @@ void RenderMercCompareAnalyze()
//Get the bullet
GetVideoObject( &hPixHandle, guiMercCompareBulletImage );
DisplayMercCompareDefaults( );
DisplayDefaults( );
SetFontShadow( MERCOMP_FONT_SHADOW );
@@ -978,7 +934,7 @@ template<> void DropDownTemplate<DROPDOWNNR_MERCCOMPARE_SQUADSELECTION>::SetRefr
BOOLEAN EnterMercCompareMatrix( )
{
InitMercCompareDefaults( );
InitDefaults( );
// We fill two dropdowns with all mercs on our team
std::vector<std::pair<INT16, STR16> > dropdownvector;
@@ -1026,7 +982,7 @@ BOOLEAN EnterMercCompareMatrix( )
void ExitMercCompareMatrix( )
{
RemoveMercCompareDefaults( );
RemoveDefaults( );
DropDownTemplate<DROPDOWNNR_MERCCOMPARE_SQUADSELECTION>::getInstance( ).Destroy( );
@@ -1055,7 +1011,7 @@ void RenderMercCompareMatrix( )
swprintf( sText, L"" );
UINT16 usPosX, usPosY;
DisplayMercCompareDefaults( );
DisplayDefaults( );
SetFontShadow( MERCOMP_FONT_SHADOW );
-5
View File
@@ -12,11 +12,6 @@ void ExitMercCompareMain( );
void HandleMercCompareMain( );
void RenderMercCompareMain( );
void InitMercCompareDefaults( );
void DisplayMercCompareDefaults( );
void RemoveMercCompareDefaults( );
void GetMercCompareText( UINT8 ubNumber, STR16 pString );
// displays a few quotes of customers
BOOLEAN EnterMercCompareCustomers( );
void ExitMercCompareCustomers( );