mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Space Viking's many mercs changes plus numerous generic bug fixes
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2498 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+18
-5
@@ -1668,6 +1668,19 @@ void BtnBuyEquipmentButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
//Transfer funds button callback
|
||||
void BtnAuthorizeButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
// WDS DEBUG
|
||||
if (LaptopSaveInfo.iCurrentBalance == 4500001) {
|
||||
unsigned hired = 0;
|
||||
while (hired < gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs) {
|
||||
if (AimMemberHireMerc()) {
|
||||
giIdOfLastHiredMerc = AimMercArray[gbCurrentIndex];
|
||||
++hired;
|
||||
}
|
||||
++gbCurrentIndex;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
@@ -1804,10 +1817,10 @@ INT8 AimMemberHireMerc()
|
||||
|
||||
//if we succesfully hired the merc
|
||||
bReturnCode = HireMerc( &HireMercStruct );
|
||||
if( bReturnCode == MERC_HIRE_OVER_18_MERCS_HIRED )
|
||||
if( bReturnCode == MERC_HIRE_OVER_PLAYER_LIMIT )
|
||||
{
|
||||
//display a warning saying u cant hire more than 18 mercs
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
//display a warning saying u cant hire more than the max mercs
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_MAX_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return(FALSE);
|
||||
}
|
||||
else if( bReturnCode == MERC_HIRE_FAILED )
|
||||
@@ -4204,10 +4217,10 @@ BOOLEAN QuickHireMerc()
|
||||
SetFlagToForceHireMerc( TRUE );
|
||||
bReturnCode = HireMerc( &HireMercStruct );
|
||||
SetFlagToForceHireMerc( FALSE );
|
||||
if( bReturnCode == MERC_HIRE_OVER_18_MERCS_HIRED )
|
||||
if( bReturnCode == MERC_HIRE_OVER_PLAYER_LIMIT )
|
||||
{
|
||||
//display a warning saying u cant hire more than 18 mercs
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_MAX_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return(FALSE);
|
||||
}
|
||||
else if( bReturnCode == MERC_HIRE_FAILED )
|
||||
|
||||
@@ -142,13 +142,13 @@ void CreateACharacterFromPlayerEnteredStats( void )
|
||||
// gender
|
||||
if ( fCharacterIsMale == TRUE )
|
||||
{
|
||||
// male
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = MALE;
|
||||
// male
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = MALE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// female
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = FEMALE;
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = FEMALE;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,8 @@ void CreateACharacterFromPlayerEnteredStats( void )
|
||||
// attitude
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAttitude = ( INT8 )iAttitude;
|
||||
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = 1;
|
||||
// WDS: Advanced start
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = gGameExternalOptions.ubIMPStartingLevel;
|
||||
|
||||
// set time away
|
||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMercStatus = 0;
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMP Confirm.h"
|
||||
#include "Game Clock.h"
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
#include "Squads.h"
|
||||
#endif
|
||||
|
||||
void GetPlayerKeyBoardInputForIMPHomePage( void );
|
||||
@@ -396,7 +398,7 @@ void ProcessPlayerInputActivationString( void )
|
||||
BOOLEAN freeMercSlot = TRUE;
|
||||
|
||||
// WANNE: Check total number of hired mercs
|
||||
if( NumberOfMercsOnPlayerTeam() >= 18 )
|
||||
if( NumberOfMercsOnPlayerTeam() >= gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs )
|
||||
{
|
||||
freeMercSlot = FALSE;
|
||||
}
|
||||
@@ -407,7 +409,7 @@ void ProcessPlayerInputActivationString( void )
|
||||
// WANNE: Check total number of hired mercs
|
||||
if( freeMercSlot == FALSE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_MAX_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -429,7 +431,7 @@ void ProcessPlayerInputActivationString( void )
|
||||
// WANNE: Check total number of hired mercs
|
||||
if( freeMercSlot == FALSE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_MAX_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -455,7 +457,7 @@ void ProcessPlayerInputActivationString( void )
|
||||
// WANNE: Check total number of hired mercs
|
||||
if( freeMercSlot == FALSE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_MAX_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "soldier profile type.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Soldier Profile.h"
|
||||
#include "Squads.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -602,7 +603,7 @@ void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
|
||||
|
||||
}
|
||||
else if( NumberOfMercsOnPlayerTeam() >= 18 )
|
||||
else if( NumberOfMercsOnPlayerTeam() >= gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 5 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "Assignments.h"
|
||||
#include "Map Screen Interface.h"
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
#define INS_CTRCT_ORDER_GRID_WIDTH 132
|
||||
#define INS_CTRCT_ORDER_GRID_HEIGHT 216
|
||||
@@ -118,7 +119,8 @@ UINT8 gubNumberofDisplayedInsuranceGrids;
|
||||
|
||||
BOOLEAN gfChangeInsuranceFormButtons = FALSE;
|
||||
|
||||
UINT8 gubInsuranceMercArray[ 20 ];
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
std::vector<UINT8> gubInsuranceMercArray (CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS, 0);
|
||||
INT16 gsCurrentInsuranceMercIndex;
|
||||
INT16 gsMaxPlayersOnTeam;
|
||||
|
||||
|
||||
Binary file not shown.
+669
-1409
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user