mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Update to Master
This commit is contained in:
+98
-22
@@ -36,7 +36,6 @@
|
||||
#include "Strategic Status.h"
|
||||
#include "Merc Contract.h"
|
||||
#include "Strategic Merc Handler.h"
|
||||
#include "Language Defines.h"
|
||||
#include "Assignments.h"
|
||||
#include "Sound Control.h"
|
||||
#include "Quests.h"
|
||||
@@ -50,6 +49,7 @@
|
||||
#include "Encrypted File.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
#include <sstream>
|
||||
#include <language.hpp>
|
||||
|
||||
//
|
||||
//****** Defines ******
|
||||
@@ -148,10 +148,16 @@
|
||||
#define FEE_X PRICE_X + 7
|
||||
#define FEE_Y NAME_Y
|
||||
#define FEE_WIDTH 37
|
||||
#define FEE_X_UB PRICE_X + 40
|
||||
#define FEE_Y_UB STATS_Y + 28
|
||||
#define FEE_Y_UB_NSGI STATS_Y
|
||||
|
||||
#define AIM_CONTRACT_X PRICE_X + 51
|
||||
#define AIM_CONTRACT_Y FEE_Y
|
||||
#define AIM_CONTRACT_WIDTH 59
|
||||
#define AIM_CONTRACT_X_UB PRICE_X + 19
|
||||
#define AIM_OFFER_X PRICE_X + 3
|
||||
#define AIM_OFFER_WIDTH 110
|
||||
|
||||
#define ONEDAY_X AIM_CONTRACT_X
|
||||
#define ONEWEEK_X AIM_CONTRACT_X
|
||||
@@ -1120,7 +1126,13 @@ BOOLEAN RenderAIMMembers()
|
||||
|
||||
UpdateMercInfo();
|
||||
|
||||
//Display AIM Member text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X_NSGI, AIM_MEMBER_ACTIVE_TEXT_Y_NSGI, AIM_MEMBER_ACTIVE_TEXT_WIDTH_NSGI, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
//Draw fee & contract
|
||||
#ifdef JA2UB
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_UB_MISSION_FEE], AIM_CONTRACT_X_UB, AIM_CONTRACT_Y_NSGI, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
#else
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X_NSGI, FEE_Y_NSGI, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X_NSGI, AIM_CONTRACT_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
@@ -1129,9 +1141,6 @@ BOOLEAN RenderAIMMembers()
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X_NSGI, MARKSMAN_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X_NSGI, MECHANAICAL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
//Display AIM Member text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X_NSGI, AIM_MEMBER_ACTIVE_TEXT_Y_NSGI, AIM_MEMBER_ACTIVE_TEXT_WIDTH_NSGI, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
//Display Option Gear Cost text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_MEMBER_OPTIONAL_GEAR_X_NSGI, EXPLOSIVE_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
@@ -1140,6 +1149,7 @@ BOOLEAN RenderAIMMembers()
|
||||
InsertDollarSignInToString( wTemp );
|
||||
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X_NSGI + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_M_FONT_STATIC_TEXT) + 5;
|
||||
DrawTextToScreen(wTemp, AIM_MEMBER_OPTIONAL_GEAR_COST_X_NSGI, EXPLOSIVE_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
#endif // JA2UB
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1163,6 +1173,12 @@ BOOLEAN RenderAIMMembers()
|
||||
|
||||
UpdateMercInfo();
|
||||
|
||||
//Display AIM Member text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X, AIM_MEMBER_ACTIVE_TEXT_Y, AIM_MEMBER_ACTIVE_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
#ifdef JA2UB
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_UB_MISSION_FEE], AIM_CONTRACT_X_UB, AIM_CONTRACT_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
#else
|
||||
//Draw fee & contract
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X, FEE_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X, AIM_CONTRACT_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
@@ -1172,9 +1188,6 @@ BOOLEAN RenderAIMMembers()
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X, MARKSMAN_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X, MECHANAICAL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
//Display AIM Member text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X, AIM_MEMBER_ACTIVE_TEXT_Y, AIM_MEMBER_ACTIVE_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
//Display Option Gear Cost text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_MEMBER_OPTIONAL_GEAR_X, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
@@ -1183,6 +1196,7 @@ BOOLEAN RenderAIMMembers()
|
||||
InsertDollarSignInToString( wTemp );
|
||||
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_M_FONT_STATIC_TEXT) + 5;
|
||||
DrawTextToScreen(wTemp, uiPosX, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
#endif
|
||||
}
|
||||
|
||||
DisableAimButton();
|
||||
@@ -1309,6 +1323,10 @@ BOOLEAN UpdateMercInfo(void)
|
||||
|
||||
if(gGameExternalOptions.gfUseNewStartingGearInterface)
|
||||
{
|
||||
#ifdef JA2UB
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X_UB, FEE_Y_UB_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT);
|
||||
DisplayWrappedString(AIM_OFFER_X, AGILITY_Y_NSGI, AIM_OFFER_WIDTH, 2, AIM_M_FONT_DYNAMIC_TEXT, AIM_FONT_MCOLOR_WHITE, zNewTacticalMessages[TACT_MSG__AIMMEMBER_FEE_TEXT], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
#else
|
||||
//Display the salaries
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH_NSGI, FEE_X_NSGI, HEALTH_Y_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH_NSGI, FEE_X_NSGI, AGILITY_Y_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||
@@ -1335,6 +1353,8 @@ BOOLEAN UpdateMercInfo(void)
|
||||
else
|
||||
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X_NSGI, AIM_MEDICAL_DEPOSIT_Y_NSGI, AIM_MEDICAL_DEPOSIT_WIDTH_NSGI, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
}
|
||||
#endif // JA2UB
|
||||
|
||||
if(!g_bUseXML_Strings)
|
||||
{
|
||||
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||
@@ -1363,6 +1383,10 @@ BOOLEAN UpdateMercInfo(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X_UB, FEE_Y_UB, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT);
|
||||
DisplayWrappedString(AIM_OFFER_X, AGILITY_Y, AIM_OFFER_WIDTH, 2, AIM_M_FONT_DYNAMIC_TEXT, AIM_FONT_MCOLOR_WHITE, zNewTacticalMessages[TACT_MSG__AIMMEMBER_FEE_TEXT], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
#else
|
||||
//Display the salaries
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH, FEE_X, HEALTH_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X, AGILITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||
@@ -1389,6 +1413,7 @@ BOOLEAN UpdateMercInfo(void)
|
||||
else
|
||||
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X, AIM_MEDICAL_DEPOSIT_Y, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
}
|
||||
#endif
|
||||
if(!g_bUseXML_Strings)
|
||||
{
|
||||
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||
@@ -2529,6 +2554,21 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
||||
|
||||
DisplayMercChargeAmount();
|
||||
|
||||
#ifdef JA2UB
|
||||
if (gubVideoConferencingMode == AIM_VIDEO_HIRE_MERC_MODE)
|
||||
{
|
||||
CHAR16 offerText[190];
|
||||
swprintf(offerText, zNewTacticalMessages[TACT_MSG__AIMMEMBER_ONE_TIME_FEE], gMercProfiles[gbCurrentSoldier].zNickname);
|
||||
const auto xCoord = AIM_MEMBER_VIDEO_CONF_TERMINAL_X + 115;
|
||||
const auto yCoord = AIM_MEMBER_VIDEO_CONF_TERMINAL_Y + 45;
|
||||
const auto textAreaWidth = 245;
|
||||
SetFontShadow(AIM_M_VIDEO_NAME_SHADOWCOLOR);
|
||||
DisplayWrappedString(xCoord, yCoord, textAreaWidth, 2, AIM_M_FONT_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, offerText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
}
|
||||
#endif // JA2UB
|
||||
|
||||
|
||||
// if( gfMercIsTalking && !gfIsAnsweringMachineActive)
|
||||
if( gfMercIsTalking && gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
|
||||
{
|
||||
@@ -2578,6 +2618,9 @@ BOOLEAN DisplayMercsVideoFace()
|
||||
|
||||
void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
||||
{
|
||||
#ifdef JA2UB
|
||||
return;
|
||||
#else
|
||||
UINT16 i, usPosY, usPosX;
|
||||
|
||||
//First draw the select light for the contract length buttons
|
||||
@@ -2631,6 +2674,8 @@ void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
||||
usPosY += AIM_MEMBER_BUY_EQUIPMENT_GAP;
|
||||
}
|
||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||
|
||||
#endif // JA2UB
|
||||
}
|
||||
|
||||
|
||||
@@ -2654,7 +2699,10 @@ UINT32 DisplayMercChargeAmount()
|
||||
giContractAmount = 0;
|
||||
|
||||
//the contract charge amount
|
||||
|
||||
#ifdef JA2UB
|
||||
// Special offer for a limited time! Act fast!
|
||||
giContractAmount = gMercProfiles[gbCurrentSoldier].uiWeeklySalary;
|
||||
#else
|
||||
// Get the salary rate
|
||||
if( gubContractLength == AIM_CONTRACT_LENGTH_ONE_DAY)
|
||||
giContractAmount = gMercProfiles[gbCurrentSoldier].sSalary;
|
||||
@@ -2676,6 +2724,7 @@ UINT32 DisplayMercChargeAmount()
|
||||
{
|
||||
giContractAmount += gMercProfiles[gbCurrentSoldier].usOptionalGearCost;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2686,10 +2735,15 @@ UINT32 DisplayMercChargeAmount()
|
||||
//if the merc hasnt just been hired
|
||||
// if( FindSoldierByProfileID( gbCurrentSoldier, TRUE ) == NULL )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
// Don't even have to pay for medical insurance! What a DEAL!
|
||||
swprintf(wTemp, L"%s", wDollarTemp);
|
||||
#else
|
||||
if( gMercProfiles[ gbCurrentSoldier ].bMedicalDeposit )
|
||||
swprintf(wTemp, L"%s %s", wDollarTemp, VideoConfercingText[AIM_MEMBER_WITH_MEDICAL] );
|
||||
else
|
||||
swprintf(wTemp, L"%s", wDollarTemp );
|
||||
#endif // JA2UB
|
||||
|
||||
DrawTextToScreen(wTemp, AIM_CONTRACT_CHARGE_AMOUNNT_X+1, AIM_CONTRACT_CHARGE_AMOUNNT_Y+3, 0, AIM_M_VIDEO_CONTRACT_AMOUNT_FONT, AIM_M_VIDEO_CONTRACT_AMOUNT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
@@ -3888,14 +3942,14 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
||||
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
||||
|
||||
//Enable the ability to click on the BIG face to go to different screen
|
||||
MSYS_EnableRegion(&gSelectedFaceRegion);
|
||||
MSYS_EnableRegion(&gSelectedFaceRegion);
|
||||
|
||||
// EnableDisableCurrentVideoConferenceButtons(FALSE);
|
||||
if( gubVideoConferencingPreviousMode == AIM_VIDEO_HIRE_MERC_MODE )
|
||||
{
|
||||
// Enable the current video conference buttons
|
||||
EnableDisableCurrentVideoConferenceButtons(FALSE);
|
||||
}
|
||||
if( gubVideoConferencingPreviousMode == AIM_VIDEO_HIRE_MERC_MODE )
|
||||
{
|
||||
// Enable the current video conference buttons
|
||||
EnableDisableCurrentVideoConferenceButtons(FALSE);
|
||||
}
|
||||
|
||||
|
||||
fVideoConferenceCreated = FALSE;
|
||||
@@ -4086,6 +4140,22 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
||||
|
||||
// InitVideoFaceTalking(gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT);
|
||||
DelayMercSpeech( gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT, 750, TRUE, FALSE );
|
||||
|
||||
#ifdef JA2UB
|
||||
// Disable and hide contract length & gear purchase buttons
|
||||
gfBuyEquipment = TRUE;
|
||||
for (size_t i = 0; i < 3; i++)
|
||||
{
|
||||
DisableButton(giContractLengthButton[i]);
|
||||
HideButton(giContractLengthButton[i]);
|
||||
|
||||
if (i < 2)
|
||||
{
|
||||
DisableButton(giBuyEquipmentButton[i]);
|
||||
HideButton(giBuyEquipmentButton[i]);
|
||||
}
|
||||
}
|
||||
#endif // JA2UB
|
||||
}
|
||||
|
||||
|
||||
@@ -5298,11 +5368,17 @@ BOOLEAN DisplayShadedStretchedMercFace( UINT8 ubMercID, UINT16 usPosX, UINT16 us
|
||||
void DemoHiringOfMercs( )
|
||||
{
|
||||
INT16 i;
|
||||
#ifdef GERMAN
|
||||
UINT8 MercID[]={ 7, 10, 4, 14, 50 };
|
||||
#else
|
||||
UINT8 MercID[]={ 7, 10, 4, 42, 33 };
|
||||
#endif
|
||||
UINT8 MercID[5];
|
||||
MercID[0] = 7;
|
||||
MercID[1] = 10;
|
||||
MercID[2] = 4;
|
||||
if( g_lang == i18n::Lang::de ) {
|
||||
MercID[3] = 14;
|
||||
MercID[4] = 50;
|
||||
} else {
|
||||
MercID[3] = 42;
|
||||
MercID[4] = 33;
|
||||
}
|
||||
MERC_HIRE_STRUCT HireMercStruct;
|
||||
static BOOLEAN fHaveCalledBefore=FALSE;
|
||||
|
||||
@@ -5393,20 +5469,20 @@ void DisplayPopUpBoxExplainingMercArrivalLocationAndTime( )
|
||||
//create the string to display to the user, looks like....
|
||||
// L"%s should arrive at the designated drop-off point ( sector %d:%d %s ) on day %d, at approximately %s.", //first %s is mercs name, next is the sector location and name where they will be arriving in, lastely is the day an the time of arrival
|
||||
|
||||
#ifdef GERMAN
|
||||
if( g_lang == i18n::Lang::de ) {
|
||||
//Germans version has a different argument order
|
||||
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
||||
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
||||
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
||||
zTimeString,
|
||||
zSectorIDString );
|
||||
#else
|
||||
} else {
|
||||
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
||||
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
||||
zSectorIDString,
|
||||
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
||||
zTimeString );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -627,7 +627,7 @@ TestTable::Display( )
|
||||
{
|
||||
MSYS_DefineRegion( &it->mMouseRegion[i - mFirstEntryShown],
|
||||
usPosX, usPosY, usPosX + it->GetRequiredLength(), usPosY + heightperrow,
|
||||
MSYS_PRIORITY_HIGHEST, CURSOR_WWW,
|
||||
MSYS_PRIORITY_HIGHEST-3, CURSOR_WWW,
|
||||
MSYS_NO_CALLBACK, ( *it ).RegionClickCallBack );
|
||||
MSYS_AddRegion( &it->mMouseRegion[i - mFirstEntryShown] );
|
||||
|
||||
|
||||
+10
-9
@@ -20,6 +20,7 @@
|
||||
// HEADROCK HAM 4
|
||||
#include "input.h"
|
||||
#include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item
|
||||
#include <language.hpp>
|
||||
|
||||
|
||||
#define BOBBYR_DEFAULT_MENU_COLOR 255
|
||||
@@ -115,11 +116,7 @@
|
||||
#define BOBBYR_ITEM_QTY_NUM_X BOBBYR_GRIDLOC_X + 105//BOBBYR_ITEM_COST_TEXT_X + 1
|
||||
#define BOBBYR_ITEM_QTY_NUM_Y BOBBYR_ITEM_QTY_TEXT_Y//BOBBYR_ITEM_COST_TEXT_Y + 40
|
||||
|
||||
#ifdef CHINESE
|
||||
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH - 10 //BOBBYR_ITEM_QTY_NUM_X
|
||||
#else
|
||||
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
|
||||
#endif
|
||||
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
|
||||
|
||||
#define BOBBY_RAY_NOT_PURCHASED 255
|
||||
#define BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE 200
|
||||
@@ -2506,7 +2503,11 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
||||
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED)
|
||||
{
|
||||
swprintf(sTemp, L"% 4d", BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased);
|
||||
DrawTextToScreen(sTemp, BOBBYR_ITEMS_BOUGHT_X, (UINT16)usPosY, 0, FONT14ARIAL, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
auto bobbyRItemsBoughtX{ BOBBYR_ITEMS_BOUGHT_X };
|
||||
if (g_lang == i18n::Lang::zh) {
|
||||
bobbyRItemsBoughtX -= 10;
|
||||
}
|
||||
DrawTextToScreen(sTemp, bobbyRItemsBoughtX, (UINT16)usPosY, 0, FONT14ARIAL, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2516,11 +2517,11 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
||||
//if it's a used item, display how damaged the item is
|
||||
if( fUsed )
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if ( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( sTemp, ChineseSpecString2, LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );//zww
|
||||
#else
|
||||
} else {
|
||||
swprintf( sTemp, L"*%3d%%%%", LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );
|
||||
#endif
|
||||
}
|
||||
|
||||
DrawTextToScreen(sTemp, (UINT16)(BOBBYR_ITEM_NAME_X-2), (UINT16)(usPosY - BOBBYR_ORDER_NUM_Y_OFFSET), BOBBYR_ORDER_NUM_WIDTH, BOBBYR_ITEM_NAME_TEXT_FONT, BOBBYR_ITEM_NAME_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "GameSettings.h"
|
||||
#include <vfs/Core/vfs.h>
|
||||
#include <vfs/Core/File/vfs_file.h>
|
||||
#include <language.hpp>
|
||||
|
||||
/*
|
||||
typedef struct
|
||||
@@ -488,11 +489,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
||||
SetButtonCursor(guiBobbyRClearOrder, CURSOR_LAPTOP_SCREEN);
|
||||
SpecifyDisabledButtonStyle( guiBobbyRClearOrder, DISABLED_STYLE_NONE );
|
||||
//inshy: fix position of text for buttons
|
||||
#ifdef FRENCH
|
||||
if(g_lang == i18n::Lang::fr) {
|
||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 13, 10, TRUE );
|
||||
#else
|
||||
} else {
|
||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 39, 10, TRUE );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Accept Order button
|
||||
guiBobbyRAcceptOrderImage = LoadButtonImage("LAPTOP\\AcceptOrderButton.sti", 2,0,-1,1,-1 );
|
||||
@@ -504,11 +505,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRAcceptOrderCallback);
|
||||
SetButtonCursor( guiBobbyRAcceptOrder, CURSOR_LAPTOP_SCREEN);
|
||||
//inshy: fix position of text for buttons
|
||||
#ifdef FRENCH
|
||||
if(g_lang == i18n::Lang::fr) {
|
||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 15, 24, TRUE );
|
||||
#else
|
||||
} else {
|
||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 43, 24, TRUE );
|
||||
#endif
|
||||
}
|
||||
SpecifyDisabledButtonStyle( guiBobbyRAcceptOrder, DISABLED_STYLE_SHADED );
|
||||
|
||||
if( gbSelectedCity == -1 )
|
||||
|
||||
@@ -17,4 +17,4 @@ BOOLEAN DrawBriefingRoomDefaults();
|
||||
BOOLEAN DisplayBriefingRoomSlogan();
|
||||
BOOLEAN DisplayBriefingRoomCopyright();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -17,4 +17,4 @@ BOOLEAN DrawBriefingRoomEnterDefaults();
|
||||
BOOLEAN DisplayBriefingRoomEnterSlogan();
|
||||
BOOLEAN DisplayBriefingRoomEnterCopyright();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -133,4 +133,4 @@ extern BOOLEAN SaveBriefingRoomToSaveGameFile( HWFILE hFile );
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
|
||||
|
||||
#endif // __CAMPAIGNHISTORY_DATA_H
|
||||
#endif // __CAMPAIGNHISTORY_DATA_H
|
||||
|
||||
@@ -27,4 +27,4 @@ void ExitCampaignHistory_News();
|
||||
void HandleCampaignHistory_News();
|
||||
void RenderCampaignHistory_News();
|
||||
|
||||
#endif // __CAMPAIGNHISTORY_SUMMARY_H
|
||||
#endif // __CAMPAIGNHISTORY_SUMMARY_H
|
||||
|
||||
@@ -332,4 +332,4 @@ STR16 GetIncidentName( UINT32 aIncidentId );
|
||||
|
||||
UINT32 GetIdOfCurrentlyOngoingIncident();
|
||||
|
||||
#endif // __CAMPAIGNSTATS_H
|
||||
#endif // __CAMPAIGNSTATS_H
|
||||
|
||||
@@ -7,4 +7,4 @@ void ExitIMPAboutUs( void );
|
||||
void EnterIMPAboutUs( void );
|
||||
void HandleIMPAboutUs( void );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -8,4 +8,4 @@ void HandleIMPAttributeEntrance( void );
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,4 +7,4 @@ void RenderIMPAttributeFinish( void );
|
||||
void ExitIMPAttributeFinish( void );
|
||||
void HandleIMPAttributeFinish( void );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -22,4 +22,4 @@ extern BOOLEAN fReturnStatus;
|
||||
|
||||
INT8 StartingLevelChosen(); // added - SANDRO
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "text.h"
|
||||
#include "LaptopSave.h"
|
||||
|
||||
#include <language.hpp>
|
||||
|
||||
#define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138
|
||||
#define NICK_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 195
|
||||
@@ -552,14 +553,14 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
||||
//Heinz (18.01.2009): Russian layout
|
||||
// ViSoR (07.01.2012) : Russian and Belarussian layouts
|
||||
//
|
||||
#if defined(RUSSIAN) || defined(BELARUSSIAN)
|
||||
if(g_lang == i18n::Lang::ru) {
|
||||
// ViSoR (02.02.2013): Fix for Cyrillic layouts
|
||||
DWORD threadId = GetWindowThreadProcessId( ghWindow, 0 );
|
||||
DWORD layout = (DWORD)GetKeyboardLayout( threadId ) & 0xFFFF;
|
||||
if( layout == 0x419 ) // Russian
|
||||
{
|
||||
unsigned char TranslationTable[] =
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨";
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨ ";
|
||||
|
||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||
@@ -567,28 +568,23 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
||||
else if( layout == 0x423 ) // Belarussian
|
||||
{
|
||||
unsigned char TranslationTable[] =
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨";
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨ ";
|
||||
|
||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||
}
|
||||
else if( !CheckIsKeyValid( uiKey ) )
|
||||
uiKey = '#';
|
||||
|
||||
if( uiKey != '#')
|
||||
#else
|
||||
#ifndef USE_CODE_PAGE
|
||||
if( uiKey >= 'A' && uiKey <= 'Z' ||
|
||||
}
|
||||
if( (g_lang != i18n::Lang::ru &&
|
||||
uiKey >= 'A' && uiKey <= 'Z' ||
|
||||
uiKey >= 'a' && uiKey <= 'z' ||
|
||||
uiKey >= '0' && uiKey <= '9' ||
|
||||
uiKey == '_' || uiKey == '.' ||
|
||||
uiKey == ' ' || uiKey == '"' ||
|
||||
uiKey == 39 // This is ' which cannot be written explicitly here of course
|
||||
)
|
||||
#else
|
||||
if( charSet::IsFromSet( uiKey, charSet::CS_SPACE|charSet::CS_ALPHA_NUM|charSet::CS_SPECIAL_ALPHA ) )
|
||||
#endif
|
||||
#endif
|
||||
) ||
|
||||
uiKey != '#')
|
||||
{
|
||||
// if the current string position is at max or great, do nothing
|
||||
switch( ubTextEnterMode )
|
||||
|
||||
@@ -9,4 +9,4 @@ void HandleIMPBeginScreen( void );
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,4 +7,4 @@ void RenderIMPCharacterAndDisabilityEntrance( void );
|
||||
void ExitIMPCharacterAndDisabilityEntrance( void );
|
||||
void HandleIMPCharacterAndDisabilityEntrance( void );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -20,4 +20,4 @@ void ClearAllSkillsList( void );
|
||||
|
||||
extern STR8 pPlayerSelectedFaceFileNames[ NUMBER_OF_PLAYER_PORTRAITS ];
|
||||
extern STR8 pPlayerSelectedBigFaceFileNames[ NUMBER_OF_PLAYER_PORTRAITS ];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ void HandleIMPFinish( void );
|
||||
extern BOOLEAN fFinishedCharGeneration;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -15,4 +15,4 @@ void HandleImpHomePage( void );
|
||||
#define IMP_MERC_FILENAME "IMP"
|
||||
|
||||
extern INT32 GlowColorsList[][3];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -29,4 +29,4 @@ enum
|
||||
IMP__FINISH,
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -9,4 +9,4 @@ void HandleIMPPersonalityEntrance( void );
|
||||
|
||||
STR16 pSkillTraitBeginIMPStrings[];
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -9,4 +9,4 @@ void HandleIMPPersonalityFinish( void );
|
||||
extern UINT8 bPersonalityEndState;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -12,4 +12,4 @@ void BltAnswerIndents( INT32 iNumberOfIndents );
|
||||
extern INT32 giCurrentPersonalityQuizQuestion;
|
||||
extern INT32 iCurrentAnswer;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -10,4 +10,4 @@ BOOLEAN RenderPortrait( INT16 sX, INT16 sY );
|
||||
extern INT32 iPortraitNumber;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "GameSettings.h"
|
||||
#endif
|
||||
|
||||
#include <language.hpp>
|
||||
|
||||
#define IMP_SEEK_AMOUNT 5 * 80 * 2
|
||||
|
||||
@@ -204,18 +205,18 @@ void PrintImpText( void )
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 81, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_6, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
//inshy (18.01.2009): fix position for russian text
|
||||
#ifdef RUSSIAN
|
||||
if( g_lang == i18n::Lang::ru ) {
|
||||
// male
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 225, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
// female
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 335, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
#else
|
||||
} else {
|
||||
// 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);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
case ( IMP_PERSONALITY ):
|
||||
|
||||
@@ -145,4 +145,4 @@ enum{
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ UINT32 PlayVoice( void );
|
||||
|
||||
extern UINT32 iSelectedIMPVoiceSet;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -835,4 +835,4 @@ template<> void TestTableTemplate<3>::Init( UINT16 sX, UINT16 sY, UINT16 sX_End
|
||||
AddColumnDataProvider( itemnamecol );*/
|
||||
|
||||
TestTable::Init( sX, sY, sX_End, sY_End );
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -851,4 +851,4 @@ BOOLEAN LoadPMC( HWFILE hwFile )
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,4 +254,4 @@ private:
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -305,4 +305,4 @@ enum{
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -227,4 +227,4 @@ BOOLEAN WriteAimAvailability(STR fileName)
|
||||
FileClose( hFile );
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,4 +287,4 @@ BOOLEAN WriteMercAvailability(STR fileName)
|
||||
FileClose( hFile );
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,4 +268,4 @@ BOOLEAN ReadInDeliveryMethods(STR fileName)
|
||||
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,4 +236,4 @@ BOOLEAN ReadInShippingDestinations(STR fileName, BOOLEAN localizedVersion)
|
||||
XML_ParserFree(parser);
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,4 @@ void RenderFloristCards();
|
||||
|
||||
extern INT8 gbCurrentlySelectedCard;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -21,4 +21,4 @@ extern UINT32 guiCurrentlySelectedFlower;
|
||||
extern UINT8 gubCurFlowerIndex;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -12,4 +12,4 @@ void InitFloristOrderForm();
|
||||
|
||||
void InitFloristOrderFormVariables();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,4 +7,4 @@ void ExitInsuranceComments();
|
||||
void HandleInsuranceComments();
|
||||
void RenderInsuranceComments();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -9,4 +9,4 @@ void RenderInsuranceInfo();
|
||||
void EnterInitInsuranceInfo();
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -9,4 +9,4 @@ void RenderMercsAccount();
|
||||
|
||||
UINT32 CalculateHowMuchPlayerOwesSpeck();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+116
-40
@@ -418,6 +418,34 @@ BOOLEAN EnterMercsFiles()
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
static void TryToHireMERC()
|
||||
{
|
||||
if ( (gMercProfiles[GetAvailableMercIDFromMERCArray( gubCurMercIndex )].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
//bought gear before
|
||||
fMercBuyEquipment = 0;
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer
|
||||
{
|
||||
fMercBuyEquipment = 1;
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
else
|
||||
{
|
||||
//prompt to buy gear
|
||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[MERC_FILES_BUY_GEAR], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||
}
|
||||
#else
|
||||
//prompt to buy gear
|
||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[MERC_FILES_BUY_GEAR], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||
#endif // JA2UB
|
||||
}
|
||||
}
|
||||
|
||||
void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||
@@ -442,15 +470,7 @@ void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
//else try to hire the merc
|
||||
else
|
||||
{
|
||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
//bought gear before
|
||||
fMercBuyEquipment = 0;
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
else
|
||||
//prompt to buy gear
|
||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||
TryToHireMERC();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -701,15 +721,7 @@ void BtnMercHireButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
//else try to hire the merc
|
||||
else
|
||||
{
|
||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
//bought gear before
|
||||
fMercBuyEquipment = 0;
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
else
|
||||
//prompt to buy gear
|
||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||
TryToHireMERC();
|
||||
}
|
||||
|
||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||
@@ -1040,14 +1052,25 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
DrawNumeralsToScreen(gMercProfiles[ ubMercID ].bMedical, 3, MERC_STATS_SECOND_NUM_COL_X, usPosY, MERC_STATS_FONT, ubColor);
|
||||
usPosY += MERC_SPACE_BN_LINES;
|
||||
|
||||
//Daily Salary
|
||||
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
//Merc Salary
|
||||
#ifdef JA2UB
|
||||
// One time "Fee" instead of "Salary" per day
|
||||
DrawTextToScreen( CharacterInfo[AIM_MEMBER_FEE], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength(MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT);
|
||||
swprintf(sString, L"%d", gMercProfiles[ ubMercID ].sSalary);
|
||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( CharacterInfo[AIM_MEMBER_FEE], MERC_NAME_FONT );
|
||||
swprintf( sString, L"%d", gMercProfiles[ubMercID].uiWeeklySalary );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf(sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY]);
|
||||
#else
|
||||
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT );
|
||||
swprintf( sString, L"%d", gMercProfiles[ubMercID].sSalary );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf( sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY] );
|
||||
#endif // JA2UB
|
||||
|
||||
wcscat( sString, sTemp );
|
||||
DrawTextToScreen( sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
@@ -1059,14 +1082,27 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
if (gubCurMercFilesTogglePage == MERC_FILES_INV_PAGE)
|
||||
{
|
||||
//Gear Cost
|
||||
usPosY = usPosY + 145;
|
||||
usPosY = usPosY + 148;
|
||||
DrawTextToScreen( MercInfo[MERC_FILES_GEAR], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
if ( (gMercProfiles[ ubMercID ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS )
|
||||
&& ( !(gMercProfiles[ ubMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable ) )
|
||||
if ( (gMercProfiles[ubMercID].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)
|
||||
&& (!(gMercProfiles[ubMercID].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable) )
|
||||
{
|
||||
gMercProfiles[ ubMercID ].usOptionalGearCost = 0;
|
||||
}
|
||||
#ifdef JA2UB
|
||||
if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer
|
||||
{
|
||||
gMercProfiles[ubMercID].usOptionalGearCost = 0;
|
||||
|
||||
swprintf(NsString, L"+ ");
|
||||
// Special offer text above the gear cost
|
||||
const auto y = usPosY - MERC_SPACE_BN_LINES + 2;
|
||||
swprintf( NsString, MercInfo[MERC_FILES_SPECIAL_OFFER] );
|
||||
DrawTextToScreen( NsString, usPosX, y, 95, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
}
|
||||
#endif // JA2UB
|
||||
|
||||
swprintf( NsString, L"+ " );
|
||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost);
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
@@ -1078,7 +1114,11 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
DrawTextToScreen( MercInfo[MERC_FILES_TOTAL], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_NAME_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
swprintf(N2sString, L"= ");
|
||||
#ifdef JA2UB
|
||||
swprintf( sTemp, L"%d", gMercProfiles[ubMercID].usOptionalGearCost + gMercProfiles[ubMercID].uiWeeklySalary );
|
||||
#else
|
||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
||||
#endif
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
wcscat( N2sString, sTemp );
|
||||
@@ -1175,6 +1215,22 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
||||
return(FALSE);//not enough big ones $$$sATMText
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
Namount = 0;
|
||||
Namount += gMercProfiles[ubMercID].uiWeeklySalary;
|
||||
if ( gSelectedMercKit > 0 )
|
||||
{
|
||||
Namount += gMercProfiles[ubMercID].usOptionalGearCost;
|
||||
}
|
||||
|
||||
if ( Namount > LaptopSaveInfo.iCurrentBalance )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, sATMText[4], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||
return(FALSE);//not enough big ones $$$sATMText
|
||||
}
|
||||
#endif // JA2UB
|
||||
|
||||
|
||||
bReturnCode = HireMerc( &HireMercStruct );
|
||||
|
||||
//already have limit of mercs on the team
|
||||
@@ -1196,16 +1252,25 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
||||
AddTransactionToPlayersBook( HIRED_MERC, ubMercID, GetWorldTotalMin(), Namount );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
#ifdef JA2UB
|
||||
//add an entry in the finacial page for the hiring of the merc
|
||||
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -(INT32)( gMercProfiles[ubMercID].uiWeeklySalary ) );
|
||||
#endif
|
||||
INT32 totalCost = gMercProfiles[ubMercID].uiWeeklySalary;
|
||||
if ( gSelectedMercKit > 0 ) // First kit is included in the initial fee
|
||||
{
|
||||
totalCost += gMercProfiles[ubMercID].usOptionalGearCost;
|
||||
}
|
||||
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -totalCost );
|
||||
#endif
|
||||
|
||||
//JMich_MMG: Setting the flag that we bought the gear and still haven't paid for it if we succesfully hired the merc
|
||||
if ( fMercBuyEquipment )
|
||||
{
|
||||
gMercProfiles[ ubMercID ].ubMiscFlags |= PROFILE_MISC_FLAG_ALREADY_USED_ITEMS;
|
||||
#ifdef JA2UB
|
||||
// Gear cost gets added to initial hiring fee in UB
|
||||
#else
|
||||
gMercProfiles[ ubMercID ].ubMiscFlags2 |= PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID;
|
||||
#endif // JA2UB
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
@@ -1305,15 +1370,7 @@ void HandleMercsFilesKeyBoardInput( )
|
||||
//else try to hire the merc
|
||||
else
|
||||
{
|
||||
//bought gear before
|
||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
fMercBuyEquipment = 0;
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
//prompt to buy gear
|
||||
else
|
||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||
TryToHireMERC();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1783,11 +1840,22 @@ void MercWeaponKitSelectionUpdate(UINT8 selectedInventory)
|
||||
void MercHireButtonGearYesNoCallback (UINT8 bExitValue)
|
||||
{
|
||||
//yes, buy gear
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
if ( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
fMercBuyEquipment = 1;
|
||||
}
|
||||
//no, no gear
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
// Switch to the free, first kit
|
||||
gSelectedMercKit = 0;
|
||||
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||
fMercBuyEquipment = 1;
|
||||
#else
|
||||
fMercBuyEquipment = 0;
|
||||
#endif // JA2UB
|
||||
}
|
||||
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
@@ -1810,6 +1878,10 @@ void MercProcessHireAfterGear()
|
||||
|
||||
void NextMercMember()
|
||||
{
|
||||
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||
gSelectedMercKit = 0;
|
||||
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||
|
||||
if (gfKeyState [ CTRL ])
|
||||
gubCurMercIndex = LaptopSaveInfo.gubLastMercIndex;
|
||||
else if (gfKeyState [ SHIFT ])
|
||||
@@ -1840,6 +1912,10 @@ void NextMercMember()
|
||||
|
||||
void PrevMercMember()
|
||||
{
|
||||
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||
gSelectedMercKit = 0;
|
||||
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||
|
||||
if (gfKeyState [ CTRL ])
|
||||
gubCurMercIndex = 0;
|
||||
else if (gfKeyState [ SHIFT ])
|
||||
|
||||
@@ -7,4 +7,4 @@ void ExitMercsFiles();
|
||||
void HandleMercsFiles();
|
||||
void RenderMercsFiles();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,4 +7,4 @@ void ExitMercsNoAccount();
|
||||
void HandleMercsNoAccount();
|
||||
void RenderMercsNoAccount();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user