mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- New Feature: dynamic opinions allows mercs to form opinions about each other depening on actions they/the player take or do not take. These can be viewed in the 'MeLoDY 'website. See also http://www.bears-pit.com/board/ubbthreads.php/topics/333259.html#Post333259
- Requires GameDir r2050. - new background property: <dislikebackground> allows mercs to dislike specific backgrounds - Fix: snitches did not correctly prevent misbehaviour - Fix: morale event was not handled - Fix: DropDowns did not refresh when using the arrow buttons git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7240 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -223,11 +223,11 @@ void DisplayCampaignHistoryDefaults()
|
||||
usPosY += CAMPAIGN_HISTORY_LINK_STEP_Y;
|
||||
|
||||
//Display the red bar under the link at the bottom. and the text
|
||||
DisplaySmallRedLineWithShadow( usPosX, usPosY-2, LAPTOP_SCREEN_UL_X+CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, usPosY-2);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_UL_X + CAMPAIGN_HISTORY_LINK_TEXT_WIDTH, usPosY - 2 );
|
||||
}
|
||||
|
||||
// closing line that separates header from individual page
|
||||
DisplaySmallRedLineWithShadow( usPosX, usPosY-2, LAPTOP_SCREEN_LR_X, usPosY-2);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, usPosY - 2, LAPTOP_SCREEN_LR_X, usPosY - 2 );
|
||||
|
||||
usPosX = LAPTOP_SCREEN_LR_X - 50;
|
||||
usPosY = CAMPAIGN_HISTORY_LINK_START_Y;
|
||||
|
||||
@@ -768,18 +768,22 @@ void RenderCampaignHistory_MostImportant()
|
||||
if ( picend < usPosY ) usPosX = LAPTOP_SCREEN_UL_X;
|
||||
}
|
||||
|
||||
if ( incident.usIncidentFlags & INCIDENT_SPYACTION_ENEMY )
|
||||
// only report on spies if they were uncovered
|
||||
if ( incident.usIncidentFlags & INCIDENT_SPYACTION_UNCOVERED )
|
||||
{
|
||||
swprintf(sText, szCampaignHistoryDetail[TEXT_CAMPAIGNHISTORY_DETAIL_SPY_ENEMY] );
|
||||
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - usPosX, 2, CAMPHIS_FONT_SMALL, CAMPAIGN_HISTORY_FONT_COLOR_REGULAR,sText, FONT_MCOLOR_BLACK, FALSE, 0);
|
||||
if ( picend < usPosY ) usPosX = LAPTOP_SCREEN_UL_X;
|
||||
}
|
||||
if ( incident.usIncidentFlags & INCIDENT_SPYACTION_ENEMY )
|
||||
{
|
||||
swprintf(sText, szCampaignHistoryDetail[TEXT_CAMPAIGNHISTORY_DETAIL_SPY_ENEMY] );
|
||||
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - usPosX, 2, CAMPHIS_FONT_SMALL, CAMPAIGN_HISTORY_FONT_COLOR_REGULAR,sText, FONT_MCOLOR_BLACK, FALSE, 0);
|
||||
if ( picend < usPosY ) usPosX = LAPTOP_SCREEN_UL_X;
|
||||
}
|
||||
|
||||
if ( incident.usIncidentFlags & INCIDENT_SPYACTION_PLAYERSIDE )
|
||||
{
|
||||
swprintf(sText, szCampaignHistoryDetail[TEXT_CAMPAIGNHISTORY_DETAIL_SPY_PLAYER] );
|
||||
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - usPosX, 2, CAMPHIS_FONT_SMALL, CAMPAIGN_HISTORY_FONT_COLOR_REGULAR,sText, FONT_MCOLOR_BLACK, FALSE, 0);
|
||||
if ( picend < usPosY ) usPosX = LAPTOP_SCREEN_UL_X;
|
||||
if ( incident.usIncidentFlags & INCIDENT_SPYACTION_PLAYERSIDE )
|
||||
{
|
||||
swprintf(sText, szCampaignHistoryDetail[TEXT_CAMPAIGNHISTORY_DETAIL_SPY_PLAYER] );
|
||||
usPosY += DisplayWrappedString( usPosX, usPosY, LAPTOP_SCREEN_LR_X - usPosX, 2, CAMPHIS_FONT_SMALL, CAMPAIGN_HISTORY_FONT_COLOR_REGULAR,sText, FONT_MCOLOR_BLACK, FALSE, 0);
|
||||
if ( picend < usPosY ) usPosX = LAPTOP_SCREEN_UL_X;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -707,7 +707,7 @@ void FinishIncident(INT16 sX, INT16 sY, INT8 sZ)
|
||||
|
||||
if ( i == CAMPAIGNHISTORY_SD_MAX )
|
||||
{
|
||||
// totally boring. Don't add this, just clean it an exit
|
||||
// totally boring. Don't add this, just clean it and exit
|
||||
gCurrentIncident.clear();
|
||||
|
||||
return;
|
||||
@@ -715,6 +715,9 @@ void FinishIncident(INT16 sX, INT16 sY, INT8 sZ)
|
||||
}
|
||||
}
|
||||
|
||||
// dynamic opinions: if the playerside had a lot of losses, the mercs will blame one of their own
|
||||
HandleDynamicOpinionBattleLosses();
|
||||
|
||||
// due to odd coding, we do not know when an incident starts
|
||||
// (checking for entering combat isn't enough, as we do that multiple times per battle)
|
||||
// we thus set the relevant data when finishing an incident
|
||||
|
||||
+23
-1
@@ -356,7 +356,7 @@ DropDownBase::DrawTopEntry()
|
||||
|
||||
SetFontShadow(NO_SHADOW);
|
||||
|
||||
DrawTextToScreen( mEntryVector[mSelectedEntry].second, musStartX+CITY_NAME_OFFSET, (UINT16)(musStartY+7), 0, DEF_DROPDOWN_FONT, FONT_BLACK, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );;
|
||||
DrawTextToScreen( mEntryVector[mSelectedEntry].second, musStartX+CITY_NAME_OFFSET, (UINT16)(musStartY+7), 0, DEF_DROPDOWN_FONT, FONT_BLACK, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
}
|
||||
@@ -508,6 +508,8 @@ DropDownBase::SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion
|
||||
DrawTopEntry();
|
||||
DrawSelectedCity();
|
||||
DrawGoldRectangle();
|
||||
|
||||
SetRefresh( );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,6 +607,26 @@ DropDownBase::SelectScrollAreaDropDownRegionCallBack(MOUSE_REGION * pRegion, INT
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If aKey exists among our keys, set it as the current one
|
||||
*/
|
||||
void
|
||||
DropDownBase::SetSelectedEntryKey( INT16 aKey )
|
||||
{
|
||||
UINT8 cnt = 0;
|
||||
std::vector<std::pair<INT16, STR16> >::iterator itend = mEntryVector.end();
|
||||
for ( std::vector<std::pair<INT16, STR16> >::iterator it = mEntryVector.begin(); it != itend; ++it )
|
||||
{
|
||||
if ( (*it).first == aKey )
|
||||
{
|
||||
mSelectedEntry = cnt;
|
||||
return;
|
||||
}
|
||||
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DropDownBase::OpenDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
|
||||
@@ -18,6 +18,26 @@ void Display2Line2ShadowHorizontal( UINT16 usStartX, UINT16 usStartY, UINT16 End
|
||||
// the maximum number of entries that can be shown at once. Increase requires recompilation!
|
||||
#define DROPDOWN_REGIONS 8
|
||||
|
||||
// different dropdowns can interfere with each other
|
||||
enum definedDropDowns
|
||||
{
|
||||
DROPDOWNNR_APPEARANCE = 0,
|
||||
DROPDOWNNR_APPEARANCECARE,
|
||||
DROPDOWNNR_REFINEMENT,
|
||||
DROPDOWNNR_REFINEMENTCARE,
|
||||
DROPDOWNNR_NATIONALITY,
|
||||
DROPDOWNNR_HATEDNATIONALITY,
|
||||
DROPDOWNNR_HATEDNATIONALITYCARE,
|
||||
DROPDOWNNR_RACIST,
|
||||
DROPDOWNNR_RACE,
|
||||
DROPDOWNNR_SEXIST,
|
||||
DROPDOWNNR_RACISTFEATURE,
|
||||
|
||||
DROPDOWNNR_MERCCOMPARE1,
|
||||
DROPDOWNNR_MERCCOMPARE2,
|
||||
DROPDOWNNR_MERCCOMPARE_SQUADSELECTION,
|
||||
};
|
||||
|
||||
/*
|
||||
* As we cannot directly add our callbacks (we need a static callback due to the way MSYS_DefineRegion(...) works, which utterly fails if we have multiple instance of a class),
|
||||
* we use a very odd looking workaround.
|
||||
@@ -118,6 +138,11 @@ public:
|
||||
*/
|
||||
INT16 GetSelectedEntryKey() { return mEntryVector[mSelectedEntry].first; }
|
||||
|
||||
/*
|
||||
* If aKey exists among our keys, set it as the current one
|
||||
*/
|
||||
void SetSelectedEntryKey( INT16 aKey );
|
||||
|
||||
/*
|
||||
* Get width of entire DropDownBase
|
||||
*/
|
||||
|
||||
@@ -494,7 +494,12 @@ void AssignBackgroundHelpText( UINT16 ubNumber, MOUSE_REGION* pMouseregion )
|
||||
|
||||
for ( UINT8 i = 0; i < BG_MAX; ++i)
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[i] )
|
||||
if ( BG_DISLIKEBG == i )
|
||||
{
|
||||
swprintf( atStr, szBackgroundText_Value[i] );
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
else if ( zBackground[ ubNumber ].value[i] )
|
||||
{
|
||||
swprintf(atStr, szBackgroundText_Value[ i ], zBackground[ ubNumber ].value[i] > 0 ? L"+" : L"", zBackground[ ubNumber ].value[i] );
|
||||
wcscat( apStr, atStr );
|
||||
|
||||
@@ -78,21 +78,6 @@ BOOLEAN CameBackToPrejudicePageButNotFinished();
|
||||
//*******************************************************************
|
||||
#define DROPDOWN_MARKUP_Y 50
|
||||
|
||||
enum definedDropDowns
|
||||
{
|
||||
DROPDOWNNR_APPEARANCE = 0,
|
||||
DROPDOWNNR_APPEARANCECARE,
|
||||
DROPDOWNNR_REFINEMENT,
|
||||
DROPDOWNNR_REFINEMENTCARE,
|
||||
DROPDOWNNR_NATIONALITY,
|
||||
DROPDOWNNR_HATEDNATIONALITY,
|
||||
DROPDOWNNR_HATEDNATIONALITYCARE,
|
||||
DROPDOWNNR_RACIST,
|
||||
DROPDOWNNR_RACE,
|
||||
DROPDOWNNR_SEXIST,
|
||||
DROPDOWNNR_RACISTFEATURE,
|
||||
};
|
||||
|
||||
template<> void DropDownTemplate<DROPDOWNNR_APPEARANCE>::SetRefresh() { gfIMPPrejudice_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_APPEARANCECARE>::SetRefresh() { gfIMPPrejudice_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_REFINEMENT>::SetRefresh() { gfIMPPrejudice_Redraw = TRUE; }
|
||||
|
||||
@@ -622,6 +622,10 @@
|
||||
RelativePath=".\LaptopSave.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\merccompare.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mercs Account.h"
|
||||
>
|
||||
@@ -928,6 +932,10 @@
|
||||
RelativePath=".\laptop.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\merccompare.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mercs Account.cpp"
|
||||
>
|
||||
|
||||
@@ -614,6 +614,10 @@
|
||||
RelativePath="LaptopSave.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="merccompare.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mercs Account.h"
|
||||
>
|
||||
@@ -914,6 +918,10 @@
|
||||
RelativePath="laptop.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="merccompare.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mercs Account.cpp"
|
||||
>
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
<ClInclude Include="Laptop All.h" />
|
||||
<ClInclude Include="laptop.h" />
|
||||
<ClInclude Include="LaptopSave.h" />
|
||||
<ClInclude Include="merccompare.h" />
|
||||
<ClInclude Include="mercs Account.h" />
|
||||
<ClInclude Include="mercs Files.h" />
|
||||
<ClInclude Include="mercs No Account.h" />
|
||||
@@ -172,6 +173,7 @@
|
||||
<ClCompile Include="insurance Info.cpp" />
|
||||
<ClCompile Include="insurance.cpp" />
|
||||
<ClCompile Include="laptop.cpp" />
|
||||
<ClCompile Include="merccompare.cpp" />
|
||||
<ClCompile Include="mercs Account.cpp" />
|
||||
<ClCompile Include="mercs Files.cpp" />
|
||||
<ClCompile Include="mercs No Account.cpp" />
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
<ClInclude Include="Laptop All.h" />
|
||||
<ClInclude Include="laptop.h" />
|
||||
<ClInclude Include="LaptopSave.h" />
|
||||
<ClInclude Include="merccompare.h" />
|
||||
<ClInclude Include="mercs Account.h" />
|
||||
<ClInclude Include="mercs Files.h" />
|
||||
<ClInclude Include="mercs No Account.h" />
|
||||
@@ -172,6 +173,7 @@
|
||||
<ClCompile Include="insurance Info.cpp" />
|
||||
<ClCompile Include="insurance.cpp" />
|
||||
<ClCompile Include="laptop.cpp" />
|
||||
<ClCompile Include="merccompare.cpp" />
|
||||
<ClCompile Include="mercs Account.cpp" />
|
||||
<ClCompile Include="mercs Files.cpp" />
|
||||
<ClCompile Include="mercs No Account.cpp" />
|
||||
|
||||
@@ -249,6 +249,9 @@
|
||||
<ClInclude Include="CampaignStats.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="merccompare.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aim.cpp">
|
||||
@@ -509,5 +512,8 @@
|
||||
<ClCompile Include="XML_CampaignStatsEvents.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="merccompare.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -196,6 +196,8 @@ UINT32 AddTransactionToPlayersBook (UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiD
|
||||
GetBalanceFromDisk( );
|
||||
// process the actual data
|
||||
|
||||
// Flugente: dynamic opinion
|
||||
HandleDynamicOpinionOnContractExtension( ubCode, ubSecondCode );
|
||||
|
||||
//
|
||||
// If this transaction is for the hiring/extending of a mercs contract
|
||||
|
||||
@@ -142,7 +142,7 @@ void RenderInsuranceComments()
|
||||
swprintf( sText, L"%s", pMessageStrings[ MSG_HOMEPAGE ] );
|
||||
DisplayWrappedString( usPosX, INS_CMNT_LINK_Y+13, INS_CMNT_LINK_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_CMNT_LINK_Y+INS_CMNT_LINK_HEIGHT, (UINT16)(usPosX+INS_CMNT_LINK_WIDTH), INS_CMNT_LINK_Y+INS_CMNT_LINK_HEIGHT);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_CMNT_LINK_Y + INS_CMNT_LINK_HEIGHT, (UINT16)(usPosX + INS_CMNT_LINK_WIDTH), INS_CMNT_LINK_Y + INS_CMNT_LINK_HEIGHT );
|
||||
usPosX += INS_CMNT_LINK_OFFSET_X;
|
||||
|
||||
|
||||
@@ -150,14 +150,14 @@ void RenderInsuranceComments()
|
||||
GetInsuranceText( INS_SNGL_HOW_DOES_INS_WORK, sText );
|
||||
DisplayWrappedString( usPosX, INS_CMNT_LINK_Y+6, INS_CMNT_LINK_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_CMNT_LINK_Y+INS_CMNT_LINK_HEIGHT, (UINT16)(usPosX+INS_CMNT_LINK_WIDTH), INS_CMNT_LINK_Y+INS_CMNT_LINK_HEIGHT);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_CMNT_LINK_Y + INS_CMNT_LINK_HEIGHT, (UINT16)(usPosX + INS_CMNT_LINK_WIDTH), INS_CMNT_LINK_Y + INS_CMNT_LINK_HEIGHT );
|
||||
usPosX += INS_CMNT_LINK_OFFSET_X;
|
||||
|
||||
//Display the fourth link text
|
||||
GetInsuranceText( INS_SNGL_TO_ENTER_REVIEW, sText );
|
||||
DisplayWrappedString( usPosX, INS_CMNT_LINK_Y-1, INS_CMNT_LINK_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_CMNT_LINK_Y+INS_CMNT_LINK_HEIGHT, (UINT16)(usPosX+INS_CMNT_LINK_WIDTH), INS_CMNT_LINK_Y+INS_CMNT_LINK_HEIGHT);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_CMNT_LINK_Y + INS_CMNT_LINK_HEIGHT, (UINT16)(usPosX + INS_CMNT_LINK_WIDTH), INS_CMNT_LINK_Y + INS_CMNT_LINK_HEIGHT );
|
||||
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
MarkButtonsDirty( );
|
||||
@@ -204,7 +204,7 @@ BOOLEAN DisplayComment( UINT8 ubCommentorsName, UINT8 ubComment, UINT16 usPosY )
|
||||
sNumPixels = DisplayWrappedString( INS_CMNT_FIRST_BULLET_X+INSURANCE_BULLET_TEXT_OFFSET_X, (UINT16)(usPosY), INS_CMNT_COMMENT_TEXT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( INS_CMNT_FIRST_BULLET_X+INSURANCE_BULLET_TEXT_OFFSET_X, (UINT16)(usPosY+sNumPixels), INS_CMNT_FIRST_BULLET_X+INS_CMNT_REDLINE_WIDTH, (UINT16)(usPosY+sNumPixels));
|
||||
DisplaySmallColouredLineWithShadow( INS_CMNT_FIRST_BULLET_X + INSURANCE_BULLET_TEXT_OFFSET_X, (UINT16)(usPosY + sNumPixels), INS_CMNT_FIRST_BULLET_X + INS_CMNT_REDLINE_WIDTH, (UINT16)(usPosY + sNumPixels) );
|
||||
|
||||
sNumPixels += 4;
|
||||
|
||||
|
||||
@@ -355,14 +355,14 @@ void RenderInsuranceContract()
|
||||
usPosX = INS_CTRCT_BOTTOM_LINK_RED_BAR_X;
|
||||
|
||||
//Display the red bar under the link at the bottom. and the text
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_CTRCT_BOTTON_LINK_RED_BAR_Y, (UINT16)(usPosX+INS_CTRCT_BOTTOM_LINK_RED_WIDTH), INS_CTRCT_BOTTON_LINK_RED_BAR_Y);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_CTRCT_BOTTON_LINK_RED_BAR_Y, (UINT16)(usPosX + INS_CTRCT_BOTTOM_LINK_RED_WIDTH), INS_CTRCT_BOTTON_LINK_RED_BAR_Y );
|
||||
swprintf( sText, L"%s", pMessageStrings[ MSG_HOMEPAGE ] );
|
||||
DisplayWrappedString( usPosX, INS_CTRCT_BOTTON_LINK_Y+18, INS_CTRCT_BOTTOM_LINK_RED_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
usPosX += INS_CTRCT_BOTTOM_LINK_RED_BAR_OFFSET;
|
||||
|
||||
//Display the red bar under the link at the bottom. and the text
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_CTRCT_BOTTON_LINK_RED_BAR_Y, (UINT16)(usPosX+INS_CTRCT_BOTTOM_LINK_RED_WIDTH), INS_CTRCT_BOTTON_LINK_RED_BAR_Y);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_CTRCT_BOTTON_LINK_RED_BAR_Y, (UINT16)(usPosX + INS_CTRCT_BOTTOM_LINK_RED_WIDTH), INS_CTRCT_BOTTON_LINK_RED_BAR_Y );
|
||||
GetInsuranceText( INS_SNGL_HOW_DOES_INS_WORK, sText );
|
||||
DisplayWrappedString( usPosX, INS_CTRCT_BOTTON_LINK_Y+12, INS_CTRCT_BOTTOM_LINK_RED_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
@@ -390,7 +390,7 @@ void RenderInsuranceContract()
|
||||
DisplayWrappedString( INS_CTRCT_FIRST_BULLET_TEXT_X+INSURANCE_BULLET_TEXT_OFFSET_X, INS_CTRCT_SECOND_BULLET_TEXT_Y, INS_CTRCT_INTSRUCTION_TEXT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//Display the red bar under the instruction text
|
||||
DisplaySmallRedLineWithShadow( INS_CTRCT_FIRST_BULLET_TEXT_X, INS_CTRCT_RED_BAR_UNDER_INSTRUCTION_TEXT_Y, INS_CTRCT_FIRST_BULLET_TEXT_X+INS_CTRCT_INTSRUCTION_TEXT_WIDTH, INS_CTRCT_RED_BAR_UNDER_INSTRUCTION_TEXT_Y);
|
||||
DisplaySmallColouredLineWithShadow( INS_CTRCT_FIRST_BULLET_TEXT_X, INS_CTRCT_RED_BAR_UNDER_INSTRUCTION_TEXT_Y, INS_CTRCT_FIRST_BULLET_TEXT_X + INS_CTRCT_INTSRUCTION_TEXT_WIDTH, INS_CTRCT_RED_BAR_UNDER_INSTRUCTION_TEXT_Y );
|
||||
|
||||
|
||||
sNextMercID = gsCurrentInsuranceMercIndex;
|
||||
|
||||
@@ -193,7 +193,7 @@ void RenderInsuranceInfo()
|
||||
|
||||
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( INS_INFO_SUBTITLE_X, INS_INFO_SUBTITLE_LINE_Y, INS_INFO_SUBTITLE_X+INS_INFO_SUBTITLE_LINE_WIDTH, INS_INFO_SUBTITLE_LINE_Y);
|
||||
DisplaySmallColouredLineWithShadow( INS_INFO_SUBTITLE_X, INS_INFO_SUBTITLE_LINE_Y, INS_INFO_SUBTITLE_X + INS_INFO_SUBTITLE_LINE_WIDTH, INS_INFO_SUBTITLE_LINE_Y );
|
||||
|
||||
switch( gubCurrentInsInfoSubPage )
|
||||
{
|
||||
@@ -221,13 +221,13 @@ void RenderInsuranceInfo()
|
||||
usPosX = INS_INFO_LINK_START_X;
|
||||
|
||||
//Display the red bar under the link at the bottom. and the text
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_INFO_LINK_TO_CONTRACT_Y, (UINT16)(usPosX+INS_INFO_LINK_TO_CONTRACT_WIDTH), INS_INFO_LINK_TO_CONTRACT_Y);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_INFO_LINK_TO_CONTRACT_Y, (UINT16)(usPosX + INS_INFO_LINK_TO_CONTRACT_WIDTH), INS_INFO_LINK_TO_CONTRACT_Y );
|
||||
swprintf( sText, L"%s", pMessageStrings[ MSG_HOMEPAGE ] );
|
||||
DisplayWrappedString( usPosX, INS_INFO_LINK_TO_CONTRACT_TEXT_Y+14, INS_INFO_LINK_TO_CONTRACT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
usPosX += INS_INFO_LINK_START_OFFSET + INS_INFO_LINK_TO_CONTRACT_WIDTH;
|
||||
|
||||
//Display the red bar under the link at the bottom. and the text
|
||||
DisplaySmallRedLineWithShadow( usPosX, INS_INFO_LINK_TO_CONTRACT_Y, (UINT16)(usPosX+INS_INFO_LINK_TO_CONTRACT_WIDTH), INS_INFO_LINK_TO_CONTRACT_Y);
|
||||
DisplaySmallColouredLineWithShadow( usPosX, INS_INFO_LINK_TO_CONTRACT_Y, (UINT16)(usPosX + INS_INFO_LINK_TO_CONTRACT_WIDTH), INS_INFO_LINK_TO_CONTRACT_Y );
|
||||
GetInsuranceText( INS_SNGL_TO_ENTER_REVIEW, sText );
|
||||
DisplayWrappedString( usPosX, INS_INFO_LINK_TO_CONTRACT_TEXT_Y, INS_INFO_LINK_TO_CONTRACT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
@@ -538,7 +538,7 @@ void DisplayInfoTocPage()
|
||||
GetInsuranceText( INS_SNGL_WE_CAN_OFFER_U, sText );
|
||||
DrawTextToScreen( sText, INS_INFO_TOC_SUBTITLE_X, usNewLineOffset, 640-INS_INFO_INFO_TOC_TITLE_X, INS_FONT_BIG, INS_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
usPosY = usNewLineOffset + 12;
|
||||
DisplaySmallRedLineWithShadow( INS_INFO_SUBTITLE_X, usPosY, (UINT16)(INS_INFO_SUBTITLE_X+INS_INFO_SUBTITLE_LINE_WIDTH), usPosY );
|
||||
DisplaySmallColouredLineWithShadow( INS_INFO_SUBTITLE_X, usPosY, (UINT16)(INS_INFO_SUBTITLE_X + INS_INFO_SUBTITLE_LINE_WIDTH), usPosY );
|
||||
|
||||
usNewLineOffset += INS_INFO_SPACE_BN_PARAGRAPHS;
|
||||
usNewLineOffset += INS_INFO_SPACE_BN_PARAGRAPHS;
|
||||
|
||||
@@ -190,21 +190,21 @@ void RenderInsurance()
|
||||
|
||||
|
||||
//Display the red bar under the link at the bottom. and the text
|
||||
DisplaySmallRedLineWithShadow( INSURANCE_BOTTOM_LINK_RED_BAR_X, INSURANCE_BOTTOM_LINK_RED_BAR_Y, INSURANCE_BOTTOM_LINK_RED_BAR_X+INSURANCE_BOTTOM_LINK_RED_BAR_WIDTH, INSURANCE_BOTTOM_LINK_RED_BAR_Y);
|
||||
DisplaySmallColouredLineWithShadow( INSURANCE_BOTTOM_LINK_RED_BAR_X, INSURANCE_BOTTOM_LINK_RED_BAR_Y, INSURANCE_BOTTOM_LINK_RED_BAR_X + INSURANCE_BOTTOM_LINK_RED_BAR_WIDTH, INSURANCE_BOTTOM_LINK_RED_BAR_Y );
|
||||
|
||||
GetInsuranceText( INS_SNGL_COMMENTSFROM_CLIENTS, sText );
|
||||
DisplayWrappedString( INSURANCE_LINK_TEXT_1_X, INSURANCE_LINK_TEXT_1_Y, INSURANCE_LINK_TEXT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( INSURANCE_BOTTOM_LINK_RED_BAR_X_2, INSURANCE_BOTTOM_LINK_RED_BAR_Y, INSURANCE_BOTTOM_LINK_RED_BAR_X_2+INSURANCE_BOTTOM_LINK_RED_BAR_WIDTH, INSURANCE_BOTTOM_LINK_RED_BAR_Y);
|
||||
DisplaySmallColouredLineWithShadow( INSURANCE_BOTTOM_LINK_RED_BAR_X_2, INSURANCE_BOTTOM_LINK_RED_BAR_Y, INSURANCE_BOTTOM_LINK_RED_BAR_X_2 + INSURANCE_BOTTOM_LINK_RED_BAR_WIDTH, INSURANCE_BOTTOM_LINK_RED_BAR_Y );
|
||||
|
||||
GetInsuranceText( INS_SNGL_HOW_DOES_INS_WORK, sText );
|
||||
DisplayWrappedString( INSURANCE_LINK_TEXT_2_X, INSURANCE_LINK_TEXT_2_Y+7, INSURANCE_LINK_TEXT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
|
||||
//Display the red bar under the link at the bottom
|
||||
DisplaySmallRedLineWithShadow( INSURANCE_BOTTOM_LINK_RED_BAR_X_3, INSURANCE_BOTTOM_LINK_RED_BAR_Y, INSURANCE_BOTTOM_LINK_RED_BAR_X_3+INSURANCE_BOTTOM_LINK_RED_BAR_WIDTH, INSURANCE_BOTTOM_LINK_RED_BAR_Y);
|
||||
DisplaySmallColouredLineWithShadow( INSURANCE_BOTTOM_LINK_RED_BAR_X_3, INSURANCE_BOTTOM_LINK_RED_BAR_Y, INSURANCE_BOTTOM_LINK_RED_BAR_X_3 + INSURANCE_BOTTOM_LINK_RED_BAR_WIDTH, INSURANCE_BOTTOM_LINK_RED_BAR_Y );
|
||||
|
||||
GetInsuranceText( INS_SNGL_TO_ENTER_REVIEW, sText );
|
||||
DisplayWrappedString( INSURANCE_LINK_TEXT_3_X, INSURANCE_LINK_TEXT_3_Y+7, INSURANCE_LINK_TEXT_WIDTH, 2, INS_FONT_MED, INS_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
@@ -318,7 +318,7 @@ void RemoveInsuranceDefaults()
|
||||
}
|
||||
|
||||
|
||||
void DisplaySmallRedLineWithShadow( UINT16 usStartX, UINT16 usStartY, UINT16 EndX, UINT16 EndY)
|
||||
void DisplaySmallColouredLineWithShadow( UINT16 usStartX, UINT16 usStartY, UINT16 EndX, UINT16 EndY, UINT32 colour )
|
||||
{
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
@@ -328,7 +328,7 @@ void DisplaySmallRedLineWithShadow( UINT16 usStartX, UINT16 usStartY, UINT16 End
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
|
||||
// draw the red line
|
||||
LineDraw(FALSE, usStartX, usStartY, EndX, EndY, Get16BPPColor( FROMRGB( 255, 0, 0 ) ), pDestBuf);
|
||||
LineDraw( FALSE, usStartX, usStartY, EndX, EndY, Get16BPPColor( colour ), pDestBuf );
|
||||
|
||||
// draw the black shadow line
|
||||
LineDraw(FALSE, usStartX+1, usStartY+1, EndX+1, EndY+1, Get16BPPColor( FROMRGB( 0, 0, 0 ) ), pDestBuf);
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ void RenderInsurance();
|
||||
BOOLEAN InitInsuranceDefaults();
|
||||
void DisplayInsuranceDefaults();
|
||||
void RemoveInsuranceDefaults();
|
||||
void DisplaySmallRedLineWithShadow( UINT16 usStartX, UINT16 usStartY, UINT16 EndX, UINT16 EndY);
|
||||
void DisplaySmallColouredLineWithShadow( UINT16 usStartX, UINT16 usStartY, UINT16 EndX, UINT16 EndY, UINT32 colour = FROMRGB( 255, 0, 0 ) );
|
||||
void GetInsuranceText( UINT8 ubNumber, STR16 pString );
|
||||
|
||||
|
||||
|
||||
+99
-6
@@ -87,6 +87,7 @@
|
||||
#include "Encyclopedia_Data_new.h"
|
||||
#include "CampaignHistoryMain.h" // added by Flugente
|
||||
#include "CampaignHistory_Summary.h" // added by Flugente
|
||||
#include "MercCompare.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
@@ -1048,14 +1049,17 @@ INT32 EnterLaptop()
|
||||
//JA25 UB
|
||||
SetBookMark(MERC_BOOKMARK);
|
||||
#endif
|
||||
if ( gGameExternalOptions.gEncyclopedia == TRUE && !is_networked )
|
||||
if ( gGameExternalOptions.gEncyclopedia && !is_networked )
|
||||
SetBookMark(ENCYCLOPEDIA_BOOKMARK);
|
||||
|
||||
if ( gGameExternalOptions.gBriefingRoom == TRUE && !is_networked )
|
||||
if ( gGameExternalOptions.gBriefingRoom && !is_networked )
|
||||
SetBookMark(BRIEFING_ROOM_BOOKMARK);
|
||||
|
||||
if ( gGameExternalOptions.fCampaignHistoryWebSite && !is_networked )
|
||||
SetBookMark(CAMPAIGNHISTORY_BOOKMARK);
|
||||
|
||||
if ( !is_networked )
|
||||
SetBookMark( MERCCOMPARE_BOOKMARK );
|
||||
|
||||
LoadLoadPending( );
|
||||
|
||||
@@ -1443,18 +1447,30 @@ void RenderLaptop()
|
||||
case LAPTOP_MODE_CAMPAIGNHISTORY_ABOUTTUS:
|
||||
RenderCampaignHistory();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MATRIX:
|
||||
RenderMercCompareMatrix( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_ANALYZE:
|
||||
RenderMercCompareAnalyze( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_CUSTOMERS:
|
||||
RenderMercCompareCustomers();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MAIN:
|
||||
RenderMercCompareMain();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( guiCurrentLaptopMode >= LAPTOP_MODE_WWW )
|
||||
{
|
||||
// render program bar for www program
|
||||
RenderWWWProgramTitleBar( );
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(fLoadPendingFlag)
|
||||
{
|
||||
guiCurrentLaptopMode = uiTempMode;
|
||||
@@ -1860,6 +1876,22 @@ void EnterNewLaptopMode()
|
||||
EnterCampaignHistory();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MATRIX:
|
||||
EnterMercCompareMatrix( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_ANALYZE:
|
||||
EnterMercCompareAnalyze( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_CUSTOMERS:
|
||||
EnterMercCompareCustomers();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MAIN:
|
||||
EnterMercCompareMain( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_BOBBYR_SHIPMENTS:
|
||||
EnterBobbyRShipments();
|
||||
break;
|
||||
@@ -2097,6 +2129,22 @@ void HandleLapTopHandles()
|
||||
case LAPTOP_MODE_CAMPAIGNHISTORY_ABOUTTUS:
|
||||
HandleCampaignHistory();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MATRIX:
|
||||
HandleMercCompareMatrix( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_ANALYZE:
|
||||
HandleMercCompareAnalyze( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_CUSTOMERS:
|
||||
HandleMercCompareCustomers();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MAIN:
|
||||
HandleMercCompareMain();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2652,6 +2700,22 @@ UINT32 ExitLaptopMode(UINT32 uiMode)
|
||||
case LAPTOP_MODE_CAMPAIGNHISTORY_ABOUTTUS:
|
||||
ExitCampaignHistory();
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MATRIX:
|
||||
ExitMercCompareMatrix( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_ANALYZE:
|
||||
ExitMercCompareAnalyze( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_CUSTOMERS:
|
||||
ExitMercCompareCustomers( );
|
||||
break;
|
||||
|
||||
case LAPTOP_MODE_MERCCOMPARE_MAIN:
|
||||
ExitMercCompareMain();
|
||||
break;
|
||||
}
|
||||
|
||||
if( ( uiMode != LAPTOP_MODE_NONE )&&( uiMode < LAPTOP_MODE_WWW ) )
|
||||
@@ -4250,6 +4314,35 @@ if( (gubQuest[ QUEST_FIX_LAPTOP ] != QUESTINPROGRESS) || (gGameUBOptions.LaptopQ
|
||||
}
|
||||
break;
|
||||
|
||||
case MERCCOMPARE_BOOKMARK:
|
||||
{
|
||||
// if the option is off, we instead link to a 'broken' website
|
||||
if ( !gGameExternalOptions.fCampaignHistoryWebSite )
|
||||
{
|
||||
guiCurrentWWWMode=LAPTOP_MODE_BROKEN_LINK;
|
||||
guiCurrentLaptopMode=LAPTOP_MODE_BROKEN_LINK;
|
||||
|
||||
return GoToWebPage(LAPTOP_MODE_BROKEN_LINK);
|
||||
}
|
||||
|
||||
guiCurrentWWWMode = LAPTOP_MODE_MERCCOMPARE_MAIN;
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_MERCCOMPARE_MAIN;
|
||||
|
||||
// do we have to have a World Wide Wait
|
||||
if ( LaptopSaveInfo.fVisitedBookmarkAlready[MERCCOMPARE_BOOKMARK] == FALSE )
|
||||
{
|
||||
// reset flag and set load pending flag
|
||||
LaptopSaveInfo.fVisitedBookmarkAlready[MERCCOMPARE_BOOKMARK] = TRUE;
|
||||
fLoadPendingFlag = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// fast reload
|
||||
fLoadPendingFlag = TRUE;
|
||||
fFastLoadFlag = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
|
||||
@@ -145,6 +145,12 @@ enum
|
||||
LAPTOP_MODE_CAMPAIGNHISTORY_LATESTNEWS,
|
||||
LAPTOP_MODE_CAMPAIGNHISTORY_ABOUTTUS,
|
||||
|
||||
// Flugente: MercCompare
|
||||
LAPTOP_MODE_MERCCOMPARE_MAIN,
|
||||
LAPTOP_MODE_MERCCOMPARE_MATRIX,
|
||||
LAPTOP_MODE_MERCCOMPARE_ANALYZE,
|
||||
LAPTOP_MODE_MERCCOMPARE_CUSTOMERS,
|
||||
|
||||
LAPTOP_MODE_BOBBYR_SHIPMENTS,
|
||||
|
||||
//ENCYCLOPEDIA
|
||||
@@ -219,6 +225,7 @@ enum{
|
||||
ENCYCLOPEDIA_BOOKMARK, //Encyclopedia
|
||||
BRIEFING_ROOM_BOOKMARK,
|
||||
CAMPAIGNHISTORY_BOOKMARK, // added by Flugente
|
||||
MERCCOMPARE_BOOKMARK, // added by Flugente
|
||||
TEXT_NUM_LAPTOP_BOOKMARKS
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
#ifndef __MERCCOMPARE_H
|
||||
#define __MERCCOMPARE_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
*/
|
||||
|
||||
// main page (explains what this is all about)
|
||||
BOOLEAN EnterMercCompareMain( );
|
||||
void ExitMercCompareMain( );
|
||||
void HandleMercCompareMain( );
|
||||
void RenderMercCompareMain( );
|
||||
|
||||
BOOLEAN InitMercCompareDefaults( );
|
||||
void DisplayMercCompareDefaults( );
|
||||
void RemoveMercCompareDefaults( );
|
||||
void GetMercCompareText( UINT8 ubNumber, STR16 pString );
|
||||
|
||||
// displays a few quotes of customers
|
||||
void GameInitMercCompareCustomers( );
|
||||
BOOLEAN EnterMercCompareCustomers( );
|
||||
void ExitMercCompareCustomers( );
|
||||
void HandleMercCompareCustomers( );
|
||||
void RenderMercCompareCustomers( );
|
||||
|
||||
// comparison of characters
|
||||
void GameInitMercCompareAnalyze( );
|
||||
BOOLEAN EnterMercCompareAnalyze( );
|
||||
void ExitMercCompareAnalyze( );
|
||||
void HandleMercCompareAnalyze( );
|
||||
void RenderMercCompareAnalyze( );
|
||||
|
||||
BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB );
|
||||
|
||||
// squad opinion overview
|
||||
void GameInitMercCompareMatrix( );
|
||||
BOOLEAN EnterMercCompareMatrix( );
|
||||
void ExitMercCompareMatrix( );
|
||||
void HandleMercCompareMatrix( );
|
||||
void RenderMercCompareMatrix( );
|
||||
|
||||
#endif //__MERCCOMPARE_H
|
||||
Reference in New Issue
Block a user