MERGED source code from development trunk revision 4545 up to latest current revision 4882

Development Trunk: https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP
A detailed list of all the features (changes) is visible in the history log of the development trunk:

INFO: The source code for the official 2011 release (4870) has been branched here:
https://ja2svn.dyndns.org/source/ja2/branches/JA2_rev.4870_2011

This commit contains the following features:

*** Externalized Vehicles ***
o Now with this feature we can add/remove vehicles
o New XML File: TableData\Vehicles.xml
o Added a new function parameter to lua file Scripts\Overhead lua to set up the helicopter in method: SetUpHelicopterForPlayer()
o Added example mini (Docs\Externalized Vehicles Example.zip) mod which adds 2 additional vehicles (hummer and ice-cream truck to sector A9)

*** Up to 255 save slots ***
- There is a "Next" and "Prev" button where you can scroll through the save slots
- It is now possible to load the automatic save (SAVE_EVERY_N_HOURS) from the load screen. This is the first slot after the quickload slot
- Added the 2 alternate players end turn saves (which can be enabled/disabled in option screen) to the save/load game form

*** New Feature: Externalized emails from Emails.edt to XML***
o This feature can be enabled/disabled in the Source:
--> See email.cpp: If "ReadXMLEmail" == FALSE, then normal way (read from Email.edt) otherwise read from XML files
o 2 new XML files: TableData\Email\EmailMercAvailable.xml and EmailMercLevelUp.xml
o Renamed SenderNamesList.xml to EmailSenderNamesList.xml and moved from TableData folder to TableData\Email folder
o Names for mercenaries are get from the file MercProfiles.xml and different names get from the file EmailSenderNamesList.xml

*** Externalized Hidden Towns (Tixa, Orta) ***
o Now it is possible to add new hidden towns (locations)
o See file: TableData/Map/Cities.xml
o New variable in TableData/Map/Cities.xml
- hiddenTown:   0 = show on strategy map, 1 = Hide on strategy map
- townIcon:     1 = on, 0 = off (This is the icon you see on the strategy map)
- szIconFile:   The path to the sti icon file (eg: interface\prison.sti, interface\my_icon.sti)
- iconPosition: The x,y position of the icon on the strategy map

*** Encyclopedia and Briefing Room, reachable from the laptop ***
o 2 new ja2_options.ini properties: BRIEFING_ROOM, ENCYCLOPEDIA
o demonstration video: http://www.youtube.com/watch?v=7CIXdXWLrAo
o Added Example usage of the Briefing Room
- Extract it in your JA2 1.13 folder and use the latest development executable
- The briefing room can be reached from the laptop. Enter SN5631 for the code and then click the "Exit" button
- See "Info_BriefingRoom.txt" and "BriefingRoom_Mission1.png"

*** Improved interrupt system (IIS) ***
o This system changes the way interrupts work. See: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=290787#Post290787
o Option system (see ja2_options.ini: IMPROVED_INTERRUPT_SYSTEM)
o A few more settings for the interrupt system in ja2_options.ini
o INFO: Multiplayer games always use the "old" interrupt system, not matter what the user selects in the ja2_options.ini

*** Walking and sidestepping with weapon raised ***
o Enable/disable the walking/sidestepping with raised weapon in ja2_options.ini: ALLOW_WALKING_WITH_WEAPON_RAISED
o You can set an AP/BP modifier when walking/sidestepping with weapon raised in APBPConstants.ini: AP_MODIFIER_WEAPON_READY
o The following feature apply when you walk/sidestep with weapon raised:
-> limited angle of view, but you can see more farther when the weapon has a scope
-> better change for interrupts if you see an enemy
-> less APs and BPs when shooting, because the weapon is already raised
-> It should cost more APs when walking. Maybe you can export the additional AP and BP modifier to the APBPConstants.ini

*** Increase squad size to 8 (800x600) and 8 and 10 (1024x768) ***
o Squad sizes (dependend on the screen resolution) can be selected in the start new game screen
o In a multiplayer game, the squad size will always be 6, because it does not work with more soldiers/squad

*** Added UB-1.13 source code ***
o Merged the UB-1.13 source code (Revision: 4721) from svn: http://subversion.assembla.com/svn/ub-source113
o If you want to build UB-EXE or UB-MapEditor, just enable the 2 defines (JA2UB and JA2UBMAPS) in "builddefines.h"
o The UB-Verion reads from "ja2_UB.ini" instead of "ja2.ini"
o There are 2 new XML files
- Layout\LayoutMainMenu.xml
- MapAction\ActionItems.xml
o There are 2 new LUA-Script files
- Scripts\ExplosionControl.lua
- Scripts\InterfaceDialogue.lua

*** Hide enemy health text / enemy hit count ***
o ja2_options.ini: HIDE_ENEMY_HEALTH_TEXT, HIDE_ENEMY_HIT_COUNT
o both new settings only have effect in a singleplayer game
o see: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=128840&page=1


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4885 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-01-18 11:19:01 +00:00
parent c42d68ff0f
commit e64d5a2fa6
264 changed files with 40710 additions and 2771 deletions
+253 -17
View File
@@ -119,8 +119,21 @@
#include "connect.h" //hayden
#include "fresh_header.h"
#include "InterfaceItemImages.h"
#ifdef JA2UB
#include "laptop.h"
#include "Strategic Movement.h"
//#include "Strategic Movement Costs.h"
// DEFINES
#include "Ja25 Strategic Ai.h"
#include "MapScreen Quotes.h"
#include "ub_config.h"
#include "LuaInitNPCs.h"
#endif
#define MAX_SORT_METHODS 6
@@ -153,6 +166,10 @@
#define MINS_TO_FLASH_CONTRACT_TIME (4 * 60)
#ifdef JA2UB
void MakeBadSectorListFromMapsOnHardDrive( BOOLEAN fDisplayMessages ); // ja25 UB
#endif
// CHRISL: Reclassify all coordinates as int variables and declare their values in an initialization function.
int TOWN_INFO_X;
int TOWN_INFO_Y;
@@ -1002,6 +1019,9 @@ extern INT32 GetNumberOfMercsInUpdateList( void );
extern INT32 SellItem( OBJECTTYPE& object, BOOLEAN useModifier = TRUE );
void DeleteAllItemsInInventoryPool();
#ifdef JA2UB
void HandleWhenPlayerHasNoMercsAndNoLaptop();
#endif
#ifdef JA2TESTVERSION
void TestDumpStatChanges( void );
@@ -2760,7 +2780,8 @@ void DrawCharacterInfo(INT16 sCharNumber)
if( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
{
// vehicle
wcscpy(sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
// wcscpy(sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
wcscpy(sString, gNewVehicle[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ].NewShortVehicleStrings);
}
else
{
@@ -2776,7 +2797,9 @@ void DrawCharacterInfo(INT16 sCharNumber)
if( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
{
// vehicle
wcscpy(sString, pVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
//wcscpy(sString, pVehicleStrings[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ]);
wcscpy(sString, gNewVehicle[ pVehicleList[ pSoldier->bVehicleID ].ubVehicleType ].NewVehicleStrings);
}
else
{
@@ -2792,7 +2815,8 @@ void DrawCharacterInfo(INT16 sCharNumber)
if( pSoldier->bAssignment == VEHICLE )
{
// show vehicle type
wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
// wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
wcscpy( sString, gNewVehicle[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ].NewShortVehicleStrings );
}
else
{
@@ -2845,7 +2869,8 @@ void DrawCharacterInfo(INT16 sCharNumber)
else if ( pSoldier->bVehicleUnderRepairID != -1 )
{
// vehicle
wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleUnderRepairID ].ubVehicleType ] );
// wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->bVehicleUnderRepairID ].ubVehicleType ] );
wcscpy( sString, gNewVehicle[ pVehicleList[ pSoldier->bVehicleUnderRepairID ].ubVehicleType ].NewShortVehicleStrings );
}
else
{
@@ -4462,7 +4487,8 @@ UINT32 MapScreenHandle(void)
VOBJECT_DESC VObjectDesc;
// static BOOLEAN fSecondFrame = FALSE;
INT32 iCounter = 0;
INT32 iCounter2 = 0;
char fileName[500];
//DO NOT MOVE THIS FUNCTION CALL!!!
@@ -4853,6 +4879,59 @@ UINT32 MapScreenHandle(void)
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\prison.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiTIXAICON));
//----------- legion 2
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
{
//if ( gfDrawHiddenTown[iCounter2] == TRUE )
//{
//VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
//FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
/*
if (iResolution == 0)
{
strcpy(fileName, gHiddenIcon[iCounter2].IconSti);
strcat(fileName,".sti");
}
if (iResolution == 1)
{
strcpy(fileName, gHiddenIcon[iCounter2].IconSti);
strcat(fileName,"_800x600.sti");
}
if (iResolution == 2)
{
strcpy(fileName, gHiddenIcon[iCounter2].IconSti);
strcat(fileName,"_1024x768.sti");
}
if ( gfIconTown[iCounter2] == TRUE )
strcpy(VObjectDesc.ImageFile, fileName);
else
FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
*/
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
if ( gfIconTown[iCounter2] == TRUE )
{
strcpy(VObjectDesc.ImageFile, gHiddenIcon[iCounter2].IconSti);
}
else
{
FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
}
if (!FileExists(VObjectDesc.ImageFile))
{
FilenameForBPP("INTERFACE\\PRISON.sti", VObjectDesc.ImageFile);
}
CHECKF(AddVideoObject(&VObjectDesc, &guiIcon2[iCounter2]));
//}
}
//-------
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\merc_between_sector_icons.sti", VObjectDesc.ImageFile);
@@ -4880,6 +4959,7 @@ UINT32 MapScreenHandle(void)
CHECKF(AddVideoObject(&VObjectDesc, &guiMapBorderHeliSectors));
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\secondary_gun_hidden.sti", VObjectDesc.ImageFile);
CHECKF( AddVideoObject( &VObjectDesc, &guiSecItemHiddenVO ) );
@@ -4991,6 +5071,18 @@ UINT32 MapScreenHandle(void)
{
fFirstTimeInMapScreen = FALSE;
// fShowMapScreenHelpText = TRUE;
#ifdef JA2UB
//JA25 UB
//Get Jerry Milo to say his opening quote, if he hasnt said it before
if( !HasJerryMiloSaidQuoteBefore( MILO_QUOTE__OPENING_GREETING_PART_1 ) )
JerryMiloDelayedTalk( MILO_QUOTE__OPENING_GREETING_PART_1, 1100 );
}
//Should Jerry popup a new quote now
else if( DidPlayerInitiallyHaveLessThen6MercsAndNowHaveExactly6AndHasntSaidFullLoadQuote() )
{
//Get Jerry Milo to say his opening quote
JerryMiloDelayedTalk( MILO_QUOTE__ALREADY_HAS_6_MERCS, 500 );
#endif
}
fShowMapInventoryPool = FALSE;
@@ -5164,7 +5256,16 @@ UINT32 MapScreenHandle(void)
return( MAP_SCREEN );
}
}
#ifdef JA2UB
//Ja25 UB
if ( gfProcessCustomMaps )
{
MakeBadSectorListFromMapsOnHardDrive( TRUE );
LetLuaMakeBadSectorListFromMapsOnHardDrive( 0 );
gfProcessCustomMaps = FALSE;
}
#endif
// check to see if we need to rebuild the characterlist for map screen
HandleRebuildingOfMapScreenCharacterList( );
@@ -5334,11 +5435,26 @@ UINT32 MapScreenHandle(void)
InterruptTimeForMenus( );
#ifdef JA2UB
//JA25 UB
//Handle Jerry Milo quotes
if ( gGameUBOptions.JerryQuotes == TRUE )
HandleJerryMiloQuotes( FALSE );
#endif
// place down background
BlitBackgroundToSaveBuffer( );
if( fLeavingMapScreen == TRUE )
{
#ifdef JA2UB
//JA25 UB
//specify that we are leaving mapscreen
if ( gGameUBOptions.JerryQuotes == TRUE )
HandleJerryMiloQuotes( TRUE );
#endif
return( MAP_SCREEN );
}
@@ -5653,8 +5769,11 @@ UINT32 MapScreenHandle(void)
RenderKeyRingPopup( FALSE );
}
CheckForMeanwhileOKStart( );
#ifdef JA2UB
/* UB */
#else
CheckForMeanwhileOKStart( );
#endif
// save background rects
// ATE: DO this BEFORE rendering help text....
SaveBackgroundRects( );
@@ -5767,6 +5886,15 @@ UINT32 MapScreenHandle(void)
HandleExitsFromMapScreen( );
}
#ifdef JA2UB
//Ja25 ub
//Handle the strategic AI
JA25_HandleUpdateOfStrategicAi();
//Should the msg box come up telling the user that they lost?
if (gGameUBOptions.InGameHeliCrash == TRUE )
HandleWhenPlayerHasNoMercsAndNoLaptop(); //AA
#endif
return( MAP_SCREEN );
}
@@ -6674,6 +6802,8 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
BOOLEAN fCtrl, fAlt;
INT16 sMapX, sMapY;
INT32 iCounter2 = 0;
fCtrl = _KeyDown( CTRL );
fAlt = _KeyDown( ALT );
@@ -7344,7 +7474,15 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
CopySectorInventoryToInventoryPoolQ(0);
break;
}
RequestContractMenu();
//Ja25 UB
//if ( fAlt )
//{
// MakeBadSectorListFromMapsOnHardDrive( TRUE );
//}
//else
//{
RequestContractMenu();
//}
break;
case 'd':
@@ -7518,7 +7656,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
if( fAlt )
{
// set up the helicopter over Omerta (if it's not already set up)
SetUpHelicopterForPlayer( 9,1 , SKYRIDER );
SetUpHelicopterForPlayer( 9,1 , SKYRIDER, HELICOPTER );
// raise Drassen loyalty to minimum that will allow Skyrider to fly
if ( gTownLoyalty[ DRASSEN ].fStarted && ( gTownLoyalty[ DRASSEN ].ubRating < LOYALTY_LOW_THRESHOLD ) )
{
@@ -7582,7 +7720,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
break;
// haydent
case 'k':
case 'k':
if(gGameExternalOptions.fEnableInventoryPoolQ && fShowMapInventoryPool == TRUE)//dnl ch51 081009
{
CopySectorInventoryToInventoryPoolQs(0);
@@ -7612,6 +7750,28 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
}
break;
case 'm':
//JA25 UB
// only handle border button keyboard equivalents if the button is visible!
/*if ( fAlt )
{
INT16 sMapX, sMapY;
// Get sector that is hilighted...
if ( GetMouseMapXY(&sMapX, &sMapY) )
{
AddCustomMap( sMapY, sMapX, TRUE, TRUE );
UpdateCustomMapMovementCosts();
}
}
else
{
if ( !fShowMapInventoryPool )
{
// toggle show mines flag
ToggleShowMinesMode();
}
}
*/
// only handle border button keyboard equivalents if the button is visible!
if ( !fShowMapInventoryPool )
{
@@ -7654,6 +7814,12 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
#ifdef JA2TESTVERSION
fFoundOrta = !fFoundOrta;
fFoundTixa = !fFoundTixa;
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
{
gfHiddenTown [ iCounter2 ] = TRUE;
}
fMapPanelDirty = TRUE;
#endif
}
@@ -8082,6 +8248,9 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
void EndMapScreen( BOOLEAN fDuringFade )
{
INT32 iCounter2 = 0;
if ( fInMapMode == FALSE )
{
// shouldn't be here
@@ -8259,6 +8428,14 @@ void EndMapScreen( BOOLEAN fDuringFade )
DeleteVideoObjectFromIndex( guiHelicopterIcon );
DeleteVideoObjectFromIndex( guiMINEICON );
DeleteVideoObjectFromIndex( guiSectorLocatorGraphicID );
//----------- Legion 2
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
{
//if ( gfDrawHiddenTown[iCounter2] == TRUE )
DeleteVideoObjectFromIndex(guiIcon2[iCounter2]);
}
//-------
DeleteVideoObjectFromIndex( guiBULLSEYE );
@@ -12897,6 +13074,8 @@ BOOLEAN AnyMercsLeavingRealSoon()
void HandleRemovalOfPreLoadedMapGraphics( void )
{
INT32 iCounter2 = 0;
if( fPreLoadedMapGraphics == TRUE )
{
DeleteMapBottomGraphics( );
@@ -12938,6 +13117,14 @@ void HandleRemovalOfPreLoadedMapGraphics( void )
DeleteVideoObjectFromIndex( guiNewMailIcons );
DeleteVideoObjectFromIndex( guiBULLSEYE );
//----------- Legion 2
for( iCounter2 = 1; iCounter2 < NUM_TOWNS; iCounter2++ )
{
//if ( gfDrawHiddenTown[iCounter2] == TRUE )
DeleteVideoObjectFromIndex(guiIcon2[iCounter2]);
}
//-------
// remove the graphic for the militia pop up box
@@ -13133,6 +13320,13 @@ void TellPlayerWhyHeCantCompressTime( void )
ScreenMsg( FONT_MCOLOR_RED, MSG_BETAVERSION, L"(BETA) If permanent, take screenshot now, send with *previous* save & describe what happened since.");
#endif
}
#ifdef JA2UB
else if( DoesPlayerHaveNoMercsHiredAndJerryHasntSaidQuoteYet() )
{
JerryMiloTalk( MILO_QUOTE__PLAYER_HAS_NO_MERCS );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapScreenJustStartedHelpText[ 0 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
#endif
else if( gfAtLeastOneMercWasHired == FALSE )
{
// no mercs hired, ever
@@ -13181,6 +13375,15 @@ void TellPlayerWhyHeCantCompressTime( void )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 55 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
}
#ifdef JA2UB
//JA25 UB
else if( !WillJerryMiloAllowThePlayerToCompressTimeAtBeginingOfGame() )
{
// TODO.RW: JA2UB
//Have jerry say why the player cant compress time
HaveJerrySayWhyPlayerCantTimeCompressAtBeginningOfGame();
}
#endif
// ARM: THIS TEST SHOULD BE THE LAST ONE, BECAUSE IT ACTUALLY RESULTS IN SOMETHING HAPPENING NOW.
// KM: Except if we are in a creature lair and haven't loaded the sector yet (no battle yet)
else if( gTacticalStatus.uiFlags & INCOMBAT || gTacticalStatus.fEnemyInSector )
@@ -14354,11 +14557,15 @@ BOOLEAN HandleCtrlOrShiftInTeamPanel( INT8 bCharNumber, BOOLEAN fFromRightClickA
INT32 GetContractExpiryTime( SOLDIERTYPE *pSoldier )
{
#ifdef JA2UB
/* JA25 UB */
#else
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) || ( pSoldier->ubProfile == SLAY ) )
{
return ( pSoldier->iEndofContractTime );
}
else
else
#endif
{
// never - really high number
return ( 999999 );
@@ -14947,7 +15154,7 @@ void DestinationPlottingCompleted( void )
void HandleMilitiaRedistributionClick( void )
{
INT8 bTownId;
BOOLEAN fTownStillHidden;
//BOOLEAN fTownStillHidden;
CHAR16 sString[ 128 ];
@@ -14955,9 +15162,12 @@ void HandleMilitiaRedistributionClick( void )
if ( iCurrentMapSectorZ == 0 )
{
bTownId = GetTownIdForSector( sSelMapX, sSelMapY );
fTownStillHidden = ( ( bTownId == TIXA ) && !fFoundTixa ) || ( ( bTownId == ORTA ) && !fFoundOrta );
if( ( bTownId != BLANK_SECTOR ) && !fTownStillHidden )
//fTownStillHidden = ( ( bTownId == TIXA ) && !fFoundTixa ) || ( ( bTownId == ORTA ) && !fFoundOrta );
// fTownStillHidden = ( ( bTownId == TIXA ) && !gfHiddenTown[ TIXA ] ) || ( ( bTownId == ORTA ) && !gfHiddenTown[ ORTA ] );
// WANNE: if gfHiddenTown[townID] == TRUE, then it is not HIDDEN!!!
if( ( bTownId != BLANK_SECTOR ) && gfHiddenTown[ bTownId ] ) //&& !fTownStillHidden )
{
if ( MilitiaTrainingAllowedInSector( sSelMapX, sSelMapY, ( INT8 )iCurrentMapSectorZ ) )
{
@@ -15190,7 +15400,8 @@ void GetMapscreenMercAssignmentString( SOLDIERTYPE *pSoldier, CHAR16 sString[] )
{
if ( pSoldier->bAssignment == VEHICLE )
{
wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
// wcscpy( sString, pShortVehicleStrings[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ] );
wcscpy( sString, gNewVehicle[ pVehicleList[ pSoldier->iVehicleId ].ubVehicleType ].NewShortVehicleStrings);
}
else
{
@@ -15304,8 +15515,12 @@ void GetMapscreenMercDepartureString( SOLDIERTYPE *pSoldier, CHAR16 sString[], U
INT32 iDaysRemaining = 0;
INT32 iHoursRemaining = 0;
#ifdef JA2UB
//Ja25: Removed the aim merc check because aim mercs are hired for a 1 time fee
if( ( pSoldier->ubProfile != SLAY ) || pSoldier->stats.bLife == 0 )
#else
if( ( pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pSoldier->ubProfile != SLAY ) || pSoldier->stats.bLife == 0 )
#endif
{
swprintf( sString, L"%s", gpStrategicString[ STR_PB_NOTAPPLICABLE_ABBREVIATION ] );
}
@@ -15817,3 +16032,24 @@ INT32 GetTotalContractExpenses ( void )
}
return (iTotalCost);
}
#ifdef JA2UB
void HandleWhenPlayerHasNoMercsAndNoLaptop()
{
const UINT8 ubNumLoopsToDisplay=50;
if( gJa25SaveStruct.ubDisplayPlayerLostMsgBox == 0 ||
gJa25SaveStruct.ubDisplayPlayerLostMsgBox >= ubNumLoopsToDisplay ||
guiCurrentScreen == MSG_BOX_SCREEN )
{
return;
}
gJa25SaveStruct.ubDisplayPlayerLostMsgBox += 1;
if( gJa25SaveStruct.ubDisplayPlayerLostMsgBox == ubNumLoopsToDisplay )
{
DoMapMessageBox( MSG_BOX_BASIC_STYLE, zNewTacticalMessages[ TCTL_MSG__PLAYER_LOST_SHOULD_RESTART ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
}
}
#endif