Merged Multi Player Project into main branch

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2144 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2008-05-12 08:20:47 +00:00
parent c448713412
commit 3e22dce318
132 changed files with 14527 additions and 4859 deletions
+21 -4
View File
@@ -47,7 +47,7 @@
#endif
#include "Strategic Town Loyalty.h"
#include "connect.h"
//
//****** Defines ******
@@ -1817,7 +1817,7 @@ INT8 AimMemberHireMerc()
}
//add an entry in the history page for the hiring of the merc
AddHistoryToPlayersLog(HISTORY_HIRED_MERC_FROM_AIM, ubCurrentSoldier, GetWorldTotalMin(), -1, -1 );
if(!is_client)AddHistoryToPlayersLog(HISTORY_HIRED_MERC_FROM_AIM, ubCurrentSoldier, GetWorldTotalMin(), -1, -1 );
return(TRUE);
}
@@ -1994,7 +1994,7 @@ UINT32 DisplayMercChargeAmount()
// if there is a medical deposit, add it in
if( gMercProfiles[ gbCurrentSoldier ].bMedicalDeposit )
{
giContractAmount += gMercProfiles[gbCurrentSoldier].sMedicalDepositAmount;
if(!is_client)giContractAmount += gMercProfiles[gbCurrentSoldier].sMedicalDepositAmount;//hayden
}
//If hired with the equipment, add it in aswell
@@ -3206,7 +3206,11 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
{
gubVideoConferencingPreviousMode = gubVideoConferencingMode;
gubMercAttitudeLevel = 0;
gubContractLength = AIM_CONTRACT_LENGTH_ONE_WEEK;
if (is_networked)
gubContractLength = AIM_CONTRACT_LENGTH_ONE_DAY;
else
gubContractLength = AIM_CONTRACT_LENGTH_ONE_WEEK;
if( gMercProfiles[gbCurrentSoldier].usOptionalGearCost == 0 )
gfBuyEquipment = FALSE;
@@ -3290,6 +3294,11 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
usPosY += AIM_MEMBER_BUY_EQUIPMENT_GAP;
}
if(is_client)//hayden : only needed for 1 day...
{
DisableButton( giContractLengthButton[1] );
DisableButton( giContractLengthButton[2] );
}
// BuyEquipment button
usPosY = AIM_MEMBER_BUY_CONTRACT_LENGTH_Y;
for(i=0; i<2; i++)
@@ -3310,6 +3319,12 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
if( gMercProfiles[gbCurrentSoldier].usOptionalGearCost == 0 )
DisableButton( giBuyEquipmentButton[1] );
if(!ALLOW_EQUIP && is_networked)
{
gfBuyEquipment = FALSE;
DisableButton( giBuyEquipmentButton[0] );
DisableButton( giBuyEquipmentButton[1] );
}
// Authorize button
usPosX = AIM_MEMBER_AUTHORIZE_PAY_X;
@@ -4372,6 +4387,8 @@ void DisplayPopUpBoxExplainingMercArrivalLocationAndTime( )
if( LaptopSaveInfo.sLastHiredMerc.fHaveDisplayedPopUpInLaptop )
return;
if(is_client)
return;
pSoldier = FindSoldierByProfileID( (UINT8)LaptopSaveInfo.sLastHiredMerc.iIdOfMerc, TRUE );
if( pSoldier == NULL )
+28 -4
View File
@@ -25,6 +25,8 @@
#include "strategicmap.h"
#endif
#include "Strategic Event Handler.h"
#include "connect.h"
typedef struct
{
@@ -341,7 +343,10 @@ void ShutDownBobbyRNewMailOrders();
void GameInitBobbyRMailOrder()
{
gubSelectedLight = 0;
if (is_networked)
gubSelectedLight = 2; //hayden
else
gubSelectedLight = 0;
gpNewBobbyrShipments = NULL;
giNumberOfNewBobbyRShipment = 0;
@@ -778,7 +783,7 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
CHAR16 zTemp[ 128 ];
//if the city is Drassen, and the airport sector is player controlled
if( gbSelectedCity == BR_DRASSEN && !StrategicMap[ SECTOR_INFO_TO_STRATEGIC_INDEX( SEC_B13 ) ].fEnemyControlled )
if( gbSelectedCity == BR_DRASSEN && !StrategicMap[ SECTOR_INFO_TO_STRATEGIC_INDEX( SEC_B13 ) ].fEnemyControlled || is_client )
{
//Quick hack to bypass the confirmation box
ConfirmBobbyRPurchaseMessageBoxCallBack( MSG_BOX_RETURN_YES );
@@ -1393,6 +1398,7 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
{
UINT8 i;
UINT16 usPosY, usPosX;
UINT16 usFontHeight = GetFontHeight( BOBBYR_DROPDOWN_FONT );
HVOBJECT hImageHandle;
HVOBJECT hArrowHandle;
@@ -2158,9 +2164,19 @@ void ConfirmBobbyRPurchaseMessageBoxCallBack( UINT8 bExitValue )
void EnterInitBobbyRayOrder()
{
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * MAX_PURCHASE_AMOUNT);
gubSelectedLight = 0;
if (is_networked)
gubSelectedLight = 2; //hayden
else
gubSelectedLight = 0;
gfReDrawBobbyOrder = TRUE;
gbSelectedCity = -1;
if (is_networked)
gbSelectedCity = 2; //hayden , was -1
else
gbSelectedCity = -1;
gubCityAtTopOfList = 0;
//Get rid of the city drop dowm, if it is being displayed
@@ -2345,7 +2361,15 @@ BOOLEAN AddNewBobbyRShipment( BobbyRayPurchaseStruct *pPurchaseStruct, UINT8 ubD
//AddStrategicEvent( EVENT_BOBBYRAY_PURCHASE, uiResetTimeSec, cnt);
if(is_client)
{
BobbyRayPurchaseEventCallback( iFoundSpot); //hayden - instant delivery ?
//AddStrategicEventUsingSeconds( EVENT_BOBBYRAY_PURCHASE, GetWorldDayInSeconds() + 10, iFoundSpot );
}
else
{
AddFutureDayStrategicEvent( EVENT_BOBBYRAY_PURCHASE, (8 + Random(4) ) * 60, iFoundSpot, bDaysAhead );
}
return( TRUE );
}
-1
View File
@@ -1238,7 +1238,6 @@ BOOLEAN LoadImpCharacter( STR nickName )
HWFILE hFile;
UINT32 uiBytesRead = 0;
// WANNE: Enlarged the array from 13 characters to 32.
char zFileName[32];
//ADB first try to load the new kind
+2 -2
View File
@@ -339,7 +339,7 @@
FavorSizeOrSpeed="1"
OptimizeForProcessor="3"
OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories="&quot;..\Standard Gaming Platform&quot;;..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\strategic;.\"
AdditionalIncludeDirectories="..\Multiplayer;&quot;..\Standard Gaming Platform&quot;;..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\strategic;.\"
PreprocessorDefinitions="PRECOMPILEDHEADERS;NDEBUG;WIN32;_WINDOWS;JA2;XML_STATIC;CINTERFACE"
StringPooling="TRUE"
RuntimeLibrary="0"
@@ -390,7 +390,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;..\Standard Gaming Platform&quot;;..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\lua;..\strategic;.\"
AdditionalIncludeDirectories="..\Multiplayer;&quot;..\Standard Gaming Platform&quot;;..\TileEngine;..\;..\Tactical;..\Utils;..\tacticalai;..\Editor;..\lua;..\strategic;.\"
PreprocessorDefinitions="PRECOMPILEDHEADERS;_DEBUG;WIN32;_WINDOWS;JA2;_VTUNE_PROFILING;XML_STATIC;CINTERFACE"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
+3 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="8.00"
Name="Laptop_2005Express"
ProjectGUID="{5234CD2E-97F1-42FF-828D-CE0A1B46805E}"
RootNamespace="Laptop_2005Express"
@@ -41,6 +41,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
AdditionalIncludeDirectories="..\Multiplayer"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -104,6 +105,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalIncludeDirectories="..\Multiplayer"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
RuntimeTypeInfo="false"
+5 -1
View File
@@ -27,10 +27,11 @@
#include "Assignments.h"
#include "Input.h"
#include "english.h"
#include "finances.h"
#endif
#include "Cheats.h"
#include "connect.h"
#define MERCBIOFILE "BINARYDATA\\MercBios.edt"
@@ -667,6 +668,9 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
}
else
{
//take off nominal fee: hayden,
if (is_networked)
AddTransactionToPlayersBook( HIRED_MERC, ubMercID, GetWorldTotalMin(), gMercProfiles[ ubMercID ].sSalary * (-1) );
//if we succesfully hired the merc
return(TRUE);
}
+17 -1
View File
@@ -27,6 +27,10 @@
#include "Quests.h"
#endif
UINT8 NUMBER_OF_MERCS;
UINT8 LAST_MERC_ID;
#define MERC_TEXT_FONT FONT12ARIAL
#define MERC_TEXT_COLOR FONT_MCOLOR_WHITE
@@ -178,7 +182,7 @@ UINT32 guiMercBackGround;
UINT32 guiMercVideoFaceBackground;
UINT32 guiMercVideoPopupBackground;
UINT8 gubMercArray[ NUMBER_OF_MERCS ];
UINT8 gubMercArray[ MAX_NUMBER_OF_MERCS ];
UINT8 gubCurMercIndex;
INT32 iMercPopUpBox = -1;
@@ -342,6 +346,18 @@ void GameInitMercs()
gubMercArray[ 12 ] = COUGAR;
gubMercArray[ 13 ] = GASTON;
gubMercArray[ 14 ] = STOGIE;
gubMercArray[ 15 ] = 57;//hayden
gubMercArray[ 16 ] = 58;
gubMercArray[ 17 ] = 59;
gubMercArray[ 18 ] = 60;
gubMercArray[ 19 ] = 61;
gubMercArray[ 20 ] = 63;
gubMercArray[ 21 ] = 66;
gubMercArray[ 22 ] = 67;
gubMercArray[ 23 ] = 68;
gubMercArray[ 24 ] = 69;
gubMercArray[ 25 ] = 70;
gubMercArray[ 26 ] = 72;
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_NO_ACCOUNT;
gubCurMercIndex = 0;
+7 -3
View File
@@ -5,8 +5,12 @@
#define MERC_BUTTON_UP_COLOR FONT_MCOLOR_WHITE
#define MERC_BUTTON_DOWN_COLOR FONT_MCOLOR_DKWHITE
#define NUMBER_OF_MERCS 15
#define LAST_MERC_ID 14
extern UINT8 NUMBER_OF_MERCS;
extern UINT8 LAST_MERC_ID;
#define MAX_NUMBER_OF_MERCS 27
//#define NUMBER_OF_MERCS 27//hayden
//#define LAST_MERC_ID 26//hayden
#define NUMBER_OF_BAD_MERCS 5
#define NUMBER_MERCS_AFTER_FIRST_MERC_ARRIVES 6
#define NUMBER_MERCS_AFTER_SECOND_MERC_ARRIVES 8
@@ -79,7 +83,7 @@ extern UINT16 gusMercVideoSpeckSpeech;
extern UINT8 gubArrivedFromMercSubSite;
extern UINT8 gubMercArray[ NUMBER_OF_MERCS ];
extern UINT8 gubMercArray[ MAX_NUMBER_OF_MERCS ];
extern UINT8 gubCurMercIndex;
//extern UINT8 gubLastMercIndex;