mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Deleted 'mobile militia feature', as 'militia strategic command' offered better ways to move militia.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23649&goto=352592&#msg_352592 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8542 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-70
@@ -899,15 +899,11 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.iMilitiaTrainingCost = iniReader.ReadInteger("Financial Settings","MILITIA_BASE_TRAINING_COST",750, 10, 10000);
|
||||
gGameExternalOptions.iRegularCostModifier = iniReader.ReadInteger("Financial Settings","MILITIA_COST_MULTIPLIER_REGULAR",1, 1, 10);
|
||||
gGameExternalOptions.iVeteranCostModifier = iniReader.ReadInteger("Financial Settings","MILITIA_COST_MULTIPLIER_ELITE",2, 1, 10);
|
||||
gGameExternalOptions.iMilitiaCostModifier = iniReader.ReadInteger("Financial Settings","MILITIA_COST_MULTIPLIER_MOBILE",3, 1, 10);
|
||||
|
||||
// HEADROCK HAM 3.6: Daily upkeep costs for militia
|
||||
gGameExternalOptions.usDailyCostTown[GREEN_MILITIA] = iniReader.ReadInteger( "Financial Settings", "DAILY_MILITIA_UPKEEP_TOWN_GREEN", 0, 0, 10000 );
|
||||
gGameExternalOptions.usDailyCostTown[REGULAR_MILITIA] = iniReader.ReadInteger( "Financial Settings", "DAILY_MILITIA_UPKEEP_TOWN_REGULAR", 0, 0, 10000 );
|
||||
gGameExternalOptions.usDailyCostTown[ELITE_MILITIA] = iniReader.ReadInteger( "Financial Settings", "DAILY_MILITIA_UPKEEP_TOWN_ELITE", 0, 0, 10000 );
|
||||
gGameExternalOptions.usDailyCostMobile[GREEN_MILITIA] = iniReader.ReadInteger( "Financial Settings", "DAILY_MILITIA_UPKEEP_MOBILE_GREEN", 0, 0, 10000 );
|
||||
gGameExternalOptions.usDailyCostMobile[REGULAR_MILITIA] = iniReader.ReadInteger( "Financial Settings", "DAILY_MILITIA_UPKEEP_MOBILE_REGULAR", 0, 0, 10000 );
|
||||
gGameExternalOptions.usDailyCostMobile[ELITE_MILITIA] = iniReader.ReadInteger( "Financial Settings", "DAILY_MILITIA_UPKEEP_MOBILE_ELITE", 0, 0, 10000 );
|
||||
|
||||
// HEADROCK HAM 3.5: Helicopter - Base cost per sector. GREEN = Free airspace, RED = Enemy-controlled airspace.
|
||||
gGameExternalOptions.usHelicopterBaseCostPerGreenTile = iniReader.ReadInteger("Financial Settings","HELICOPTER_BASE_COST_PER_GREEN_TILE", 100, 0, 60000);
|
||||
@@ -2126,75 +2122,10 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.dMilitiaVolunteerGainFactorHourly = iniReader.ReadFloat( "Militia Volunteer Pool Settings", "MILITIA_VOLUNTEER_POOL_GAINFACTOR_HOURLY", 0.001f, 0.0f, 1.0f );
|
||||
gGameExternalOptions.dMilitiaVolunteerGainFactorLiberation = iniReader.ReadFloat( "Militia Volunteer Pool Settings", "MILITIA_VOLUNTEER_POOL_GAINFACTOR_LIBERATION", 0.2f, 0.0f, 1.0f );
|
||||
gGameExternalOptions.dMilitiaVolunteerMultiplierFarm = iniReader.ReadFloat( "Militia Volunteer Pool Settings", "MILITIA_VOLUNTEER_POOL_MULTIPLIER_FARM", 0.05f, 0.0f, 1.0f );
|
||||
|
||||
//################# Mobile Militia Training Settings ##################
|
||||
|
||||
gGameExternalOptions.gfAllowMilitiaGroups = iniReader.ReadBoolean("Mobile Militia Training Settings","ALLOW_MOBILE_MILITIA",FALSE);
|
||||
gGameExternalOptions.guiAllowMilitiaGroupsDelay = iniReader.ReadInteger("Mobile Militia Training Settings","MOBILE_MILITIA_TRAINING_DELAY",1, 0, 30);
|
||||
|
||||
gGameExternalOptions.guiNumMobileMilitiaTrained = iniReader.ReadInteger("Mobile Militia Training Settings","NUM_MOBILE_MILITIA_TRAINED_PER_SESSION",4, 1, 100);
|
||||
|
||||
gGameExternalOptions.gfmusttrainroaming = iniReader.ReadBoolean("Mobile Militia Training Settings","MUST_TRAIN_MOBILE_MILITIA",FALSE);
|
||||
|
||||
//Moa: Mode to determine maximum allowed mobile militia for training / deserting.
|
||||
gGameExternalOptions.gbMobileMilitiaMaxActiveMode = (UINT8) iniReader.ReadInteger("Mobile Militia Training Settings","MOBILE_MILITIA_MAX_ACTIVE_MODE",0,0,255);
|
||||
|
||||
//Moa: modifier for the maximum (make sure this is read after iMaxMilitiaPerSector)
|
||||
gGameExternalOptions.gfpMobileMilitiaMaxActiveModifier = iniReader.ReadFloat("Mobile Militia Training Settings","MOBILE_MILITIA_MAX_ACTIVE_MODIFIER", 0.5, 0.01f, 10.0f) * gGameExternalOptions.iMaxMilitiaPerSector;
|
||||
|
||||
gGameExternalOptions.guiCreateEachNHours = iniReader.ReadInteger("Mobile Militia Training Settings","CREATE_MOBILE_MILITIA_SQUAD_EACH_N_HOURS",24, 1, 96);
|
||||
|
||||
// HEADROCK HAM 3.3: New militia feature, Minimum Leadership required to train Roaming Militia
|
||||
gGameExternalOptions.ubMinimumLeadershipToTrainMobileMilitia = iniReader.ReadInteger("Mobile Militia Training Settings","MIN_LEADERSHIP_TO_TRAIN_MOBILE_MILITIA", 0, 0, 100);
|
||||
|
||||
// HEADROCK HAM 3.3: If enabled, the trainer's "effective" leadership skill determines HOW MANY Mobile Militia he/she creates per session.
|
||||
gGameExternalOptions.fLeadershipAffectsMobileMilitiaQuantity = iniReader.ReadBoolean("Mobile Militia Training Settings","LEADERSHIP_AFFECTS_MOBILE_MILITIA_QUANTITY", FALSE);
|
||||
|
||||
// HEADROCK HAM 3.3: If "LEADERSHIP_AFFECTS_MILITIA_QUANTITY" is true, this value determines the lowest leadership required to train a full (default size 5) squad of Mobile Militia in one training session.
|
||||
gGameExternalOptions.ubReqLeadershipForFullMobileTraining = iniReader.ReadInteger("Mobile Militia Training Settings","REQ_LEADERSHIP_FOR_MAX_MOBILE_MILITIA", 1, 1, 100);
|
||||
|
||||
// HEADROCK HAM 3.5: Does leadership affect the Quality of new Mobile Militia groups?
|
||||
gGameExternalOptions.fLeadershipAffectsMobileMilitiaQuality = iniReader.ReadBoolean("Mobile Militia Training Settings","LEADERSHIP_AFFECTS_MOBILE_MILITIA_QUALITY", FALSE);
|
||||
|
||||
// HEADROCK HAM 3.4: What percentage of a new Mobile Militia group will be made of Elites? If >0, then at least one of every new group will be an Elite. 100 = All Elites.
|
||||
gGameExternalOptions.ubPercentRoamingMilitiaElites = iniReader.ReadInteger("Mobile Militia Training Settings","PERCENT_MOBILE_MILITIA_ELITES", 100, 0, 100);
|
||||
|
||||
// HEADROCK HAM 3.4: What percentage of a new Mobile Militia group will be made of Regulars? If >0, then at least one of every new group will be a Regular. 100 = All Regulars.
|
||||
gGameExternalOptions.ubPercentRoamingMilitiaRegulars = iniReader.ReadInteger("Mobile Militia Training Settings","PERCENT_MOBILE_MILITIA_REGULARS", 0, 0, 100);
|
||||
|
||||
|
||||
//################# Mobile Militia Movement Settings ##################
|
||||
|
||||
gGameExternalOptions.gflimitedRoaming = iniReader.ReadBoolean("Mobile Militia Movement Settings","RESTRICT_ROAMING",FALSE);
|
||||
|
||||
// HEADROCK HAM B1: Allow restricted militia to move through visited sectors?
|
||||
gGameExternalOptions.fUnrestrictVisited = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS", FALSE);
|
||||
|
||||
// HEADROCK HAM B1: Allow dynamic restrictions?
|
||||
gGameExternalOptions.fDynamicRestrictRoaming = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_DYNAMIC_RESTRICTED_ROAMING", TRUE);
|
||||
|
||||
// HEADROCK HAM B2.7: Augmented Roaming Militia code - turn this to TRUE to allow militia free travel through San Mona, Tixa, Orta, Omerta, and Estoni.
|
||||
gGameExternalOptions.fAllowMilitiaMoveThroughMinorCities = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MILITIA_MOVEMENT_THROUGH_MINOR_CITIES", FALSE);
|
||||
|
||||
// HEADROCK HAM 3.3: If enabled, Roaming Militia can automatically reinforce city garrisons.
|
||||
gGameExternalOptions.fAllowMobileReinforceCities = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MOBILE_MILITIA_REINFORCE_TOWN_GARRISONS", FALSE);
|
||||
|
||||
// HEADROCK HAM 3.3: If enabled, Roaming Militia can automatically reinforce city garrisons.
|
||||
gGameExternalOptions.fAllowMobileReinforceSAM = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MOBILE_MILITIA_REINFORCE_SAM_GARRISONS", FALSE);
|
||||
|
||||
// Moa: If enabled militia will follow player (default HAM behavier), set to FALSE if they should do what they want.
|
||||
gGameExternalOptions.gfAllowMilitiaFollowPlayer = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MILITIA_FOLLOW_PLAYER", TRUE);
|
||||
|
||||
// Moa: If enabled militia will spread (default HAM behavier) or set to FALSE to fill up the destination group to maximum.
|
||||
gGameExternalOptions.gfAllowMilitiaSpread = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MILITIA_SPREAD", TRUE);
|
||||
|
||||
// Moa: If enabled militia will spread when following or set to FALSE to fill up the destination group to maximum.
|
||||
gGameExternalOptions.gfAllowMilitiaSpreadWhenFollowing = iniReader.ReadBoolean("Mobile Militia Movement Settings","ALLOW_MILITIA_SPREAD_WHEN_FOLLOWING", FALSE);
|
||||
|
||||
//################# Militia Strategic Movement Settings ##################
|
||||
gGameExternalOptions.fMilitiaStrategicCommand = iniReader.ReadBoolean("Militia Strategic Movement Settings", "ALLOW_MILITIA_STRATEGIC_COMMAND", FALSE );
|
||||
|
||||
|
||||
|
||||
// SANDRO - added several bonuses for militia
|
||||
//################# Militia Strength Settings ##################
|
||||
|
||||
|
||||
+4
-54
@@ -309,7 +309,6 @@ typedef struct
|
||||
INT32 iMaxMilitiaPerSector;
|
||||
INT32 iTrainingSquadSize;
|
||||
INT32 iMilitiaTrainingCost;
|
||||
INT32 iMilitiaCostModifier;
|
||||
INT32 iRegularCostModifier;
|
||||
INT32 iVeteranCostModifier;
|
||||
INT32 iMinLoyaltyToTrain;
|
||||
@@ -476,14 +475,6 @@ typedef struct
|
||||
// Militia Settings
|
||||
BOOLEAN fAllowTacticalMilitiaCommand;
|
||||
BOOLEAN gfTrainVeteranMilitia;
|
||||
BOOLEAN gfAllowMilitiaGroups;
|
||||
BOOLEAN gfmusttrainroaming;
|
||||
BOOLEAN gflimitedRoaming;
|
||||
BOOLEAN gfAllowMilitiaFollowPlayer; //Moa: TRUE try to follow, FALSE do what they want
|
||||
BOOLEAN gfAllowMilitiaSpreadWhenFollowing; //Moa: TRUE spread normal, FALSE dont spread when following
|
||||
BOOLEAN gfAllowMilitiaSpread; //Moa: TRUE spread normal, FALSE fill up to max
|
||||
UINT8 gbMobileMilitiaMaxActiveMode; //Moa: Used to check if the maximum of mobile militia is reached (for training/deserting). THIS IS A MODE
|
||||
FLOAT gfpMobileMilitiaMaxActiveModifier; //Moa: const multiplier for the mode used (precalculated with MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR).
|
||||
|
||||
// Flugente: militia movement
|
||||
BOOLEAN fMilitiaStrategicCommand;
|
||||
@@ -491,14 +482,7 @@ typedef struct
|
||||
BOOLEAN gfAllowReinforcements;
|
||||
BOOLEAN gfAllowReinforcementsOnlyInCity;
|
||||
|
||||
UINT32 guiAllowMilitiaGroupsDelay;
|
||||
UINT32 guiTrainVeteranMilitiaDelay;
|
||||
UINT32 guiCreateEachNHours;
|
||||
UINT32 guiNumMobileMilitiaTrained;
|
||||
// HEADROCK HAM 3.6: These settings are REDUNDANT.
|
||||
//UINT32 guiMinMilitiaSquadSize;
|
||||
//UINT32 guiMaxMilitiaSquadSize;
|
||||
//UINT32 guiMaxMilitiaSquadSizeBattle;
|
||||
|
||||
// SANDRO - added some variables
|
||||
INT16 sGreenMilitiaAutoresolveStrength;
|
||||
@@ -971,13 +955,7 @@ typedef struct
|
||||
|
||||
// HEADROCK HAM B1: Allows reducing the chance of scoring a hit fractionally, if CTH = Minimum CTH
|
||||
UINT16 usMinimumCTHDivisor;
|
||||
|
||||
// HEADROCK HAM B1: Allows Restricted Roaming Militia to move through previously visited sectors.
|
||||
BOOLEAN fUnrestrictVisited;
|
||||
|
||||
// HEADROCK HAM B1: Allows the capture of towns to dynamically alter roaming restrictions
|
||||
BOOLEAN fDynamicRestrictRoaming;
|
||||
|
||||
|
||||
// HEADROCK HAM B2.1: This controls how effective suppression is, by increasing the number of ubSuppressionPoints accumulated by combatants (percentage);
|
||||
INT16 sSuppressionEffectiveness;
|
||||
|
||||
@@ -1073,9 +1051,6 @@ typedef struct
|
||||
// HEADROCK HAM B2.7: When turned on, this will give a CTH approximation instead of an exact value, on CTH Bars and "F" key feedback.
|
||||
BOOLEAN fApproximateCTH;
|
||||
|
||||
// HEADROCK HAM B2.7: Augmented Roaming Militia code - turn this to TRUE to allow militia free travel through San Mona, Tixa, Orta, Omerta, and Estoni.
|
||||
BOOLEAN fAllowMilitiaMoveThroughMinorCities;
|
||||
|
||||
// HEADROCK HAM B2.8: These are new cowering penalty divisors that help us determine how effective cowering is in different stances and when the shooter is targetting different bodyparts
|
||||
UINT8 ubCoweringPenaltyDivisorProne;
|
||||
UINT8 ubCoweringPenaltyDivisorCrouchedHead;
|
||||
@@ -1175,37 +1150,13 @@ typedef struct
|
||||
|
||||
// HEADROCK HAM 3.3: Increases tolerance while moving.
|
||||
UINT8 ubTilesMovedPerBonusTolerancePoint;
|
||||
|
||||
// HEADROCK HAM 3.3: New militia feature, Minimum Leadership required to train Roaming Militia
|
||||
UINT8 ubMinimumLeadershipToTrainMobileMilitia;
|
||||
|
||||
// HEADROCK HAM 3.3: If enabled, the trainer's "effective" leadership skill determines HOW MANY militia he/she creates per session.
|
||||
BOOLEAN fLeadershipAffectsMobileMilitiaQuantity;
|
||||
|
||||
// HEADROCK HAM 3.3: If "LEADERSHIP_AFFECTS_MILITIA_QUANTITY" is true, this value determines the lowest leadership required to train a full (default size 10) squad of town militia in one training session.
|
||||
UINT8 ubReqLeadershipForFullMobileTraining;
|
||||
|
||||
|
||||
// HEADROCK HAM 3.3: Minimum distance (in METERS) at which character suffer from friendly suppression.
|
||||
UINT16 usMinDistanceFriendlySuppression;
|
||||
|
||||
// HEADROCK HAM 3.3: If enabled, Roaming Militia can automatically reinforce city garrisons.
|
||||
BOOLEAN fAllowMobileReinforceCities;
|
||||
|
||||
// HEADROCK HAM 3.3: If enabled, Roaming Militia can automatically reinforce city garrisons.
|
||||
BOOLEAN fAllowMobileReinforceSAM;
|
||||
|
||||
|
||||
// HEADROCK HAM 3.4: This controls the intensity of Hiding the Bullet Count during combat. The higher it is, the more intense the effect. Negative values reduce the effect.
|
||||
UINT16 usBulletHideIntensity;
|
||||
|
||||
// HEADROCK HAM 3.4: What percentage of a new Mobile Militia group will be made of Elites? If >0, then at least one of every group will be an Elite. 100 = All Elites.
|
||||
UINT8 ubPercentRoamingMilitiaElites;
|
||||
|
||||
// HEADROCK HAM 3.4: What percentage of a new Mobile Militia group will be made of Elites? If >0, then at least one of every group will be an Elite. 100 = All Elites.
|
||||
UINT8 ubPercentRoamingMilitiaRegulars;
|
||||
|
||||
// HEADROCK HAM 3.5: Does leadership affect the Quality of new Mobile Militia groups?
|
||||
BOOLEAN fLeadershipAffectsMobileMilitiaQuality;
|
||||
|
||||
|
||||
// HEADROCK HAM 3.5: Explosive Suppression Effectiveness alters the amount of Suppression Points you get from nearby blasts.
|
||||
UINT16 usExplosionSuppressionEffect;
|
||||
|
||||
@@ -1252,7 +1203,6 @@ typedef struct
|
||||
|
||||
// HEADROCK HAM 3.6: Daily upkeep costs for militia
|
||||
UINT16 usDailyCostTown[MAX_MILITIA_LEVELS];
|
||||
UINT16 usDailyCostMobile[MAX_MILITIA_LEVELS];
|
||||
|
||||
// HEADROCK HAM 3.6: Non-Combat Bodytypes can't become hostile
|
||||
BOOLEAN fCanTrueCiviliansBecomeHostile;
|
||||
|
||||
+9
-9
@@ -15,9 +15,9 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8542 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8542 (Development Build)" };
|
||||
#endif
|
||||
|
||||
// ------------------------------
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
//DEBUG BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8542 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8542 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8542 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
@@ -46,16 +46,16 @@
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8542 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8542 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.8541 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.8542 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 18.03.08" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 18.03.10" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
@@ -744,13 +744,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, EXPLOSIONDATAFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInExplosionDataStats(fileName),EXPLOSIONDATAFILENAME);
|
||||
|
||||
// Kaiden: Read in Restricted Sectors for Mobile Militia
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, ROAMINGMILITIAFILENAME);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInRoamingInfo(fileName),ROAMINGMILITIAFILENAME);
|
||||
|
||||
|
||||
// Dealtar: Read in shipping destinations and delivery methods
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, SHIPPINGDESTINATIONSFILENAME);
|
||||
@@ -791,13 +785,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
strcat(fileName, SECTORFACILITIESFILENAME);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInSectorFacilities(fileName), SECTORFACILITIESFILENAME);
|
||||
|
||||
// HEADROCK HAM 3.4: Read in dynamic roaming restrictions
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, DYNAMICROAMINGFILENAME);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInDynamicRoamingRestrictions(fileName), DYNAMICROAMINGFILENAME);
|
||||
|
||||
|
||||
// HEADROCK HAM 3.6: Read in customized sector names
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, SECTORNAMESFILENAME);
|
||||
|
||||
+9
-21
@@ -482,8 +482,8 @@ typedef struct
|
||||
|
||||
#endif
|
||||
|
||||
// HEADROCK HAM 4: Added manual restrictions
|
||||
UINT8 ubManualRestrictMilitia[256];
|
||||
// Flugente: was mobile restriction, now it's just a filler
|
||||
UINT8 ubFiller1[256];
|
||||
|
||||
BOOLEAN HiddenNames[500]; //legion by Jazz
|
||||
|
||||
@@ -6622,13 +6622,7 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
|
||||
// fix squads
|
||||
CheckSquadMovementGroups();
|
||||
// HEADROCK HAM B1: Re-Adjust Dynamic Roaming Militia restrictions
|
||||
if (gGameExternalOptions.fDynamicRestrictRoaming)
|
||||
{
|
||||
// HEADROCK HAM 5: New flag tells us to also recheck restriced sectors.
|
||||
AdjustRoamingRestrictions( TRUE );
|
||||
}
|
||||
|
||||
|
||||
// HEADROCK HAM 3.5: Tells the rest of the program whether we've got mercs working on detecting enemy units.
|
||||
UpdateStrategicDetectionLevel( );
|
||||
|
||||
@@ -8567,11 +8561,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
||||
sGeneralInfo.fMorrisShouldSayHi = gfMorrisShouldSayHi;
|
||||
sGeneralInfo.fFirstTimeInGameHeliCrash = gfFirstTimeInGameHeliCrash;
|
||||
#endif
|
||||
|
||||
// HEADROCK HAM 4: Save global array for Manual Mobile Militia Restrictions
|
||||
// testing for loop
|
||||
memcpy(sGeneralInfo.ubManualRestrictMilitia, gubManualRestrictMilitia, sizeof( UINT8 )*256);
|
||||
|
||||
|
||||
for (int i=0;i<500;++i)
|
||||
{
|
||||
sGeneralInfo.HiddenNames[i] = !zHiddenNames[i].Hidden; //legion2
|
||||
@@ -8838,8 +8828,9 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubFiller4, sizeof(sGeneralInfo.ubFiller4), sizeof(INT8), numBytesRead);
|
||||
|
||||
#endif
|
||||
if ( guiCurrentSaveGameVersion >= NEW_GENERAL_SAVE_INFO_DATA ){
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubManualRestrictMilitia, sizeof(sGeneralInfo.ubManualRestrictMilitia), sizeof(UINT8), numBytesRead);
|
||||
if ( guiCurrentSaveGameVersion >= NEW_GENERAL_SAVE_INFO_DATA )
|
||||
{
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubFiller1, sizeof( sGeneralInfo.ubFiller1 ), sizeof( UINT8 ), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.HiddenNames, sizeof(sGeneralInfo.HiddenNames), sizeof(BOOLEAN), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterHoursToRepair, sizeof(sGeneralInfo.ubHelicopterHoursToRepair), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterBasicRepairsSoFar, sizeof(sGeneralInfo.ubHelicopterBasicRepairsSoFar), sizeof(UINT8), numBytesRead);
|
||||
@@ -8851,7 +8842,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
||||
} else {
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.HiddenNames, sizeof(sGeneralInfo.HiddenNames), sizeof(BOOLEAN), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubFiller, sizeof(sGeneralInfo.ubFiller), sizeof(UINT8), numBytesRead);
|
||||
for(UINT32 count = 0; count < sizeof(sGeneralInfo.ubManualRestrictMilitia); count++)
|
||||
for(UINT32 count = 0; count < 256; ++count)
|
||||
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
|
||||
}
|
||||
//CHRISL: GENERAL_SAVE_INFO is only 1586 but we have to read in DWORD lengths so we need to read additional filler bits from the save game file
|
||||
@@ -9142,10 +9133,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
||||
gfMorrisShouldSayHi = sGeneralInfo.fMorrisShouldSayHi;
|
||||
gfFirstTimeInGameHeliCrash = sGeneralInfo.fFirstTimeInGameHeliCrash;
|
||||
#endif
|
||||
|
||||
// HEADROCK HAM 4: Load Manual Mobile Militia Restrictions
|
||||
memcpy(gubManualRestrictMilitia, sGeneralInfo.ubManualRestrictMilitia, sizeof(UINT8) * 256);
|
||||
|
||||
|
||||
for (int i=0;i<500;++i)
|
||||
{
|
||||
zHiddenNames[i].Hidden = !sGeneralInfo.HiddenNames[i];
|
||||
|
||||
+53
-817
File diff suppressed because it is too large
Load Diff
@@ -65,7 +65,7 @@ enum
|
||||
RADIO_SCAN, // added by Flugente: a radio operators scans for enemy patrols in nearby sectors
|
||||
TRAIN_SELF,
|
||||
TRAIN_TOWN,
|
||||
TRAIN_MOBILE, // HEADROCK HAM 3.6: Training mobile militia.
|
||||
ASSIGNMENT_UNUSED, // Flugente: this was formerly TRAIN_MOBILE
|
||||
TRAIN_TEAMMATE,
|
||||
TRAIN_BY_OTHER,
|
||||
MOVE_EQUIPMENT, // added by Flugente: move items from one city sector to another
|
||||
@@ -196,7 +196,6 @@ BOOLEAN CanCharacterPatient( SOLDIERTYPE *pCharacter );
|
||||
// can character train militia?
|
||||
BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport = FALSE );
|
||||
BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pCharacter );
|
||||
BOOLEAN CanCharacterTrainMobileMilitia( SOLDIERTYPE *pSoldier );
|
||||
|
||||
BOOLEAN CanCharacterTrainWorkers( SOLDIERTYPE *pSoldier );
|
||||
|
||||
@@ -534,7 +533,6 @@ BOOLEAN FindAnyAwakeTrainees( SOLDIERTYPE *pTrainer );
|
||||
|
||||
// HEADROCK HAM 3.6: Functions for testing and reporting reasons why character can't train here.
|
||||
BOOLEAN CanCharacterTrainMilitiaWithErrorReport( SOLDIERTYPE *pSoldier );
|
||||
BOOLEAN CanCharacterTrainMobileMilitiaWithErrorReport( SOLDIERTYPE *pSoldier );
|
||||
// HEADROCK HAM 3.6: Function for testing and reporting reasons why character can't staff a facility.
|
||||
BOOLEAN CanCharacterFacilityWithErrorReport( SOLDIERTYPE *pSoldier, UINT8 ubFacilityType, UINT8 ubAssignmentType );
|
||||
void HandleInterfaceMessageForCostOfOperatingFacility( SOLDIERTYPE *pSoldier, UINT8 ubAssignmentType );
|
||||
@@ -547,7 +545,7 @@ extern UINT8 gubFacilityLineForSubmenu;
|
||||
extern SOLDIERTYPE *gpFacilityStaffer;
|
||||
|
||||
// SANDRO - function to award record points for militia training
|
||||
void RecordNumMilitiaTrainedForMercs( INT16 sX, INT16 sY, INT8 sZ, UINT8 ubMilitiaTrained, BOOLEAN fMobile );
|
||||
void RecordNumMilitiaTrainedForMercs( INT16 sX, INT16 sY, INT8 sZ, UINT8 ubMilitiaTrained );
|
||||
|
||||
// anv: decrease town loyalty hits
|
||||
UINT32 HandlePropagandaBlockingBadNewsInTown( INT8 bTownId, UINT32 uiLoyaltyDecrease );
|
||||
|
||||
@@ -325,10 +325,6 @@ void RenderSoldierCellHealth( SOLDIERCELL *pCell );
|
||||
void RenderSoldierCell( SOLDIERCELL *pCell );
|
||||
void RenderSoldierCellBars( SOLDIERCELL *pCell );
|
||||
|
||||
// HEADROCK HAM 3.4: New argument configuration to make use of revamped movement controls
|
||||
void GenerateDirectionInfos( INT16 sMapX, INT16 sMapY, UINT8* uiDirNumber, UINT16 pMoveDir[4][3], BOOLEAN fForTraining, BOOLEAN fForBattle );
|
||||
|
||||
|
||||
//Dynamic globals -- to conserve memory, all global variables are allocated upon entry
|
||||
//and deleted before we leave.
|
||||
AUTORESOLVE_STRUCT *gpAR = NULL;
|
||||
|
||||
@@ -296,9 +296,7 @@ typedef struct FACILITYTYPE
|
||||
UINT8 ubTotalStaffLimit; // Total number of people who can work here simultaneously
|
||||
|
||||
UINT8 ubMilitiaTrainersAllowed; // Number of Militia trainers allowed simultaneously
|
||||
UINT8 ubMobileMilitiaTrainersAllowed; // Number of Mobile Militia trainers allowed simultaneously
|
||||
UINT16 usMilitiaTraining; // Percentage effectiveness of Militia training (100 = normal)
|
||||
UINT16 usMobileMilitiaTraining; // Percentage effectiveness of Mobile Militia training (100 = normal)
|
||||
|
||||
UINT32 usFacilityFlags; // flagmask for various facility properties
|
||||
|
||||
@@ -306,7 +304,6 @@ typedef struct FACILITYTYPE
|
||||
|
||||
} FACILITYTYPE;
|
||||
|
||||
|
||||
// HEADROCK HAM 3.5: Maximum number of different facility types
|
||||
#define MAX_NUM_FACILITY_TYPES 255
|
||||
// HEADROCK HAM 3.5: Number of facilities placed on the map
|
||||
@@ -487,9 +484,9 @@ typedef struct SECTORINFO
|
||||
//a sector (nice theory, except it isn't being used that way. Stealing is only in towns. ARM)
|
||||
UINT8 ubNumberOfCivsAtLevel[ MAX_MILITIA_LEVELS ]; // town militia per experience class, 0/1/2 is GREEN/REGULAR/ELITE
|
||||
// HEADROCK HAM 3.6: Adding separate training percentage for MOBILES.
|
||||
UINT8 ubMobileMilitiaTrainingPercentDone;
|
||||
UINT8 ubMobileMilitiaTrainingHundredths;
|
||||
BOOLEAN fMobileMilitiaTrainingPaid;
|
||||
UINT8 usFiller3;
|
||||
UINT8 usFiller1;
|
||||
BOOLEAN fFiller2;
|
||||
// Replacing these variables with the ones above. They really are unused.
|
||||
//UINT16 usUNUSEDMilitiaLevels; // unused (ARM)
|
||||
//UINT8 ubUNUSEDNumberOfJoeBlowCivilians; // unused (ARM)
|
||||
|
||||
@@ -397,17 +397,7 @@ void UpdateStrategicDetectionLevel( )
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// Begin testing for facility detection bonuses.
|
||||
|
||||
// Does game allow Dynamic Roaming Militia?
|
||||
if (gGameExternalOptions.fDynamicRestrictRoaming)
|
||||
{
|
||||
// Does facility allow Dynamic Detection?
|
||||
if (GetFacilityModifier(FACILITY_DETECT_DYNAMIC, ubFacilityType, ubAssignmentType))
|
||||
{
|
||||
ubStrategicDetectionLevel |= (1 << DETECT_ENEMIES_DYNAMIC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Does facility allow Long-Range Detection?
|
||||
if (GetFacilityModifier(FACILITY_DETECT_LONGRANGE, ubFacilityType, ubAssignmentType))
|
||||
{
|
||||
@@ -461,24 +451,16 @@ void UpdateStrategicDetectionLevel( )
|
||||
}
|
||||
}
|
||||
}
|
||||
ubCounter++;
|
||||
++ubCounter;
|
||||
}
|
||||
|
||||
// Some flags have been set. Run through all sectors and apply this.
|
||||
for (UINT16 X = 0; X < 256; X++)
|
||||
for (UINT16 X = 0; X < 256; ++X)
|
||||
{
|
||||
// Reset detection level first
|
||||
// sevenfm: this will disable enemy detection using facility, and detection levels are already zeroed in this function
|
||||
//SectorInfo[X].ubDetectionLevel = 0;
|
||||
|
||||
if (ubStrategicDetectionLevel & (1<<DETECT_ENEMIES_DYNAMIC))
|
||||
{
|
||||
// Is sector allowed for militia roaming?
|
||||
if (IsSectorRoamingAllowed( X ) )
|
||||
{
|
||||
// Enemy is in a militia-allowed area, and is always visible.
|
||||
SectorInfo[X].ubDetectionLevel |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ubStrategicDetectionLevel & (1<<DETECT_ENEMIES_LONGRANGE))
|
||||
{
|
||||
if( GetSectorFlagStatus( SECTORX(X), SECTORY(X), 0, SF_ALREADY_VISITED ) == TRUE )
|
||||
|
||||
@@ -488,15 +488,10 @@ void InitStrategicLayer( void )
|
||||
|
||||
// HEADROCK HAM 3.6: Initialize facilities.
|
||||
InitFacilities();
|
||||
|
||||
// HEADROCK HAM 4: Initialize Manual Mobile Militia Restrictions.
|
||||
InitManualMobileRestrictions();
|
||||
|
||||
// Flugente: initialize dynamic supply data
|
||||
//InitStrategicSupplies();
|
||||
|
||||
|
||||
// free up any leave list arrays that were left allocated
|
||||
ShutDownLeaveList( );
|
||||
|
||||
// re-set up leave list arrays for dismissed mercs
|
||||
InitLeaveList( );
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "Assignments.h"
|
||||
// HEADROCK HAM 4: Now accepts INI settings
|
||||
#include "GameSettings.h"
|
||||
// Also include Town Militia for checks regarding Mobile Militia Restrictions
|
||||
#include "Town Militia.h"
|
||||
// Also include Quests, for checking whether a fact is true.
|
||||
#include "Quests.h"
|
||||
// HEADROCK HAM 5: Required for inventory filter popup
|
||||
@@ -54,8 +52,6 @@ UINT16 MAP_BORDER_ITEM_BTN_X;
|
||||
UINT16 MAP_BORDER_ITEM_BTN_Y;
|
||||
UINT16 MAP_BORDER_MILITIA_BTN_X;
|
||||
UINT16 MAP_BORDER_MILITIA_BTN_Y;
|
||||
UINT16 MAP_BORDER_MOBILE_BTN_X;
|
||||
UINT16 MAP_BORDER_MOBILE_BTN_Y;
|
||||
UINT16 MAP_BORDER_DISEASE_BTN_X; // Flugente: disease
|
||||
UINT16 MAP_BORDER_DISEASE_BTN_Y;
|
||||
UINT16 MAP_BORDER_WEATHER_BTN_X; // Flugente: weather
|
||||
@@ -128,8 +124,6 @@ void BtnItemCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnAircraftCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnTeamCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnMilitiaCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
// HEADROCK HAM 4: Mobile Restrictions Button callback
|
||||
void BtnMobileCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
|
||||
// Flugente: disease
|
||||
void BtnDiseaseCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
@@ -204,15 +198,8 @@ void RenderMapBorder( void )
|
||||
|
||||
// get and blt border
|
||||
GetVideoObject(&hHandle, guiMapBorder );
|
||||
// HEADROCK HAM 4: Load different map border depending on whether we want to display the mobile militia button or not.
|
||||
if ( gGameExternalOptions.gfAllowMilitiaGroups && !gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
{
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 1, xResOffset + MAP_BORDER_X, yResOffset + MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, xResOffset + MAP_BORDER_X, yResOffset + MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
}
|
||||
|
||||
BltVideoObject( guiSAVEBUFFER, hHandle, 0, xResOffset + MAP_BORDER_X, yResOffset + MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
|
||||
RestoreExternBackgroundRect( xResOffset + MAP_BORDER_X, yResOffset + MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset, SCREEN_HEIGHT - 121 - 2 * yResOffset);
|
||||
|
||||
@@ -220,7 +207,6 @@ void RenderMapBorder( void )
|
||||
DisplayCurrentLevelMarker( );
|
||||
}
|
||||
|
||||
|
||||
void RenderMapBorderEtaPopUp( void )
|
||||
{
|
||||
// renders map border corner to the FRAME_BUFFER
|
||||
@@ -299,17 +285,7 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
giMapBorderButtons[ MAP_BORDER_ITEM_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_ITEM_BTN ], MAP_BORDER_ITEM_BTN_X, MAP_BORDER_ITEM_BTN_Y,
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnItemCallback);
|
||||
|
||||
// WANNE: Only display the buton when mobile militia is allowed!
|
||||
// HEADROCK HAM 4: Mobile Restrictions Button
|
||||
if ( gGameExternalOptions.gfAllowMilitiaGroups && !gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
{
|
||||
giMapBorderButtonsImage[ MAP_BORDER_MOBILE_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,20,-1,21,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_MOBILE_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_MOBILE_BTN ], MAP_BORDER_MOBILE_BTN_X, MAP_BORDER_MOBILE_BTN_Y,
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnMobileCallback);
|
||||
}
|
||||
|
||||
|
||||
// set up fast help text
|
||||
SetButtonFastHelpText( giMapBorderButtons[ MAP_BORDER_TOWN_BTN ], pMapScreenBorderButtonHelpText[ MAP_BORDER_TOWN_BTN ] );
|
||||
SetButtonFastHelpText( giMapBorderButtons[ MAP_BORDER_MINE_BTN ], pMapScreenBorderButtonHelpText[ MAP_BORDER_MINE_BTN ] );
|
||||
@@ -317,9 +293,6 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
SetButtonFastHelpText( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ], pMapScreenBorderButtonHelpText[ MAP_BORDER_AIRSPACE_BTN ] );
|
||||
SetButtonFastHelpText( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ], pMapScreenBorderButtonHelpText[ MAP_BORDER_ITEM_BTN ] );
|
||||
SetButtonFastHelpText( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ], pMapScreenBorderButtonHelpText[ MAP_BORDER_MILITIA_BTN ] );
|
||||
|
||||
if ( gGameExternalOptions.gfAllowMilitiaGroups && !gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
SetButtonFastHelpText( giMapBorderButtons[ MAP_BORDER_MOBILE_BTN ], pMapScreenBorderButtonHelpText[ MAP_BORDER_MOBILE_BTN ] ); // HEADROCK HAM 4: Mobile Militia button
|
||||
|
||||
SetButtonCursor(giMapBorderButtons[ MAP_BORDER_TOWN_BTN ], MSYS_NO_CURSOR );
|
||||
SetButtonCursor(giMapBorderButtons[ MAP_BORDER_MINE_BTN ], MSYS_NO_CURSOR );
|
||||
@@ -327,10 +300,7 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
SetButtonCursor(giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ], MSYS_NO_CURSOR );
|
||||
SetButtonCursor(giMapBorderButtons[ MAP_BORDER_ITEM_BTN ], MSYS_NO_CURSOR );
|
||||
SetButtonCursor(giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ], MSYS_NO_CURSOR );
|
||||
|
||||
if ( gGameExternalOptions.gfAllowMilitiaGroups && !gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
SetButtonCursor(giMapBorderButtons[ MAP_BORDER_MOBILE_BTN ], MSYS_NO_CURSOR ); // HEADROCK HAM 4: Mobile Militia button
|
||||
|
||||
|
||||
// Flugente: disease
|
||||
if ( gGameExternalOptions.fDisease && gGameExternalOptions.fDiseaseStrategic )
|
||||
{
|
||||
@@ -436,7 +406,6 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ]);
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ]);
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ]);
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_MOBILE_BTN ]);
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_DISEASE_BTN ]);
|
||||
DisableButton( giMapBorderButtons[ MAP_BORDER_WEATHER_BTN ]);
|
||||
|
||||
@@ -448,7 +417,6 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
void DeleteMapBorderButtons( void )
|
||||
{
|
||||
for ( int i = 0; i < NUM_MAP_BORDER_BTNS; ++i )
|
||||
@@ -576,22 +544,6 @@ void BtnWeatherCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
}
|
||||
}
|
||||
|
||||
// HEADROCK HAM 4: Callback for Mobile Restrictions Button
|
||||
void BtnMobileCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
CommonBtnCallbackBtnDownChecks();
|
||||
|
||||
ToggleMobileFilter();
|
||||
}
|
||||
else if(reason & MSYS_CALLBACK_REASON_RBUTTON_DWN )
|
||||
{
|
||||
CommonBtnCallbackBtnDownChecks();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ToggleShowTownsMode( void )
|
||||
{
|
||||
if( fShowTownFlag == TRUE )
|
||||
@@ -691,8 +643,7 @@ void ToggleShowMilitiaMode( void )
|
||||
|
||||
// if he's already training some
|
||||
// HEADROCK HAM 3.6: Also for Mobile trainers.
|
||||
if( IsAnyOneOnPlayersTeamOnThisAssignment( TRAIN_TOWN ) ||
|
||||
IsAnyOneOnPlayersTeamOnThisAssignment( TRAIN_MOBILE ) )
|
||||
if( IsAnyOneOnPlayersTeamOnThisAssignment( TRAIN_TOWN ) )
|
||||
{
|
||||
// say they'll show up when training is completed
|
||||
pwString = pMapErrorString[ 28 ];
|
||||
@@ -829,48 +780,6 @@ void ToggleWeatherFilter( void )
|
||||
}
|
||||
}
|
||||
|
||||
// HEADROCK HAM 4: Toggle Mobile Restrictions Button
|
||||
void ToggleMobileFilter( void )
|
||||
{
|
||||
if ( gusMapDisplayColourMode == MAP_DISPLAY_MOBILEMILITIARESTRICTIONS )
|
||||
{
|
||||
gusMapDisplayColourMode = MAP_DISPLAY_NORMAL;
|
||||
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
|
||||
// dirty regions
|
||||
fMapPanelDirty = TRUE;
|
||||
fTeamPanelDirty = TRUE;
|
||||
fCharacterInfoPanelDirty = TRUE;
|
||||
fMapScreenBottomDirty = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// turn items ON
|
||||
TurnOnMobileFilterMode();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void ShowDestinationOfPlottedPath( STR16 pLoc )
|
||||
{
|
||||
INT16 sFontX, sFontY;
|
||||
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, 640, 480, FALSE );
|
||||
|
||||
SetFont( COMPFONT );
|
||||
SetFontForeground( 183 );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
VarFindFontCenterCoordinates( 461, 344, 70, 12, COMPFONT, &sFontX, &sFontY, pLoc );
|
||||
gprintfdirty(sFontX, sFontY, pLoc );
|
||||
mprintf(sFontX, sFontY, pLoc );
|
||||
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void DisplayCurrentLevelMarker( void )
|
||||
{
|
||||
// display the current level marker on the map border
|
||||
@@ -882,18 +791,14 @@ void DisplayCurrentLevelMarker( void )
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_LEVEL_MARKER_X + 1, MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( INT16 )iCurrentMapSectorZ ), VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
RestoreExternBackgroundRect(MAP_LEVEL_MARKER_X + 1, MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( INT16 )iCurrentMapSectorZ ), 55, 9);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateMouseRegionsForLevelMarkers( void )
|
||||
{
|
||||
INT16 sCounter = 0;
|
||||
CHAR16 sString[ 64 ];
|
||||
|
||||
for( sCounter = 0; sCounter < 4 ; sCounter++ )
|
||||
for( sCounter = 0; sCounter < 4 ; ++sCounter )
|
||||
{
|
||||
MSYS_DefineRegion(&LevelMouseRegions[ sCounter ], MAP_LEVEL_MARKER_X, ( INT16 )( MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * sCounter ) ), MAP_LEVEL_MARKER_X + MAP_LEVEL_MARKER_WIDTH, ( INT16 )( MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( sCounter + 1 ) ) ), MSYS_PRIORITY_HIGH, MSYS_NO_CURSOR,
|
||||
MSYS_NO_CALLBACK, LevelMarkerBtnCallback );
|
||||
@@ -962,8 +867,6 @@ void TurnOnShowTeamsMode( void )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void TurnOnAirSpaceMode( void )
|
||||
{
|
||||
// if mode already on, leave, else set and redraw
|
||||
@@ -976,7 +879,6 @@ void TurnOnAirSpaceMode( void )
|
||||
if ( gusMapDisplayColourMode == MAP_DISPLAY_AIRSPACE || gusMapDisplayColourMode == MAP_DISPLAY_AIRSPACE_COLOURED_SAMS )
|
||||
{
|
||||
MapBorderButtonOn( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_WEATHER_BTN );
|
||||
|
||||
@@ -1103,7 +1005,6 @@ void TurnOnDiseaseFilterMode( void )
|
||||
gusMapDisplayColourMode = MAP_DISPLAY_DISEASE;
|
||||
|
||||
MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOn( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_WEATHER_BTN );
|
||||
|
||||
@@ -1149,7 +1050,7 @@ void TurnOnDiseaseFilterMode( void )
|
||||
|
||||
if ( !gubFact[FACT_DISEASE_VIEWED] )
|
||||
{
|
||||
MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, zMarksMapScreenText[27] );
|
||||
MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, zMarksMapScreenText[25] );
|
||||
|
||||
SetFactTrue( FACT_DISEASE_VIEWED );
|
||||
}
|
||||
@@ -1169,7 +1070,6 @@ void TurnOnWeatherFilterMode()
|
||||
gusMapDisplayColourMode = MAP_DISPLAY_WEATHER;
|
||||
|
||||
MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOn( MAP_BORDER_WEATHER_BTN );
|
||||
|
||||
@@ -1217,7 +1117,7 @@ void TurnOnWeatherFilterMode()
|
||||
static BOOLEAN sWeatherviewed = FALSE;
|
||||
if ( !sWeatherviewed )
|
||||
{
|
||||
MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, zMarksMapScreenText[28] );
|
||||
MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, zMarksMapScreenText[26] );
|
||||
|
||||
sWeatherviewed = TRUE;
|
||||
}
|
||||
@@ -1229,82 +1129,6 @@ void TurnOnWeatherFilterMode()
|
||||
}
|
||||
}
|
||||
|
||||
// HEADROCK HAM 4: Activate "View Mobile Restrictions" mode.
|
||||
void TurnOnMobileFilterMode( void )
|
||||
{
|
||||
// if mode already on, leave, else set and redraw
|
||||
|
||||
if ( gusMapDisplayColourMode != MAP_DISPLAY_MOBILEMILITIARESTRICTIONS )
|
||||
{
|
||||
gusMapDisplayColourMode = MAP_DISPLAY_MOBILEMILITIARESTRICTIONS;
|
||||
|
||||
MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOn( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_WEATHER_BTN );
|
||||
|
||||
// Also turn on Militia mode
|
||||
fShowMilitia = FALSE; // Fool the function so that it always turns militia ON.
|
||||
ToggleShowMilitiaMode();
|
||||
|
||||
if( fShowMineFlag == TRUE )
|
||||
{
|
||||
fShowMineFlag = FALSE;
|
||||
MapBorderButtonOff( MAP_BORDER_MINE_BTN );
|
||||
}
|
||||
|
||||
if( fShowTeamFlag == TRUE )
|
||||
{
|
||||
fShowTeamFlag = FALSE;
|
||||
MapBorderButtonOff( MAP_BORDER_TEAMS_BTN );
|
||||
}
|
||||
|
||||
// Turn off items
|
||||
if( fShowItemsFlag == TRUE )
|
||||
{
|
||||
fShowItemsFlag = FALSE;
|
||||
MapBorderButtonOff( MAP_BORDER_ITEM_BTN );
|
||||
}
|
||||
|
||||
if ( (bSelectedDestChar != -1) || fPlotForHelicopter || fPlotForMilitia )
|
||||
{
|
||||
AbortMovementPlottingMode( );
|
||||
}
|
||||
else if ( gfInChangeArrivalSectorMode )
|
||||
{
|
||||
CancelChangeArrivalSectorMode( );
|
||||
}
|
||||
|
||||
STR16 pwString = NULL;
|
||||
|
||||
// check if player has any Mobile militia
|
||||
if ( DoesPlayerHaveAnyMobileMilitia( ) == 1 )
|
||||
{
|
||||
// say you need to train mobiles first
|
||||
pwString = zMarksMapScreenText[ 25 ];
|
||||
|
||||
MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, pwString );
|
||||
}
|
||||
|
||||
if ( !gubFact[ FACT_MOBILE_RESTRICTIONS_VIEWED ] )
|
||||
{
|
||||
// say you need to train mobiles first
|
||||
pwString = zMarksMapScreenText[ 26 ];
|
||||
|
||||
MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, pwString );
|
||||
|
||||
SetFactTrue( FACT_MOBILE_RESTRICTIONS_VIEWED );
|
||||
}
|
||||
|
||||
// dirty regions
|
||||
fMapPanelDirty = TRUE;
|
||||
fTeamPanelDirty = TRUE;
|
||||
fCharacterInfoPanelDirty = TRUE;
|
||||
fMapScreenBottomDirty = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void InitializeMapBorderButtonStates( void )
|
||||
{
|
||||
if( fShowItemsFlag )
|
||||
@@ -1357,36 +1181,24 @@ void InitializeMapBorderButtonStates( void )
|
||||
case MAP_DISPLAY_AIRSPACE:
|
||||
case MAP_DISPLAY_AIRSPACE_COLOURED_SAMS:
|
||||
MapBorderButtonOn( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_WEATHER_BTN );
|
||||
break;
|
||||
|
||||
case MAP_DISPLAY_MOBILEMILITIARESTRICTIONS:
|
||||
MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOn( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_WEATHER_BTN );
|
||||
break;
|
||||
|
||||
|
||||
case MAP_DISPLAY_DISEASE:
|
||||
MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOn( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_WEATHER_BTN );
|
||||
break;
|
||||
|
||||
case MAP_DISPLAY_WEATHER:
|
||||
MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_MOBILE_BTN );
|
||||
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
|
||||
MapBorderButtonOn( MAP_BORDER_WEATHER_BTN );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN DoesPlayerHaveAnyMilitia( void )
|
||||
{
|
||||
// run through list of towns that might have militia..if any return TRUE..else return FALSE
|
||||
@@ -1406,38 +1218,6 @@ BOOLEAN DoesPlayerHaveAnyMilitia( void )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// HEADROCK HAM 4: Check for Mobile Militia
|
||||
UINT8 DoesPlayerHaveAnyMobileMilitia( void )
|
||||
{
|
||||
if ( !gGameExternalOptions.gfAllowMilitiaGroups || gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
{
|
||||
// Mobile Militia not allowed at all.
|
||||
return (0);
|
||||
}
|
||||
|
||||
// run through list of towns that might have militia..if any return TRUE..else return FALSE
|
||||
for ( INT16 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
|
||||
{
|
||||
for ( INT16 sY = 1; sY < MAP_WORLD_Y - 1; ++sY )
|
||||
{
|
||||
// Look only in sectors where Militia Training is not allowed at all. If any militia are found there,
|
||||
// it means that they had to MOVE there, hence mobile militia.
|
||||
if (!MilitiaTrainingAllowedInSector( sX, sY, 0 ))
|
||||
{
|
||||
if ( NumNonPlayerTeamMembersInSector( sX, sY, MILITIA_TEAM ) > 0 )
|
||||
{
|
||||
// found at least one
|
||||
return( 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Militia are allowed, but none have been found.
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
|
||||
void CommonBtnCallbackBtnDownChecks( void )
|
||||
{
|
||||
if( IsMapScreenHelpTextUp() )
|
||||
@@ -1453,8 +1233,6 @@ void CommonBtnCallbackBtnDownChecks( void )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void InitMapScreenFlags( void )
|
||||
{
|
||||
fShowTownFlag = TRUE;
|
||||
@@ -1468,8 +1246,6 @@ void InitMapScreenFlags( void )
|
||||
gusMapDisplayColourMode = MAP_DISPLAY_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MapBorderButtonOff( UINT8 ubBorderButtonIndex )
|
||||
{
|
||||
Assert( ubBorderButtonIndex < NUM_MAP_BORDER_BTNS );
|
||||
@@ -1490,7 +1266,6 @@ void MapBorderButtonOff( UINT8 ubBorderButtonIndex )
|
||||
ButtonList[ giMapBorderButtons[ ubBorderButtonIndex ] ]->uiFlags &= ~(BUTTON_CLICKED_ON);
|
||||
}
|
||||
|
||||
|
||||
void MapBorderButtonOn( UINT8 ubBorderButtonIndex )
|
||||
{
|
||||
Assert( ubBorderButtonIndex < NUM_MAP_BORDER_BTNS );
|
||||
@@ -1528,8 +1303,6 @@ void InitMapBorderButtonCoordinates()
|
||||
MAP_BORDER_ITEM_BTN_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset);
|
||||
MAP_BORDER_MILITIA_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 23;
|
||||
MAP_BORDER_MILITIA_BTN_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset);
|
||||
MAP_BORDER_MOBILE_BTN_X = xResSize;
|
||||
MAP_BORDER_MOBILE_BTN_Y = 0;
|
||||
MAP_BORDER_DISEASE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 190;
|
||||
MAP_BORDER_DISEASE_BTN_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset);
|
||||
MAP_BORDER_WEATHER_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 233;
|
||||
@@ -1538,18 +1311,5 @@ void InitMapBorderButtonCoordinates()
|
||||
MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 114;
|
||||
MAP_LEVEL_MARKER_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset);
|
||||
MAP_LEVEL_MARKER_DELTA = 8;
|
||||
MAP_LEVEL_MARKER_WIDTH = 55;
|
||||
|
||||
if ( gGameExternalOptions.gfAllowMilitiaGroups && !gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
{
|
||||
// Mobile button appears next to Militia button.
|
||||
MAP_BORDER_MOBILE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 16;
|
||||
MAP_BORDER_MOBILE_BTN_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset);
|
||||
|
||||
// Airspace, Items, ZLevel buttons all moved to the right (+22px, +22px, +10px).
|
||||
MAP_BORDER_AIRSPACE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 42;
|
||||
MAP_BORDER_ITEM_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 85;
|
||||
|
||||
MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 124;
|
||||
}
|
||||
MAP_LEVEL_MARKER_WIDTH = 55;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
//#define MAP_BORDER_START_X 261
|
||||
//#define MAP_BORDER_START_Y 0
|
||||
|
||||
|
||||
|
||||
|
||||
// scroll directions
|
||||
enum{
|
||||
ZOOM_MAP_SCROLL_UP =0,
|
||||
@@ -30,13 +27,11 @@ enum{
|
||||
MAP_BORDER_AIRSPACE_BTN,
|
||||
MAP_BORDER_ITEM_BTN,
|
||||
MAP_BORDER_MILITIA_BTN,
|
||||
MAP_BORDER_MOBILE_BTN, // HEADROCK HAM 4: Mobile Militia Restrictions button
|
||||
MAP_BORDER_DISEASE_BTN, // Flugente: toggle disease views
|
||||
MAP_BORDER_WEATHER_BTN, // Flugente: toggle weather display
|
||||
NUM_MAP_BORDER_BTNS, // end enumeration marker
|
||||
};
|
||||
|
||||
|
||||
// HEADROCK HAM 4: Turned these into EXTERNS to allow dynamic modification
|
||||
//#define MAP_LEVEL_MARKER_X (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 114)) //MAP_BORDER_X + MAP_BORDER_X_OFFSET + 384 //(SCREEN_WIDTH - 75) //565
|
||||
extern UINT16 MAP_LEVEL_MARKER_X;
|
||||
@@ -44,7 +39,6 @@ extern UINT16 MAP_LEVEL_MARKER_Y;
|
||||
extern UINT16 MAP_LEVEL_MARKER_DELTA;
|
||||
extern UINT16 MAP_LEVEL_MARKER_WIDTH;
|
||||
|
||||
|
||||
extern BOOLEAN fShowTownFlag;
|
||||
extern BOOLEAN fShowMineFlag;
|
||||
extern BOOLEAN fShowTeamFlag;
|
||||
@@ -57,7 +51,6 @@ enum
|
||||
MAP_DISPLAY_NORMAL,
|
||||
MAP_DISPLAY_AIRSPACE,
|
||||
MAP_DISPLAY_AIRSPACE_COLOURED_SAMS,
|
||||
MAP_DISPLAY_MOBILEMILITIARESTRICTIONS,
|
||||
MAP_DISPLAY_DISEASE,
|
||||
MAP_DISPLAY_WEATHER,
|
||||
};
|
||||
@@ -71,8 +64,6 @@ extern INT32 giScrollButtonState;
|
||||
BOOLEAN LoadMapBorderGraphics( void );
|
||||
void DeleteMapBorderGraphics( void );
|
||||
void RenderMapBorder( void );
|
||||
//void ShowDestinationOfPlottedPath( STR16 pLoc );
|
||||
//void ResetAircraftButton( void );
|
||||
|
||||
void ToggleShowTownsMode( void );
|
||||
void ToggleShowMinesMode( void );
|
||||
@@ -80,8 +71,6 @@ void ToggleShowMilitiaMode( void );
|
||||
void ToggleShowTeamsMode( void );
|
||||
void ToggleAirspaceMode( void );
|
||||
void ToggleItemsFilter( void );
|
||||
// HEADROCK HAM 4: Toggle Mobile Militia Restrictions Filter
|
||||
void ToggleMobileFilter( void );
|
||||
|
||||
// Flugente: disease
|
||||
void ToggleDiseaseFilter( );
|
||||
@@ -92,8 +81,6 @@ void ToggleWeatherFilter( );
|
||||
void TurnOnShowTeamsMode( void );
|
||||
void TurnOnAirSpaceMode( void );
|
||||
void TurnOnItemFilterMode( void );
|
||||
// HEADROCK HAM 4: Turn on Mobile Militia Restrictions Filter
|
||||
void TurnOnMobileFilterMode( void );
|
||||
|
||||
// Flugente: disease
|
||||
void TurnOnDiseaseFilterMode();
|
||||
@@ -108,8 +95,6 @@ BOOLEAN CreateButtonsForMapBorder( void );
|
||||
// render the pop up for eta in path plotting in map screen
|
||||
void RenderMapBorderEtaPopUp( void );
|
||||
BOOLEAN DoesPlayerHaveAnyMilitia( void );
|
||||
// HEADROCK HAM 4: Same with Mobiles.
|
||||
UINT8 DoesPlayerHaveAnyMobileMilitia( void );
|
||||
|
||||
// create mouse regions for level markers
|
||||
void CreateMouseRegionsForLevelMarkers( void );
|
||||
|
||||
@@ -842,33 +842,7 @@ UINT32 DrawMap( void )
|
||||
mprintf( usXPos, usYPos, sString );
|
||||
}
|
||||
break;
|
||||
|
||||
case MAP_DISPLAY_MOBILEMILITIARESTRICTIONS:
|
||||
{
|
||||
// HEADROCK HAM 4: Show Manual Mobile Militia Restrictions
|
||||
UINT8 ubManualMobileMovementAllowed = ManualMobileMovementAllowed( SECTOR( cnt, cnt2 ) );
|
||||
switch ( ubManualMobileMovementAllowed )
|
||||
{
|
||||
case 0:
|
||||
// Mobiles not allowed here at all.
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_DK_GREY );
|
||||
break;
|
||||
case 1:
|
||||
// Mobiles forbidden by player
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_MD_RED );
|
||||
break;
|
||||
case 2:
|
||||
// Mobiles can enter but not leave
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_LT_YELLOW );
|
||||
break;
|
||||
case 3:
|
||||
// Mobiles can enter
|
||||
ShadeMapElem( cnt, cnt2, MAP_SHADE_LT_GREEN );
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MAP_DISPLAY_DISEASE:
|
||||
ShadeMapElem( cnt, cnt2, GetMapColour( cnt, cnt2, 0 ) );
|
||||
break;
|
||||
@@ -2335,7 +2309,7 @@ INT16 GetLastSectorOfHelicoptersPath( void )
|
||||
INT16 GetLastSectorOfMilitiaPath( void )
|
||||
{
|
||||
// will return the last sector of the helicopter's current path
|
||||
INT16 sLastSector = gMilitiaPlotStartSector;//pVehicleList[iHelicopterVehicleId].sSectorX + pVehicleList[iHelicopterVehicleId].sSectorY * MAP_WORLD_X;
|
||||
INT16 sLastSector = gMilitiaPlotStartSector;
|
||||
PathStPtr pNode = NULL;
|
||||
|
||||
pNode = gMilitiaPath[gMilitiaGroupId].path;
|
||||
|
||||
@@ -468,9 +468,9 @@ void AddTextToTownBox( void )
|
||||
}
|
||||
|
||||
// prisoners
|
||||
swprintf( wString, L"%s:", pwTownInfoStrings[ 13 ] );
|
||||
swprintf( wString, L"%s:", pwTownInfoStrings[ 12 ] );
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
swprintf( wString, pwTownInfoStrings[14], numprisoners, capacity );
|
||||
swprintf( wString, pwTownInfoStrings[13], numprisoners, capacity );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
|
||||
for ( int i = 0; i < PRISONER_MAX; ++i )
|
||||
@@ -479,7 +479,7 @@ void AddTextToTownBox( void )
|
||||
{
|
||||
swprintf( wString, L"" );
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
swprintf( wString, pwTownInfoStrings[15 + i], aPrisoners[i] );
|
||||
swprintf( wString, pwTownInfoStrings[14 + i], aPrisoners[i] );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
}
|
||||
}
|
||||
@@ -817,8 +817,7 @@ void AddCommonInfoToBox(void)
|
||||
// No/Yes
|
||||
swprintf( wString, L"%s", pwMiscSectorStrings[ ( StrategicMap[ CALCULATE_STRATEGIC_INDEX( bCurrentTownMineSectorX, bCurrentTownMineSectorY ) ].fEnemyControlled ) ? 6 : 5 ] );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
|
||||
|
||||
|
||||
// militia - is there any?
|
||||
swprintf( wString, L"%s:", pwTownInfoStrings[ 11 ] );
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
@@ -842,23 +841,25 @@ void AddCommonInfoToBox(void)
|
||||
|
||||
// HEADROCK HAM 3.6: Only show these for sectors that have a training facility
|
||||
BOOLEAN fMilitiaTrainingAllowed = FALSE;
|
||||
BOOLEAN fMobileTrainingAllowed = FALSE;
|
||||
|
||||
// percentage of current militia squad training completed
|
||||
swprintf( wString, L"%s:", pwTownInfoStrings[ 10 ] );
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
|
||||
// Sector contains Militia training facility?
|
||||
for (UINT8 ubCounter = 0; ubCounter < MAX_NUM_FACILITY_TYPES; ubCounter++)
|
||||
for (UINT8 ubCounter = 0; ubCounter < MAX_NUM_FACILITY_TYPES; ++ubCounter)
|
||||
{
|
||||
if (gFacilityLocations[usSectorValue][ubCounter].fFacilityHere)
|
||||
{
|
||||
if (gFacilityTypes[ubCounter].ubMilitiaTrainersAllowed)
|
||||
{
|
||||
fMilitiaTrainingAllowed = TRUE;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fMilitiaTrainingAllowed)
|
||||
{
|
||||
// Show percent completed
|
||||
@@ -870,37 +871,8 @@ void AddCommonInfoToBox(void)
|
||||
// Show N/A
|
||||
AddSecondColumnMonoString( &hStringHandle, New113HAMMessage[19] );
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: percentage of current Mobile Militia squad training completed
|
||||
swprintf( wString, L"%s:", pwTownInfoStrings[ 12 ] );
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
|
||||
// Sector contains Mobile training facility?
|
||||
for (UINT8 ubCounter = 0; ubCounter < MAX_NUM_FACILITY_TYPES; ubCounter++)
|
||||
{
|
||||
if (gFacilityLocations[usSectorValue][ubCounter].fFacilityHere)
|
||||
{
|
||||
if (gFacilityTypes[ubCounter].ubMobileMilitiaTrainersAllowed)
|
||||
{
|
||||
fMobileTrainingAllowed = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fMobileTrainingAllowed)
|
||||
{
|
||||
// Show percentage completed
|
||||
swprintf( wString, L"%d%%%%", SectorInfo[ usSectorValue ].ubMobileMilitiaTrainingPercentDone );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show N/A
|
||||
AddSecondColumnMonoString( &hStringHandle, New113HAMMessage[19] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// enemy forces
|
||||
swprintf( wString, L"%s:", pwMiscSectorStrings[ 0 ] );
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
|
||||
@@ -444,25 +444,18 @@ BOOLEAN ValidSelectableCharForNextOrPrev( INT32 iNewCharSlot );
|
||||
|
||||
extern void ResumeOldAssignment( SOLDIERTYPE *pSoldier );
|
||||
|
||||
|
||||
|
||||
void InitalizeVehicleAndCharacterList( void )
|
||||
{
|
||||
// will init the vehicle and character lists to zero
|
||||
memset(&gCharactersList, 0, sizeof( gCharactersList ));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void SetEntryInSelectedCharacterList( INT8 bEntry )
|
||||
{
|
||||
Assert( ( bEntry >= 0 ) && ( bEntry < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS ) );
|
||||
|
||||
// set this entry to selected
|
||||
fSelectedListOfMercsForMapScreen[ bEntry ] = TRUE ;
|
||||
|
||||
return;
|
||||
fSelectedListOfMercsForMapScreen[ bEntry ] = TRUE;
|
||||
}
|
||||
|
||||
void ResetEntryForSelectedList( INT8 bEntry )
|
||||
@@ -471,8 +464,6 @@ void ResetEntryForSelectedList( INT8 bEntry )
|
||||
|
||||
// set this entry to selected
|
||||
fSelectedListOfMercsForMapScreen[ bEntry ] = FALSE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ResetSelectedListForMapScreen( void )
|
||||
@@ -487,11 +478,8 @@ void ResetSelectedListForMapScreen( void )
|
||||
// then keep him selected
|
||||
SetEntryInSelectedCharacterList( bSelectedInfoChar );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN IsEntryInSelectedListSet( INT8 bEntry )
|
||||
{
|
||||
Assert( ( bEntry >= 0 ) && ( bEntry < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS ) );
|
||||
@@ -499,18 +487,14 @@ BOOLEAN IsEntryInSelectedListSet( INT8 bEntry )
|
||||
// is this entry in the selected list set?
|
||||
|
||||
return( fSelectedListOfMercsForMapScreen[ bEntry ] );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ToggleEntryInSelectedList( INT8 bEntry )
|
||||
{
|
||||
Assert( ( bEntry >= 0 ) && ( bEntry < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS ) );
|
||||
|
||||
// toggle the value in the selected list
|
||||
fSelectedListOfMercsForMapScreen[ bEntry ] = !( fSelectedListOfMercsForMapScreen[ bEntry ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void BuildSelectedListFromAToB( INT8 bA, INT8 bB )
|
||||
@@ -532,47 +516,33 @@ void BuildSelectedListFromAToB( INT8 bA, INT8 bB )
|
||||
|
||||
// run through list and set all intermediaries to true
|
||||
|
||||
for( bStart; bStart <= bEnd; bStart++ )
|
||||
for( bStart; bStart <= bEnd; ++bStart )
|
||||
{
|
||||
SetEntryInSelectedCharacterList( bStart );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN MultipleCharacterListEntriesSelected( void )
|
||||
{
|
||||
UINT8 ubSelectedCnt = 0;
|
||||
INT32 iCounter = 0;
|
||||
|
||||
// check if more than one person is selected in the selected list
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
for( INT32 iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ++iCounter )
|
||||
{
|
||||
if( fSelectedListOfMercsForMapScreen[iCounter] == TRUE )
|
||||
{
|
||||
ubSelectedCnt++;
|
||||
++ubSelectedCnt;
|
||||
}
|
||||
}
|
||||
|
||||
if( ubSelectedCnt > 1 )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
return ( ubSelectedCnt > 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ResetAssignmentsForMercsTrainingUnpaidSectorsInSelectedList( UINT8 ubMilitiaType )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
for( INT32 iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ++iCounter )
|
||||
{
|
||||
// valid character?
|
||||
if( gCharactersList[ iCounter ].fValid == FALSE )
|
||||
@@ -598,26 +568,15 @@ void ResetAssignmentsForMercsTrainingUnpaidSectorsInSelectedList( UINT8 ubMiliti
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
if( pSoldier->bAssignment == TRAIN_MOBILE )
|
||||
{
|
||||
if ( SectorInfo[ SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) ].fMobileMilitiaTrainingPaid == FALSE )
|
||||
{
|
||||
ResumeOldAssignment( pSoldier );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: Added argument for Militia Type
|
||||
void ResetAssignmentOfMercsThatWereTrainingMilitiaInThisSector( INT16 sSectorX, INT16 sSectorY, UINT8 ubMilitiaType )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
for( INT32 iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ++iCounter )
|
||||
{
|
||||
// valid character?
|
||||
if( gCharactersList[ iCounter ].fValid == FALSE )
|
||||
@@ -643,47 +602,16 @@ void ResetAssignmentOfMercsThatWereTrainingMilitiaInThisSector( INT16 sSectorX,
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA )
|
||||
{
|
||||
if( pSoldier->bAssignment == TRAIN_MOBILE )
|
||||
{
|
||||
if( ( pSoldier->sSectorX == sSectorX ) && ( pSoldier->sSectorY == sSectorY ) && ( pSoldier->bSectorZ == 0 ) )
|
||||
{
|
||||
ResumeOldAssignment( pSoldier );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
void PlotPathForSelectedCharacterList( INT16 sX, INT16 sY )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
// run through list and build paths for each character
|
||||
for( iCounter = 0; iCounter < CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
{
|
||||
if( ( fSelectedListOfMercsForMapScreen[ iCounter ] == TRUE )&&( bSelectedDestChar != iCounter ) )
|
||||
{
|
||||
// character is valid.. do this for every one not the bSelectedDestChar
|
||||
PlotPathForCharacter( &Menptr[ gCharactersList[ iCounter ].usSolID ], sX, sY, FALSE );
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// check if the members of the selected list move with this guy... are they in the same mvt group?
|
||||
void DeselectSelectedListMercsWhoCantMoveWithThisGuy( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
SOLDIERTYPE *pSoldier2 = NULL;
|
||||
|
||||
|
||||
|
||||
// deselect any other selected mercs that can't travel together with pSoldier
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
for( INT32 iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
{
|
||||
if( gCharactersList[ iCounter ].fValid == TRUE )
|
||||
{
|
||||
@@ -696,8 +624,7 @@ void DeselectSelectedListMercsWhoCantMoveWithThisGuy( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// NOTE ABOUT THE VEHICLE TESTS BELOW:
|
||||
// Vehicles and foot squads can't plot movement together!
|
||||
// The ETAs are different, and unlike squads, vehicles can't travel everywhere!
|
||||
@@ -766,19 +693,13 @@ void DeselectSelectedListMercsWhoCantMoveWithThisGuy( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SelectUnselectedMercsWhoMustMoveWithThisGuy( void )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
|
||||
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
|
||||
for( INT32 iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ++iCounter )
|
||||
{
|
||||
if( gCharactersList[ iCounter ].fValid == TRUE )
|
||||
{
|
||||
@@ -802,15 +723,11 @@ void SelectUnselectedMercsWhoMustMoveWithThisGuy( void )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN AnyMercInSameSquadOrVehicleIsSelected( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
SOLDIERTYPE *pSoldier2 = NULL;
|
||||
|
||||
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
|
||||
for( INT32 iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ++iCounter )
|
||||
{
|
||||
if( gCharactersList[ iCounter ].fValid == TRUE )
|
||||
{
|
||||
|
||||
@@ -177,7 +177,6 @@ enum {
|
||||
// training assignment menu defines
|
||||
enum {
|
||||
TRAIN_MENU_SELF,
|
||||
TRAIN_MENU_MOBILE,
|
||||
TRAIN_MENU_WORKERS,
|
||||
TRAIN_MENU_TEAMMATES,
|
||||
TRAIN_MENU_TRAIN_BY_OTHER,
|
||||
@@ -261,10 +260,10 @@ enum{
|
||||
STOP_YELLOW_SECTOR_LOCATOR,
|
||||
};
|
||||
|
||||
// Flugente: somewhat pointless since mobile militia has been removed, but perhaps there will be other kinds of militia at some point, so keep this for now
|
||||
// HEADROCK HAM 3.6: Enums for Militia Training Types
|
||||
enum{
|
||||
TOWN_MILITIA = 0,
|
||||
MOBILE_MILITIA,
|
||||
NUM_MILITIA_TRAINING_TYPES
|
||||
};
|
||||
|
||||
|
||||
+16
-1340
File diff suppressed because it is too large
Load Diff
@@ -12,29 +12,17 @@
|
||||
extern UINT8 gpAttackDirs[5][4];
|
||||
extern UINT8 guiDirNumber;
|
||||
|
||||
// Updates movement orders for militia squads
|
||||
void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY );
|
||||
|
||||
// Flugente: militia in this sector is ordered to move according to flags that were applied to it prior
|
||||
void MilitiaMovementOrder(UINT8 sector);
|
||||
|
||||
// Kaiden: creates militia squad in an adjacent sector
|
||||
// to the coordinates you pass to it.
|
||||
void CreateMilitiaSquads(INT16 sMapX, INT16 sMapY );
|
||||
void MilitiaHelpFromAdjacentSectors( INT16 sMapX, INT16 sMapY );
|
||||
|
||||
// HEADROCK HAM 3.4: Now using different arguments for this function. All relevent instances have also been altered.
|
||||
void GenerateDirectionInfos( INT16 sMapX, INT16 sMapY, UINT8* uiDirNumber, UINT16 pMoveDir[4][3], BOOLEAN fForTraining, BOOLEAN fForBattle );
|
||||
BOOLEAN MoveOneBestMilitiaMan(INT16 sMapX, INT16 sMapY, INT16 sTMapX, INT16 sTMapY);
|
||||
void MilitiaFollowPlayer( INT16 sMapX, INT16 sMapY, INT16 sDMapX, INT16 sDMapY );
|
||||
|
||||
// HEADROCK HAM B1: Changes the allowed militia sectors
|
||||
// HEADROCK HAM 5: New flag tells us to also recheck restriced sectors.
|
||||
extern void AdjustRoamingRestrictions( BOOLEAN fRecheck );
|
||||
// HEADROCK HAM 4: Yet ANOTHER array, this one holds player-set restrictions. It interacts with the dynamic one below.
|
||||
extern UINT8 gubManualRestrictMilitia[ 256 ];
|
||||
// HEADROCK HAM B1: Alternate array keeps track of dynamically unrestricted sectors
|
||||
extern BOOLEAN gDynamicRestrictMilitia[ 256 ];
|
||||
// HEADROCK HAM B2.7: Wonder why this function wasn't declared here. It is now, to allow Town Militia.cpp to
|
||||
// access it.
|
||||
|
||||
@@ -44,16 +32,6 @@ BOOLEAN CheckStandardConditionsForDirection( INT16 sSMapX, INT16 sSMapY, INT16 s
|
||||
// makes sure that the target sector has room for more militia.
|
||||
void GenerateDirectionInfosForTraining( INT16 sMapX, INT16 sMapY, UINT8* uiDirNumber, UINT16 pMoveDir[4][3] );
|
||||
|
||||
// HEADROCK HAM 3.4: Stores restriction data from XML, including required cities for each sector to be allowed.
|
||||
typedef struct DYNAMICRESTRICTIONS
|
||||
{
|
||||
INT16 sSectorID;
|
||||
UINT32 uiReqTownFlags;
|
||||
} DYNAMICRESTRICTIONS;
|
||||
|
||||
// HEADROCK HAM 3.4: New function for simple Roaming Restriction testing.
|
||||
BOOLEAN IsSectorRoamingAllowed( UINT32 uiSector );
|
||||
|
||||
// HEADROCK HAM 3.6: New upgrade check returns the amount of militia that can be upgraded at target sector, in
|
||||
// "upgrade points"
|
||||
UINT16 MilitiaUpgradeSlotsCheck( INT16 sMapX, INT16 sMapY );
|
||||
@@ -61,16 +39,6 @@ UINT16 MilitiaUpgradeSlotsCheck( INT16 sMapX, INT16 sMapY );
|
||||
// HEADROCK HAM 3.6: This needs to be accessible.
|
||||
void AddToBlockMoveList(INT16 sMapX, INT16 sMapY);
|
||||
|
||||
// HEADROCK HAM 4: Returns whether sector is allowed for militia roaming, taking into account player-set restrictions.
|
||||
UINT8 ManualMobileMovementAllowed( UINT8 ubSector );
|
||||
|
||||
// HEADROCK HAM 4: Initialize all manual restrictions;
|
||||
void InitManualMobileRestrictions();
|
||||
|
||||
//Moa: for mobile militia: militia deserters and maximum allowed
|
||||
extern void MobileMilitiaDeserters( INT16 sMapX, INT16 sMapY, BOOLEAN fDeleteEquip, BOOLEAN fPrintMessage );
|
||||
extern UINT8 GetMobileMilitiaQuota( BOOLEAN printMessage );
|
||||
|
||||
// Flugente: militia movement
|
||||
BOOLEAN SaveMilitiaMovementInformationToSaveGameFile( HWFILE hFile );
|
||||
BOOLEAN LoadMilitiaMovementInformationFromSavedGameFile( HWFILE hFile, UINT32 uiSavedGameVersion );
|
||||
|
||||
+2
-2
@@ -541,8 +541,8 @@ enum Facts
|
||||
|
||||
FACT_CONRAD_SHOULD_GO = 367,
|
||||
FACT_PLAYER_KILLED_BOXERS = 368,
|
||||
// HEADROCK HAM 4: Seen Mobile Militia screen after having at least one mobile unit?
|
||||
FACT_MOBILE_RESTRICTIONS_VIEWED = 369,
|
||||
|
||||
FACT_UNUSED = 369,
|
||||
|
||||
// anv: Waldo The Mechanic, facts for his dialogue
|
||||
FACT_HELI_DAMAGED_CAN_START_REPAIR,
|
||||
|
||||
@@ -588,13 +588,7 @@ void MercDailyUpdate()
|
||||
#endif
|
||||
// rebuild list for mapscreen
|
||||
ReBuildCharactersList( );
|
||||
// HEADROCK HAM B1: Run a function to redefine Roaming Militia Restrictions.
|
||||
if (gGameExternalOptions.fDynamicRestrictRoaming)
|
||||
{
|
||||
// HEADROCK HAM 5: New flag tells us to also recheck restriced sectors.
|
||||
AdjustRoamingRestrictions( FALSE );
|
||||
}
|
||||
|
||||
|
||||
// Buggler: Pay income for operating Facilities today.
|
||||
if (giTotalEarnedForFacilityOperationsToday)
|
||||
{
|
||||
|
||||
@@ -1880,13 +1880,7 @@ void CheckIfEntireTownHasBeenLiberated( INT8 bTownId, INT16 sSectorX, INT16 sSec
|
||||
{
|
||||
UpdateLastDayOfPlayerActivity( ( UINT16 ) ( GetWorldDay() + 2 ) );
|
||||
}
|
||||
// HEADROCK HAM B1: Run a function to redefine Roaming Militia Restrictions on city capture.
|
||||
if (gGameExternalOptions.fDynamicRestrictRoaming)
|
||||
{
|
||||
// HEADROCK HAM 5: New flag tells us to also recheck restriced sectors.
|
||||
AdjustRoamingRestrictions( FALSE );
|
||||
}
|
||||
|
||||
|
||||
// set flag even for towns where you can't train militia, useful for knowing Orta/Tixa were previously controlled
|
||||
gTownLoyalty[ bTownId ].fLiberatedAlready = TRUE;
|
||||
}
|
||||
|
||||
@@ -768,10 +768,6 @@
|
||||
RelativePath=".\XML_Creatures.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_DynamicRestrictions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_ExtraItems.cpp"
|
||||
>
|
||||
@@ -788,10 +784,6 @@
|
||||
RelativePath=".\XML_Minerals.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_Roaming.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_SectorNames.cpp"
|
||||
>
|
||||
|
||||
@@ -766,10 +766,6 @@
|
||||
RelativePath=".\XML_Creatures.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_DynamicRestrictions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_ExtraItems.cpp"
|
||||
>
|
||||
@@ -786,10 +782,6 @@
|
||||
RelativePath=".\XML_Minerals.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="XML_Roaming.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_SectorNames.cpp"
|
||||
>
|
||||
|
||||
@@ -131,12 +131,10 @@
|
||||
<ClCompile Include="XML_Bloodcats.cpp" />
|
||||
<ClCompile Include="XML_CoolnessBySector.cpp" />
|
||||
<ClCompile Include="XML_Creatures.cpp" />
|
||||
<ClCompile Include="XML_DynamicRestrictions.cpp" />
|
||||
<ClCompile Include="XML_ExtraItems.cpp" />
|
||||
<ClCompile Include="XML_Facilities.cpp" />
|
||||
<ClCompile Include="XML_FacilityTypes.cpp" />
|
||||
<ClCompile Include="XML_Minerals.cpp" />
|
||||
<ClCompile Include="XML_Roaming.cpp" />
|
||||
<ClCompile Include="XML_SectorNames.cpp" />
|
||||
<ClCompile Include="XML_SquadNames.cpp" />
|
||||
<ClCompile Include="XML_UniformColors.cpp" />
|
||||
|
||||
@@ -314,9 +314,6 @@
|
||||
<ClCompile Include="XML_Bloodcats.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_DynamicRestrictions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_ExtraItems.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -326,9 +323,6 @@
|
||||
<ClCompile Include="XML_FacilityTypes.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Roaming.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_SectorNames.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -131,12 +131,10 @@
|
||||
<ClCompile Include="XML_Bloodcats.cpp" />
|
||||
<ClCompile Include="XML_CoolnessBySector.cpp" />
|
||||
<ClCompile Include="XML_Creatures.cpp" />
|
||||
<ClCompile Include="XML_DynamicRestrictions.cpp" />
|
||||
<ClCompile Include="XML_ExtraItems.cpp" />
|
||||
<ClCompile Include="XML_Facilities.cpp" />
|
||||
<ClCompile Include="XML_FacilityTypes.cpp" />
|
||||
<ClCompile Include="XML_Minerals.cpp" />
|
||||
<ClCompile Include="XML_Roaming.cpp" />
|
||||
<ClCompile Include="XML_SectorNames.cpp" />
|
||||
<ClCompile Include="XML_SquadNames.cpp" />
|
||||
<ClCompile Include="XML_UniformColors.cpp" />
|
||||
|
||||
@@ -308,9 +308,6 @@
|
||||
<ClCompile Include="XML_Bloodcats.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_DynamicRestrictions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_ExtraItems.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -320,9 +317,6 @@
|
||||
<ClCompile Include="XML_FacilityTypes.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Roaming.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_SectorNames.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -131,12 +131,10 @@
|
||||
<ClCompile Include="XML_Bloodcats.cpp" />
|
||||
<ClCompile Include="XML_CoolnessBySector.cpp" />
|
||||
<ClCompile Include="XML_Creatures.cpp" />
|
||||
<ClCompile Include="XML_DynamicRestrictions.cpp" />
|
||||
<ClCompile Include="XML_ExtraItems.cpp" />
|
||||
<ClCompile Include="XML_Facilities.cpp" />
|
||||
<ClCompile Include="XML_FacilityTypes.cpp" />
|
||||
<ClCompile Include="XML_Minerals.cpp" />
|
||||
<ClCompile Include="XML_Roaming.cpp" />
|
||||
<ClCompile Include="XML_SectorNames.cpp" />
|
||||
<ClCompile Include="XML_SquadNames.cpp" />
|
||||
<ClCompile Include="XML_UniformColors.cpp" />
|
||||
|
||||
+56
-545
@@ -53,7 +53,6 @@ INT16 gsTownSectorServerSkipY = -1;
|
||||
UINT8 gubTownSectorServerIndex = 0;
|
||||
BOOLEAN gfYesNoPromptIsForContinue = FALSE; // this flag remembers whether we're starting new training, or continuing
|
||||
INT32 giTotalCostOfTraining = 0;
|
||||
BOOLEAN gfAreWeTrainingMobile = FALSE;
|
||||
BOOLEAN gfAreWePromotingGreen = FALSE;
|
||||
BOOLEAN gfAreWePromotingRegular = FALSE;
|
||||
|
||||
@@ -88,10 +87,7 @@ BOOLEAN gfMilitiaAllowedInTown[MAX_TOWNS] =
|
||||
|
||||
// private prototypes
|
||||
void PayMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue );
|
||||
// HEADROCK HAM 3.6: Duplicate function for handling callback on Mobile Militia training
|
||||
void PayMobileMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue );
|
||||
void CantTrainMilitiaOkBoxCallback( UINT8 bExitValue );
|
||||
void CantTrainMobileMilitiaOkBoxCallback( UINT8 bExitValue );
|
||||
|
||||
void PayForTrainingInSector( UINT8 ubSector );
|
||||
|
||||
@@ -257,7 +253,7 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
|
||||
// HEADROCK HAM 3.6: Leadership may affect the resulting squad size.
|
||||
UINT8 ubTrainerEffectiveLeadership = FindBestMilitiaTrainingLeadershipInSector ( sMapX, sMapY, pTrainer->bSectorZ, TOWN_MILITIA );
|
||||
UINT8 iTrainingSquadSize = __min(iMaxMilitiaPerSector, CalcNumMilitiaTrained(ubTrainerEffectiveLeadership, FALSE));
|
||||
UINT8 iTrainingSquadSize = __min(iMaxMilitiaPerSector, CalcNumMilitiaTrained(ubTrainerEffectiveLeadership));
|
||||
UINT8 promotionstodo = 0;
|
||||
|
||||
// Flugente: our pool of volunteers limits how many militia can be created
|
||||
@@ -298,19 +294,7 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// If we're not training roaming militia,
|
||||
// then we will handle everything as normal.
|
||||
|
||||
// HEADROCK HAM 3.6: This is now VOLUNTARY.
|
||||
if( pTrainer->bAssignment == TRAIN_MOBILE )
|
||||
{
|
||||
CreateMilitiaSquads(sMapX, sMapY );
|
||||
|
||||
// the trainer announces to player that he's finished his assignment. Make his sector flash!
|
||||
AssignmentDone( pTrainer, TRUE, FALSE );
|
||||
|
||||
// handle completion of town by training group
|
||||
HandleCompletionOfTownTrainingByGroupWithTrainer( pTrainer, MOBILE_MILITIA );
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
// we either create new militia or promote existing ones if no space is left
|
||||
while ( ubMilitiaTrained + promotionstodo < iTrainingSquadSize )
|
||||
@@ -416,7 +400,7 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
}
|
||||
|
||||
// SANDRO - merc records (num militia trained)
|
||||
RecordNumMilitiaTrainedForMercs( sMapX, sMapY, pTrainer->bSectorZ, ubMilitiaTrained, FALSE );
|
||||
RecordNumMilitiaTrainedForMercs( sMapX, sMapY, pTrainer->bSectorZ, ubMilitiaTrained );
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.fMilitiaResources && !gGameExternalOptions.fMilitiaUseSectorInventory )
|
||||
@@ -440,7 +424,6 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
AddStrategicEvent( EVENT_MILITIAROSTER_EMAIL, GetWorldTotalMin( ) + 60 * (1 + Random( 4 )), 0 );
|
||||
}
|
||||
|
||||
|
||||
// feed this a SOLDIER_CLASS_, it will return you a _MITILIA rank, or -1 if the guy's not militia
|
||||
INT8 SoldierClassToMilitiaRank(UINT8 ubSoldierClass)
|
||||
{
|
||||
@@ -462,7 +445,6 @@ INT8 SoldierClassToMilitiaRank(UINT8 ubSoldierClass)
|
||||
return(bRank);
|
||||
}
|
||||
|
||||
|
||||
// feed this a _MITILIA rank, it will return you a SOLDIER_CLASS_, or -1 if the guy's not militia
|
||||
INT8 MilitiaRankToSoldierClass(UINT8 ubRank)
|
||||
{
|
||||
@@ -484,7 +466,6 @@ INT8 MilitiaRankToSoldierClass(UINT8 ubRank)
|
||||
return(bSoldierClass);
|
||||
}
|
||||
|
||||
|
||||
void StrategicAddMilitiaToSector(INT16 sMapX, INT16 sMapY, UINT8 ubRank, UINT8 ubHowMany)
|
||||
{
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
|
||||
@@ -500,7 +481,6 @@ void StrategicAddMilitiaToSector(INT16 sMapX, INT16 sMapY, UINT8 ubRank, UINT8 u
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void StrategicPromoteMilitiaInSector(INT16 sMapX, INT16 sMapY, UINT8 ubCurrentRank, UINT8 ubHowMany)
|
||||
{
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
|
||||
@@ -556,7 +536,6 @@ void StrategicPromoteMilitiaInSector(INT16 sMapX, INT16 sMapY, UINT8 ubCurrentRa
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void StrategicRemoveMilitiaFromSector(INT16 sMapX, INT16 sMapY, UINT8 ubRank, UINT8 ubHowMany)
|
||||
{
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
|
||||
@@ -631,7 +610,6 @@ void StrategicRemoveAllStaticMilitiaFromSector( INT16 sMapX, INT16 sMapY, UINT8
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// kill pts are (2 * kills) + assists
|
||||
UINT8 CheckOneMilitiaForPromotion(INT16 sMapX, INT16 sMapY, UINT8 ubCurrentRank, UINT8 ubRecentKillPts)
|
||||
{
|
||||
@@ -683,7 +661,6 @@ UINT8 CheckOneMilitiaForPromotion(INT16 sMapX, INT16 sMapY, UINT8 ubCurrentRank,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// call this if the player attacks his own militia
|
||||
void HandleMilitiaDefections(INT16 sMapX, INT16 sMapY)
|
||||
{
|
||||
@@ -723,7 +700,6 @@ void HandleMilitiaDefections(INT16 sMapX, INT16 sMapY)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UINT8 MilitiaInSectorOfRank(INT16 sMapX, INT16 sMapY, UINT8 ubRank)
|
||||
{
|
||||
return MilitiaInSectorOfRankStationary( sMapX, sMapY, ubRank ) + MilitiaInSectorOfRankInGroups( sMapX, sMapY, ubRank );
|
||||
@@ -851,7 +827,6 @@ BOOLEAN ServeNextFriendlySectorInTown( INT16 *sNeighbourX, INT16 *sNeighbourY )
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void HandleInterfaceMessageForCostOfTrainingMilitia( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 iMilitiaTrainingCost = gGameExternalOptions.iMilitiaTrainingCost;
|
||||
@@ -867,19 +842,14 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||
UINT8 ubMilitiaType = 0;
|
||||
if (pSoldier->bAssignment == TRAIN_TOWN)
|
||||
ubMilitiaType = TOWN_MILITIA;
|
||||
else if (pSoldier->bAssignment == TRAIN_MOBILE)
|
||||
ubMilitiaType = MOBILE_MILITIA;
|
||||
else
|
||||
return;
|
||||
|
||||
// grab total number of sectors
|
||||
iNumberOfSectors = GetNumberOfUnpaidTrainableSectors( ubMilitiaType );
|
||||
Assert( iNumberOfSectors > 0 );
|
||||
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// We want to charge more for Roaming
|
||||
|
||||
|
||||
// get total cost
|
||||
// HEADROCK HAM 3.6: Mobile and Garrison Militia now separate
|
||||
if (ubMilitiaType == TOWN_MILITIA) // Garrison
|
||||
{
|
||||
// If Regulars are maxed, and Elites are allowed, calculate cost to upgrade Regular->Elite
|
||||
@@ -903,14 +873,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||
giTotalCostOfTraining = iMilitiaTrainingCost * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
}
|
||||
gfAreWeTrainingMobile = FALSE;
|
||||
}
|
||||
// Mobile
|
||||
else
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iMilitiaCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWeTrainingMobile = TRUE;
|
||||
}
|
||||
|
||||
gfYesNoPromptIsForContinue = FALSE;
|
||||
@@ -923,66 +885,31 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||
swprintf( sString, pMilitiaConfirmStrings[ 8 ], giTotalCostOfTraining );
|
||||
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, pMilitiaConfirmStrings[ 11 ], giTotalCostOfTraining );
|
||||
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, CantTrainMobileMilitiaOkBoxCallback );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// ok to start training, ask player
|
||||
|
||||
|
||||
if( iNumberOfSectors > 1 )
|
||||
if ( ubMilitiaType == TOWN_MILITIA )
|
||||
{
|
||||
if (ubMilitiaType == TOWN_MILITIA)
|
||||
if ( iNumberOfSectors > 1 )
|
||||
{
|
||||
swprintf( sString, pMilitiaConfirmStrings[ 7 ], iNumberOfSectors, giTotalCostOfTraining, pMilitiaConfirmStrings[ 1 ] );
|
||||
swprintf( sString, pMilitiaConfirmStrings[7], iNumberOfSectors, giTotalCostOfTraining, pMilitiaConfirmStrings[1] );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, pMilitiaConfirmStrings[ 13 ], iNumberOfSectors, giTotalCostOfTraining, pMilitiaConfirmStrings[ 1 ] );
|
||||
swprintf( sString, L"%s%d. %s", pMilitiaConfirmStrings[0], giTotalCostOfTraining, pMilitiaConfirmStrings[1] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ubMilitiaType == TOWN_MILITIA)
|
||||
{
|
||||
swprintf( sString, L"%s%d. %s", pMilitiaConfirmStrings[ 0 ], giTotalCostOfTraining, pMilitiaConfirmStrings[ 1 ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sString, L"%s%d. %s", pMilitiaConfirmStrings[ 14 ], giTotalCostOfTraining, pMilitiaConfirmStrings[ 1 ] );
|
||||
}
|
||||
}
|
||||
|
||||
// if we are in mapscreen, make a pop up
|
||||
if( guiCurrentScreen == MAP_SCREEN )
|
||||
{
|
||||
// HEADROCK HAM 3.6: Separate callbacks for Mobile and Garrison militia
|
||||
if (ubMilitiaType == TOWN_MILITIA)
|
||||
// if we are in mapscreen, make a pop up
|
||||
if ( guiCurrentScreen == MAP_SCREEN )
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
|
||||
}
|
||||
else
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMobileMilitiaTrainingYesNoBoxCallback );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ubMilitiaType == TOWN_MILITIA)
|
||||
{
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, GAME_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback, &pCenteringRect );
|
||||
}
|
||||
else
|
||||
{
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, GAME_SCREEN, MSG_BOX_FLAG_YESNO, PayMobileMilitiaTrainingYesNoBoxCallback, &pCenteringRect );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoContinueMilitiaTrainingMessageBox( INT16 sSectorX, INT16 sSectorY, const STR16 str, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
@@ -1021,34 +948,16 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
{
|
||||
ubMilitiaType = TOWN_MILITIA;
|
||||
}
|
||||
else if (pSoldier->bAssignment == TRAIN_MOBILE )
|
||||
{
|
||||
ubMilitiaType = MOBILE_MILITIA;
|
||||
}
|
||||
|
||||
if (ubMilitiaType == TOWN_MILITIA)
|
||||
{
|
||||
Assert( SectorInfo[ SECTOR( sSectorX, sSectorY ) ].fMilitiaTrainingPaid == FALSE );
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
Assert( SectorInfo[ SECTOR( sSectorX, sSectorY ) ].fMobileMilitiaTrainingPaid == FALSE );
|
||||
}
|
||||
|
||||
pMilitiaTrainerSoldier = pSoldier;
|
||||
|
||||
gfYesNoPromptIsForContinue = TRUE;
|
||||
|
||||
//Moa: prevent continue training when at/above maximum
|
||||
if ( ubMilitiaType == MOBILE_MILITIA )
|
||||
{
|
||||
if ( 100 <= GetMobileMilitiaQuota( TRUE ) )
|
||||
{
|
||||
MilitiaTrainingRejected( MOBILE_MILITIA );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// is there enough loyalty to continue training
|
||||
if( DoesSectorMercIsInHaveSufficientLoyaltyToTrainMilitia( pSoldier ) == FALSE )
|
||||
{
|
||||
@@ -1058,10 +967,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
{
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMobileMilitiaOkBoxCallback );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1084,132 +989,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
|
||||
return;
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
// Test to see if not enough Town Militia
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR(pSoldier->sSectorX, pSoldier->sSectorY) ] );
|
||||
BOOLEAN fUnfullSectorFound = FALSE;
|
||||
|
||||
// Test to see if not enough Town Militia
|
||||
// HEADROCK HAM 4: No need for this check anymore. Militia can now be trained separately thanks to being
|
||||
// able to keep them out of cities.
|
||||
/*
|
||||
|
||||
if ( CountMilitia( pSectorInfo ) < gGameExternalOptions.iMaxMilitiaPerSector )
|
||||
{
|
||||
fUnfullSectorFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCounter = 0;
|
||||
while( pTownNamesList[ iCounter ] != 0 )
|
||||
{
|
||||
// Are we in this city?
|
||||
if( pTownNamesList[ iCounter] == bTownId )
|
||||
{
|
||||
INT16 sCurrentX = GET_X_FROM_STRATEGIC_INDEX( pTownLocationsList[ iCounter ] );
|
||||
INT16 sCurrentY = GET_Y_FROM_STRATEGIC_INDEX( pTownLocationsList[ iCounter ] );
|
||||
|
||||
pSectorInfo = &( SectorInfo[ SECTOR(sCurrentX, sCurrentY) ] );
|
||||
// if sector has enemies or hasn't already been taken at least once, then
|
||||
if ( !SectorInfo[ SECTOR(sCurrentX, sCurrentY) ].fSurfaceWasEverPlayerControlled ||
|
||||
NumNonPlayerTeamMembersInSector( sCurrentX, sCurrentY, ENEMY_TEAM ) > 0 )
|
||||
{
|
||||
// skip the rest. This sector cannot generate militia anyway.
|
||||
iCounter++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CountMilitia(pSectorInfo) < gGameExternalOptions.iMaxMilitiaPerSector )
|
||||
{
|
||||
// Found a controlled city sector that does not yet have a full garrison
|
||||
fUnfullSectorFound;
|
||||
}
|
||||
}
|
||||
}
|
||||
iCounter++;
|
||||
}
|
||||
}
|
||||
if (fUnfullSectorFound)
|
||||
{
|
||||
// At least one city sector is controlled but not full of garrison militia. Can't train mobiles!
|
||||
swprintf(sString, New113HAMMessage[9], gGameExternalOptions.iMaxMilitiaPerSector, pTownNames[bTownId]);
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMobileMilitiaOkBoxCallback );
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////
|
||||
// Capacity check in nearby sectors
|
||||
UINT16 pMoveDir[4][3];
|
||||
UINT8 uiDirNumber = 0;
|
||||
BOOLEAN fFoundValidSector = FALSE;
|
||||
|
||||
|
||||
INT8 bTownId = GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY );
|
||||
GenerateDirectionInfosForTraining( pSoldier->sSectorX, pSoldier->sSectorY, &uiDirNumber, pMoveDir );
|
||||
// Found at least one suitable place to put Mobiles?
|
||||
if (uiDirNumber)
|
||||
{
|
||||
fFoundValidSector = TRUE;
|
||||
}
|
||||
// Try entire city.
|
||||
else
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
|
||||
// Go through each city in the game
|
||||
while( pTownNamesList[ iCounter ] != 0 )
|
||||
{
|
||||
// Are we in this city?
|
||||
if( pTownNamesList[ iCounter] == bTownId )
|
||||
{
|
||||
INT16 sCurrentX = GET_X_FROM_STRATEGIC_INDEX( pTownLocationsList[ iCounter ] );
|
||||
INT16 sCurrentY = GET_Y_FROM_STRATEGIC_INDEX( pTownLocationsList[ iCounter ] );
|
||||
|
||||
// if sector has enemies or hasn't already been taken at least once, then
|
||||
if ( !SectorInfo[ SECTOR(sCurrentX, sCurrentY) ].fSurfaceWasEverPlayerControlled ||
|
||||
NumNonPlayerTeamMembersInSector( sCurrentX, sCurrentY, ENEMY_TEAM ) > 0 )
|
||||
{
|
||||
// skip the rest. This sector cannot generate militia anyway.
|
||||
iCounter++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find out if any adjacent sectors have room in them.
|
||||
GenerateDirectionInfosForTraining( sCurrentX, sCurrentY, &uiDirNumber, pMoveDir );
|
||||
|
||||
if(uiDirNumber)
|
||||
{
|
||||
fFoundValidSector = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
iCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
// Couldn't find at least one sector to place Mobiles. Report "No room!"
|
||||
if (!fFoundValidSector)
|
||||
{
|
||||
swprintf( sString, New113HAMMessage[ 8 ], pTownNames[ bTownId ], iMinLoyaltyToTrain );
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMobileMilitiaOkBoxCallback );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Charging more to train Roaming Militia
|
||||
// Also Charging more for promotions over Training
|
||||
|
||||
if( ubMilitiaType == MOBILE_MILITIA )
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iMilitiaCostModifier);
|
||||
gfAreWeTrainingMobile = TRUE;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, REGULAR_MILITIA )
|
||||
&& (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
@@ -1227,7 +1007,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost);
|
||||
}
|
||||
gfAreWeTrainingMobile = FALSE;
|
||||
}
|
||||
|
||||
// can player afford to continue training?
|
||||
@@ -1239,10 +1018,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
{
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMobileMilitiaOkBoxCallback );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1253,10 +1028,6 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
{
|
||||
swprintf( sString, pMilitiaConfirmStrings[ 3 ], sStringB, pMilitiaConfirmStrings[ 4 ], giTotalCostOfTraining );
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
swprintf( sString, pMilitiaConfirmStrings[ 12 ], sStringB, pMilitiaConfirmStrings[ 4 ], giTotalCostOfTraining );
|
||||
}
|
||||
|
||||
// ask player whether he'd like to continue training
|
||||
//DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
|
||||
@@ -1264,14 +1035,8 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMilitiaTrainingYesNoBoxCallback );
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_YESNO, PayMobileMilitiaTrainingYesNoBoxCallback );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// IMPORTANT: This same callback is used both for initial training and for continue training prompt
|
||||
// use 'gfYesNoPromptIsForContinue' flag to tell them apart
|
||||
void PayMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue )
|
||||
@@ -1317,22 +1082,12 @@ void PayMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue )
|
||||
|
||||
MilitiaTrainingRejected( TOWN_MILITIA );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CantTrainMilitiaOkBoxCallback( UINT8 bExitValue )
|
||||
{
|
||||
MilitiaTrainingRejected( TOWN_MILITIA );
|
||||
return;
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: Duplicate of the above, for Mobile Militia purposes.
|
||||
void CantTrainMobileMilitiaOkBoxCallback( UINT8 bExitValue )
|
||||
{
|
||||
MilitiaTrainingRejected( MOBILE_MILITIA );
|
||||
return;
|
||||
}
|
||||
|
||||
// IMPORTANT: This same callback is used both for initial training and for continue training prompt
|
||||
@@ -1360,8 +1115,6 @@ void MilitiaTrainingRejected( UINT8 ubMilitiaType )
|
||||
pMilitiaTrainerSoldier = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HandleMilitiaStatusInCurrentMapBeforeLoadingNewMap( void )
|
||||
{
|
||||
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bSide != 0 )
|
||||
@@ -1376,7 +1129,6 @@ void HandleMilitiaStatusInCurrentMapBeforeLoadingNewMap( void )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN CanSomeoneNearbyScoutThisSector( INT16 sSectorX, INT16 sSectorY, BOOLEAN fScoutTraitCheck ) // added argument - SANDRO
|
||||
{
|
||||
INT16 sSectorValue = 0, sSector = 0;
|
||||
@@ -1788,16 +1540,6 @@ void BuildListOfUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CanCharacterTrainMobileMilitia( pSoldier ) == TRUE )
|
||||
{
|
||||
if (SectorInfo[ SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) ].fMobileMilitiaTrainingPaid == FALSE)
|
||||
{
|
||||
gsUnpaidStrategicSector[ iCounter ] = CALCULATE_STRATEGIC_INDEX( pSoldier->sSectorX, pSoldier->sSectorY );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1818,16 +1560,6 @@ void BuildListOfUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CanCharacterTrainMobileMilitia( pSoldier ) == TRUE )
|
||||
{
|
||||
if (SectorInfo[ SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) ].fMobileMilitiaTrainingPaid == FALSE )
|
||||
{
|
||||
gsUnpaidStrategicSector[ iCounter ] = CALCULATE_STRATEGIC_INDEX( pSoldier->sSectorX, pSoldier->sSectorY );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now clean out repeated sectors
|
||||
@@ -1869,7 +1601,6 @@ INT32 GetNumberOfUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
||||
|
||||
}
|
||||
|
||||
|
||||
void StartTrainingInAllUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
@@ -1879,10 +1610,6 @@ void StartTrainingInAllUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
||||
{
|
||||
SetAssignmentForList( TRAIN_TOWN, 0 );
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
SetAssignmentForList( TRAIN_MOBILE, 0 );
|
||||
}
|
||||
|
||||
BuildListOfUnpaidTrainableSectors( ubMilitiaType );
|
||||
|
||||
@@ -1898,7 +1625,6 @@ void StartTrainingInAllUnpaidTrainableSectors( UINT8 ubMilitiaType )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ContinueTrainingInThisSector( UINT8 ubMilitiaType )
|
||||
{
|
||||
UINT8 ubSector;
|
||||
@@ -1920,20 +1646,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia6");
|
||||
UINT8 ubMilitiaType = 0;
|
||||
|
||||
// spend the money
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Charging more to train Roaming Militia
|
||||
// Or for promotions.
|
||||
|
||||
if ( gfAreWeTrainingMobile)
|
||||
{
|
||||
Assert( SectorInfo[ ubSector ].fMobileMilitiaTrainingPaid == FALSE );
|
||||
// Mark sector as being paid up
|
||||
SectorInfo[ ubSector ].fMobileMilitiaTrainingPaid = TRUE;
|
||||
CostMultiplyer = gGameExternalOptions.iMilitiaCostModifier;
|
||||
gfAreWeTrainingMobile = FALSE;
|
||||
ubMilitiaType = MOBILE_MILITIA;
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
Assert( SectorInfo[ ubSector ].fMilitiaTrainingPaid == FALSE );
|
||||
if ( gfAreWePromotingGreen)
|
||||
@@ -1961,14 +1674,11 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia6");
|
||||
ResetDoneFlagForAllMilitiaTrainersInSector( ubSector, ubMilitiaType );
|
||||
}
|
||||
|
||||
|
||||
void ResetDoneFlagForAllMilitiaTrainersInSector( UINT8 ubSector, UINT8 ubMilitiaType )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
|
||||
|
||||
for( iCounter = 0; iCounter <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; iCounter++ )
|
||||
|
||||
for( INT32 iCounter = 0; iCounter <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++iCounter )
|
||||
{
|
||||
pSoldier = &Menptr[ iCounter ];
|
||||
|
||||
@@ -1985,22 +1695,10 @@ void ResetDoneFlagForAllMilitiaTrainersInSector( UINT8 ubSector, UINT8 ubMilitia
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubMilitiaType == MOBILE_MILITIA)
|
||||
{
|
||||
if( pSoldier->bAssignment == TRAIN_MOBILE )
|
||||
{
|
||||
if( ( SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) == ubSector ) && ( pSoldier->bSectorZ == 0 ) )
|
||||
{
|
||||
pSoldier->flags.fDoneAssignmentAndNothingToDoFlag = FALSE;
|
||||
pSoldier->usQuoteSaidExtFlags &= ~SOLDIER_QUOTE_SAID_DONE_ASSIGNMENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN MilitiaTrainingAllowedInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
||||
{
|
||||
INT8 bTownId;
|
||||
@@ -2101,23 +1799,21 @@ void BuildMilitiaPromotionsString( STR16 str )
|
||||
gbRegToElitePromotions = 0;
|
||||
gbMilitiaPromotions = 0;
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.3: This function finds the best Militia Trainer in the target sector. It may also take into account
|
||||
// mercs' TEACHING skill, if told to. The function returns the calculated "Effective Leadership" of the selected
|
||||
// trainer.
|
||||
UINT8 FindBestMilitiaTrainingLeadershipInSector ( INT16 sMapX, INT16 sMapY, INT8 bMapZ, UINT8 ubMilitiaType )
|
||||
{
|
||||
|
||||
UINT16 cnt = 0;
|
||||
SOLDIERTYPE * pCheckedTrainer;
|
||||
UINT16 usTrainerEffectiveLeadership = 0;
|
||||
UINT8 ubBestLeadership = 0;
|
||||
|
||||
// HEADROCK HAM 3.3: Add search for best trainer in sector
|
||||
for ( pCheckedTrainer = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pCheckedTrainer++)
|
||||
for ( pCheckedTrainer = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; ++cnt, ++pCheckedTrainer )
|
||||
{
|
||||
if (pCheckedTrainer->bActive && pCheckedTrainer->stats.bLife >= OKLIFE &&
|
||||
((ubMilitiaType == TOWN_MILITIA && pCheckedTrainer->bAssignment == TRAIN_TOWN) ||
|
||||
(ubMilitiaType == MOBILE_MILITIA && pCheckedTrainer->bAssignment == TRAIN_MOBILE) ) )
|
||||
if (pCheckedTrainer->bActive && pCheckedTrainer->stats.bLife >= OKLIFE && (ubMilitiaType == TOWN_MILITIA && pCheckedTrainer->bAssignment == TRAIN_TOWN) )
|
||||
{
|
||||
if (pCheckedTrainer->sSectorX == sMapX && pCheckedTrainer->sSectorY == sMapY && pCheckedTrainer->bSectorZ == bMapZ )
|
||||
{
|
||||
@@ -2157,9 +1853,8 @@ UINT8 FindBestMilitiaTrainingLeadershipInSector ( INT16 sMapX, INT16 sMapY, INT8
|
||||
|
||||
// HEADROCK HAM 3.6: Created a new function to make things easier. This calculates the target number of militia to
|
||||
// be created.
|
||||
UINT8 CalcNumMilitiaTrained(UINT8 ubBestLeadership, BOOLEAN fMobile)
|
||||
UINT8 CalcNumMilitiaTrained(UINT8 ubBestLeadership)
|
||||
{
|
||||
|
||||
UINT8 ubReqLeadershipForFull = 1;
|
||||
UINT8 ubMinLeadershipForTraining = 0;
|
||||
UINT8 ubLeadershipRange = 0;
|
||||
@@ -2167,132 +1862,43 @@ UINT8 CalcNumMilitiaTrained(UINT8 ubBestLeadership, BOOLEAN fMobile)
|
||||
// Result value
|
||||
UINT8 ubMilitiaToTrain = 0;
|
||||
|
||||
|
||||
// Garrison Training
|
||||
if (!fMobile)
|
||||
|
||||
// Default Squad Size for Garrisons, read from INI.
|
||||
ubMilitiaToTrain = gGameExternalOptions.iTrainingSquadSize;
|
||||
|
||||
// Is affected by Leadership?
|
||||
if (gGameExternalOptions.fLeadershipAffectsMilitiaQuantity &&
|
||||
gGameExternalOptions.ubReqLeadershipForFullTraining > gGameExternalOptions.ubMinimumLeadershipToTrainMilitia)
|
||||
{
|
||||
// Default Squad Size for Garrisons, read from INI.
|
||||
ubMilitiaToTrain = gGameExternalOptions.iTrainingSquadSize;
|
||||
// Set these variables to their INI values.
|
||||
ubReqLeadershipForFull = gGameExternalOptions.ubReqLeadershipForFullTraining;
|
||||
ubMinLeadershipForTraining = gGameExternalOptions.ubMinimumLeadershipToTrainMilitia;
|
||||
|
||||
// Is affected by Leadership?
|
||||
if (gGameExternalOptions.fLeadershipAffectsMilitiaQuantity &&
|
||||
gGameExternalOptions.ubReqLeadershipForFullTraining > gGameExternalOptions.ubMinimumLeadershipToTrainMilitia)
|
||||
{
|
||||
// Set these variables to their INI values.
|
||||
ubReqLeadershipForFull = gGameExternalOptions.ubReqLeadershipForFullTraining;
|
||||
ubMinLeadershipForTraining = gGameExternalOptions.ubMinimumLeadershipToTrainMilitia;
|
||||
|
||||
// We make sure our effective leadership isn't above or below the limits. If so, reset to limits.
|
||||
// If there is a minimum required to train militia, we're ASSUMING that the character has enough leadership
|
||||
// otherwise they wouldn't even be here. But just in case he's skipped the check somehow, this will raise
|
||||
// leadership to the minimum to avoid problems.
|
||||
ubBestLeadership = __max(ubBestLeadership, ubMinLeadershipForTraining);
|
||||
ubBestLeadership = __min(ubBestLeadership, ubReqLeadershipForFull);
|
||||
// We make sure our effective leadership isn't above or below the limits. If so, reset to limits.
|
||||
// If there is a minimum required to train militia, we're ASSUMING that the character has enough leadership
|
||||
// otherwise they wouldn't even be here. But just in case he's skipped the check somehow, this will raise
|
||||
// leadership to the minimum to avoid problems.
|
||||
ubBestLeadership = __max(ubBestLeadership, ubMinLeadershipForTraining);
|
||||
ubBestLeadership = __min(ubBestLeadership, ubReqLeadershipForFull);
|
||||
|
||||
// Find out by how much we've beaten the skill check
|
||||
ubBestLeadership = ubBestLeadership - ubMinLeadershipForTraining;
|
||||
// Find out by how much we've beaten the skill check
|
||||
ubBestLeadership = ubBestLeadership - ubMinLeadershipForTraining;
|
||||
|
||||
// Find the range between the minimum and maximum.
|
||||
ubLeadershipRange = ubReqLeadershipForFull - ubMinLeadershipForTraining;
|
||||
// Find the range between the minimum and maximum.
|
||||
ubLeadershipRange = ubReqLeadershipForFull - ubMinLeadershipForTraining;
|
||||
|
||||
// Squad Size is determined by the relative value of the leadership within the range. Anyone meeting or
|
||||
// exceeding the range (latter shouldn't happen) will train a full squad. Others will train less. If
|
||||
// leadership was the minimum required, only 1 militia is trained.
|
||||
ubMilitiaToTrain = ((ubBestLeadership * ubMilitiaToTrain) / ubLeadershipRange) + 1;
|
||||
ubMilitiaToTrain = __min(ubMilitiaToTrain, gGameExternalOptions.iTrainingSquadSize);
|
||||
ubMilitiaToTrain = __max(1, ubMilitiaToTrain);
|
||||
}
|
||||
}
|
||||
|
||||
// Mobile Militia
|
||||
else
|
||||
{
|
||||
// Default Squad Size for Mobiles, read from INI.
|
||||
ubMilitiaToTrain = gGameExternalOptions.guiNumMobileMilitiaTrained;
|
||||
|
||||
// Is affected by Leadership?
|
||||
if (gGameExternalOptions.fLeadershipAffectsMobileMilitiaQuantity &&
|
||||
gGameExternalOptions.ubReqLeadershipForFullMobileTraining > gGameExternalOptions.ubMinimumLeadershipToTrainMobileMilitia )
|
||||
{
|
||||
|
||||
// Set these variables to their INI values.
|
||||
ubReqLeadershipForFull = gGameExternalOptions.ubReqLeadershipForFullMobileTraining;
|
||||
ubMinLeadershipForTraining = gGameExternalOptions.ubMinimumLeadershipToTrainMobileMilitia;
|
||||
|
||||
// We make sure our effective leadership isn't above or below the limits. If so, reset to limits.
|
||||
// If there is a minimum required to train militia, we're ASSUMING that the character has enough leadership
|
||||
// otherwise they wouldn't even be here. But just in case he's skipped the check somehow, this will raise
|
||||
// leadership to the minimum to avoid problems.
|
||||
ubBestLeadership = __max(ubBestLeadership, ubMinLeadershipForTraining);
|
||||
ubBestLeadership = __min(ubBestLeadership, ubReqLeadershipForFull);
|
||||
|
||||
// Find out by how much we've beaten the skill check
|
||||
ubBestLeadership = ubBestLeadership - ubMinLeadershipForTraining;
|
||||
|
||||
// Find the range between the minimum and maximum.
|
||||
ubLeadershipRange = ubReqLeadershipForFull - ubMinLeadershipForTraining;
|
||||
|
||||
// Squad Size is determined by the relative value of the leadership within the range. Anyone meeting or
|
||||
// exceeding the range (latter shouldn't happen) will train a full squad. Others will train less. If
|
||||
// leadership was the minimum required, only 3 militia are trained.
|
||||
ubMilitiaToTrain = ((ubBestLeadership * ubMilitiaToTrain) / ubLeadershipRange) + 1;
|
||||
ubMilitiaToTrain = __min(ubMilitiaToTrain, gGameExternalOptions.guiNumMobileMilitiaTrained);
|
||||
ubMilitiaToTrain = __max(3, ubMilitiaToTrain);
|
||||
}
|
||||
// Squad Size is determined by the relative value of the leadership within the range. Anyone meeting or
|
||||
// exceeding the range (latter shouldn't happen) will train a full squad. Others will train less. If
|
||||
// leadership was the minimum required, only 1 militia is trained.
|
||||
ubMilitiaToTrain = ((ubBestLeadership * ubMilitiaToTrain) / ubLeadershipRange) + 1;
|
||||
ubMilitiaToTrain = __min(ubMilitiaToTrain, gGameExternalOptions.iTrainingSquadSize);
|
||||
ubMilitiaToTrain = __max(1, ubMilitiaToTrain);
|
||||
}
|
||||
|
||||
return (ubMilitiaToTrain);
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: Duplicate function for handling callback on Mobile Militia training
|
||||
void PayMobileMilitiaTrainingYesNoBoxCallback( UINT8 bExitValue )
|
||||
{
|
||||
CHAR16 sString[ 128 ];
|
||||
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
|
||||
// yes
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
// does the player have enough
|
||||
if( LaptopSaveInfo.iCurrentBalance >= giTotalCostOfTraining )
|
||||
{
|
||||
if( gfYesNoPromptIsForContinue )
|
||||
{
|
||||
ContinueTrainingInThisSector( MOBILE_MILITIA );
|
||||
}
|
||||
else
|
||||
{
|
||||
StartTrainingInAllUnpaidTrainableSectors( MOBILE_MILITIA );
|
||||
}
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
// put this BEFORE training gets handled to avoid detecting an error everytime a sector completes training
|
||||
// Checks Town and Mobile militia
|
||||
VerifyTownTrainingIsPaidFor();
|
||||
#endif
|
||||
|
||||
// this completes the training prompt sequence
|
||||
pMilitiaTrainerSoldier = NULL;
|
||||
}
|
||||
else // can't afford it
|
||||
{
|
||||
StopTimeCompression();
|
||||
|
||||
swprintf( sString, L"%s", pMilitiaConfirmStrings[ 2 ] );
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_OK, CantTrainMobileMilitiaOkBoxCallback );
|
||||
}
|
||||
}
|
||||
else if( bExitValue == MSG_BOX_RETURN_NO )
|
||||
{
|
||||
StopTimeCompression();
|
||||
|
||||
MilitiaTrainingRejected( MOBILE_MILITIA );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: Daily check for upkeep of all militia
|
||||
void HandleMilitiaUpkeepPayment( void )
|
||||
{
|
||||
@@ -2329,26 +1935,9 @@ void HandleMilitiaUpkeepPayment( void )
|
||||
|
||||
MilitiaList[cnt].ubSectorId = (UINT8)cnt;
|
||||
|
||||
UINT8 ubTownId = GetTownIdForSector( sMapX, sMapY );
|
||||
if ((ubTownId != BLANK_SECTOR && MilitiaTrainingAllowedInTown(ubTownId)) || // Major Town
|
||||
IsThisSectorASAMSector( sMapX, sMapY, 0 ) ) // SAM Site
|
||||
{
|
||||
MilitiaList[cnt].ubNumTownGreens = MilitiaInSectorOfRank( sMapX, sMapY, GREEN_MILITIA );
|
||||
MilitiaList[cnt].ubNumTownRegulars = MilitiaInSectorOfRank( sMapX, sMapY, REGULAR_MILITIA );
|
||||
MilitiaList[cnt].ubNumTownElites = MilitiaInSectorOfRank( sMapX, sMapY, ELITE_MILITIA );
|
||||
MilitiaList[cnt].ubNumMobileGreens = 0;
|
||||
MilitiaList[cnt].ubNumMobileRegulars = 0;
|
||||
MilitiaList[cnt].ubNumMobileElites = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MilitiaList[cnt].ubNumMobileGreens = MilitiaInSectorOfRank( sMapX, sMapY, GREEN_MILITIA );
|
||||
MilitiaList[cnt].ubNumMobileRegulars = MilitiaInSectorOfRank( sMapX, sMapY, REGULAR_MILITIA );
|
||||
MilitiaList[cnt].ubNumMobileElites = MilitiaInSectorOfRank( sMapX, sMapY, ELITE_MILITIA );
|
||||
MilitiaList[cnt].ubNumTownGreens = 0;
|
||||
MilitiaList[cnt].ubNumTownRegulars = 0;
|
||||
MilitiaList[cnt].ubNumTownElites = 0;
|
||||
}
|
||||
MilitiaList[cnt].ubNumTownGreens = MilitiaInSectorOfRank( sMapX, sMapY, GREEN_MILITIA );
|
||||
MilitiaList[cnt].ubNumTownRegulars = MilitiaInSectorOfRank( sMapX, sMapY, REGULAR_MILITIA );
|
||||
MilitiaList[cnt].ubNumTownElites = MilitiaInSectorOfRank( sMapX, sMapY, ELITE_MILITIA );
|
||||
}
|
||||
|
||||
// Resort list so that sectors with more militia are at the top of the array. Higher weight
|
||||
@@ -2359,10 +1948,7 @@ void HandleMilitiaUpkeepPayment( void )
|
||||
{
|
||||
if (MilitiaList[0].ubNumTownGreens +
|
||||
MilitiaList[0].ubNumTownRegulars +
|
||||
MilitiaList[0].ubNumTownElites +
|
||||
MilitiaList[0].ubNumMobileGreens +
|
||||
MilitiaList[0].ubNumMobileRegulars +
|
||||
MilitiaList[0].ubNumMobileElites == 0)
|
||||
MilitiaList[0].ubNumTownElites == 0)
|
||||
{
|
||||
//All sectors are empty? Default to 0 payment.
|
||||
uiMoneyUnpaid = 0;
|
||||
@@ -2371,42 +1957,7 @@ void HandleMilitiaUpkeepPayment( void )
|
||||
INT16 sX = SECTORX( MilitiaList[0].ubSectorId );
|
||||
INT16 sY = SECTORY( MilitiaList[0].ubSectorId );
|
||||
|
||||
if (MilitiaList[0].ubNumMobileElites > 0)
|
||||
{
|
||||
// Remove one militia from sector
|
||||
StrategicRemoveMilitiaFromSector( sX, sY, ELITE_MILITIA, 1 );
|
||||
// Adjust list entry
|
||||
MilitiaList[0].ubNumMobileElites--;
|
||||
// Reduce debt appropriately
|
||||
uiMoneyUnpaid -= gGameExternalOptions.usDailyCostMobile[ELITE_MILITIA];
|
||||
// Increase tally of militia removed
|
||||
++uiNumMilitiaDisbanded;
|
||||
++usElitesDisbanded;
|
||||
|
||||
// Flugente: individual militia profiles need to be adjusted
|
||||
DisbandIndividualMilitia( MilitiaList[0].ubSectorId, 0, 0, 1 );
|
||||
}
|
||||
else if (MilitiaList[0].ubNumMobileRegulars > 0)
|
||||
{
|
||||
StrategicRemoveMilitiaFromSector( sX, sY, REGULAR_MILITIA, 1 );
|
||||
MilitiaList[0].ubNumMobileRegulars--;
|
||||
uiMoneyUnpaid -= gGameExternalOptions.usDailyCostMobile[REGULAR_MILITIA];
|
||||
++uiNumMilitiaDisbanded;
|
||||
++usRegularsDisbanded;
|
||||
|
||||
DisbandIndividualMilitia( MilitiaList[0].ubSectorId, 0, 1, 0 );
|
||||
}
|
||||
else if (MilitiaList[0].ubNumMobileGreens > 0)
|
||||
{
|
||||
StrategicRemoveMilitiaFromSector( sX, sY, GREEN_MILITIA, 1 );
|
||||
MilitiaList[0].ubNumMobileGreens--;
|
||||
uiMoneyUnpaid -= gGameExternalOptions.usDailyCostMobile[GREEN_MILITIA];
|
||||
++uiNumMilitiaDisbanded;
|
||||
++usGreenDisbanded;
|
||||
|
||||
DisbandIndividualMilitia( MilitiaList[0].ubSectorId, 1, 0, 0 );
|
||||
}
|
||||
else if (MilitiaList[0].ubNumTownElites > 0)
|
||||
if (MilitiaList[0].ubNumTownElites > 0)
|
||||
{
|
||||
StrategicRemoveMilitiaFromSector( sX, sY, ELITE_MILITIA, 1 );
|
||||
MilitiaList[0].ubNumTownElites--;
|
||||
@@ -2464,19 +2015,7 @@ void HandleMilitiaUpkeepPayment( void )
|
||||
|
||||
int MilitiaListQsortCompare(const void *pArg1, const void *pArg2)
|
||||
{
|
||||
if (((MILITIA_LIST_TYPE *)pArg1)->ubNumMobileElites > ((MILITIA_LIST_TYPE *)pArg2)->ubNumMobileElites)
|
||||
{
|
||||
return(-1);
|
||||
}
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumMobileRegulars > ((MILITIA_LIST_TYPE *)pArg2)->ubNumMobileRegulars)
|
||||
{
|
||||
return(-1);
|
||||
}
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumMobileGreens > ((MILITIA_LIST_TYPE *)pArg2)->ubNumMobileGreens)
|
||||
{
|
||||
return(-1);
|
||||
}
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumTownElites > ((MILITIA_LIST_TYPE *)pArg2)->ubNumTownElites)
|
||||
if (((MILITIA_LIST_TYPE *)pArg1)->ubNumTownElites > ((MILITIA_LIST_TYPE *)pArg2)->ubNumTownElites)
|
||||
{
|
||||
return(-1);
|
||||
}
|
||||
@@ -2501,19 +2040,7 @@ int MilitiaListQsortCompare(const void *pArg1, const void *pArg2)
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumTownElites < ((MILITIA_LIST_TYPE *)pArg2)->ubNumTownElites)
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumMobileGreens < ((MILITIA_LIST_TYPE *)pArg2)->ubNumMobileGreens)
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumMobileRegulars < ((MILITIA_LIST_TYPE *)pArg2)->ubNumMobileRegulars)
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
else if (((MILITIA_LIST_TYPE *)pArg1)->ubNumMobileElites < ((MILITIA_LIST_TYPE *)pArg2)->ubNumMobileElites)
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return(0);
|
||||
@@ -2527,7 +2054,6 @@ UINT32 CalcMilitiaUpkeep( void )
|
||||
UINT32 uiTotalPayment = 0;
|
||||
|
||||
UINT32 militia_static[MAX_MILITIA_LEVELS] = {0, 0, 0};
|
||||
UINT32 militia_mobile[MAX_MILITIA_LEVELS] = {0, 0, 0};
|
||||
UINT32 militia_individual[MAX_MILITIA_LEVELS] = {0, 0, 0};
|
||||
|
||||
for (UINT16 cnt = 0; cnt < 256; ++cnt)
|
||||
@@ -2536,18 +2062,8 @@ UINT32 CalcMilitiaUpkeep( void )
|
||||
UINT8 sMapX = SECTORX(cnt);
|
||||
UINT8 sMapY = SECTORY(cnt);
|
||||
|
||||
UINT8 ubTownId = GetTownIdForSector( sMapX, sMapY );
|
||||
if ((ubTownId != BLANK_SECTOR && MilitiaTrainingAllowedInTown(ubTownId)) || // Major Town
|
||||
IsThisSectorASAMSector( sMapX, sMapY, 0 ) ) // SAM Site
|
||||
{
|
||||
for ( int i = GREEN_MILITIA; i < MAX_MILITIA_LEVELS; ++i )
|
||||
militia_static[i] += MilitiaInSectorOfRank( sMapX, sMapY, i );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( int i = GREEN_MILITIA; i < MAX_MILITIA_LEVELS; ++i )
|
||||
militia_mobile[i] += MilitiaInSectorOfRank( sMapX, sMapY, i );
|
||||
}
|
||||
for ( int i = GREEN_MILITIA; i < MAX_MILITIA_LEVELS; ++i )
|
||||
militia_static[i] += MilitiaInSectorOfRank( sMapX, sMapY, i );
|
||||
}
|
||||
|
||||
// Flugente: if indivídual militia is on, calculate costs there and use the above as a fallback option
|
||||
@@ -2558,14 +2074,9 @@ UINT32 CalcMilitiaUpkeep( void )
|
||||
|
||||
for ( int i = GREEN_MILITIA; i < MAX_MILITIA_LEVELS; ++i )
|
||||
{
|
||||
if ( militia_static[i] + militia_mobile[i] > militia_individual[i] )
|
||||
if ( militia_static[i] > militia_individual[i] )
|
||||
{
|
||||
UINT32 exceed = militia_static[i] + militia_mobile[i] - militia_individual[i];
|
||||
UINT32 exceed_mobile = min( exceed, militia_mobile[i] );
|
||||
UINT32 exced_static = exceed - exceed_mobile;
|
||||
|
||||
uiTotalPayment += exced_static * gGameExternalOptions.usDailyCostTown[i];
|
||||
uiTotalPayment += exceed_mobile * gGameExternalOptions.usDailyCostMobile[i];
|
||||
uiTotalPayment += ( militia_static[i] + -militia_individual[i] ) * gGameExternalOptions.usDailyCostTown[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "Types.h"
|
||||
#include "Soldier Control.h"
|
||||
|
||||
|
||||
// how many militia of all ranks can be in any one sector at once
|
||||
//#define MAX_ALLOWABLE_MILITIA_PER_SECTOR 20
|
||||
|
||||
@@ -19,7 +18,6 @@
|
||||
// minimum loyalty rating before training is allowed in a town
|
||||
//#define MIN_RATING_TO_TRAIN_TOWN 20
|
||||
|
||||
|
||||
// handle promoting a militia during militia training. return TRUE if militia could be promoted
|
||||
BOOLEAN TownMilitiaTrainingPromotion( INT16 sMapX, INT16 sMapY, UINT8& arusPromotedTo );
|
||||
|
||||
@@ -75,7 +73,6 @@ BOOLEAN IsTownFullMilitia( INT8 bTownId, INT8 iMilitiaType );
|
||||
// is the SAM site full of militia?
|
||||
BOOLEAN IsSAMSiteFullOfMilitia( INT16 sSectorX, INT16 sSectorY, INT8 iMilitiaType );
|
||||
|
||||
|
||||
// now that town training is complete, handle the continue boxes
|
||||
void HandleContinueOfTownTraining( void );
|
||||
|
||||
@@ -90,7 +87,7 @@ BOOLEAN MilitiaTrainingAllowedInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSe
|
||||
BOOLEAN MilitiaTrainingAllowedInTown( INT8 bTownId );
|
||||
|
||||
// HEADROCK HAM 3.6: Function to calculate Militia and Mobile Militia training squad size.
|
||||
UINT8 CalcNumMilitiaTrained(UINT8 ubBestLeadership, BOOLEAN fMobile);
|
||||
UINT8 CalcNumMilitiaTrained(UINT8 ubBestLeadership);
|
||||
|
||||
// HEADROCK HAM 3.6: Total upkeep costs for YESTERDAY at midnight. Saved to savegames.
|
||||
extern UINT32 guiTotalUpkeepForMilitia;
|
||||
@@ -105,9 +102,6 @@ typedef struct MILITIA_LIST_TYPE
|
||||
UINT8 ubNumTownGreens;
|
||||
UINT8 ubNumTownRegulars;
|
||||
UINT8 ubNumTownElites;
|
||||
UINT8 ubNumMobileGreens;
|
||||
UINT8 ubNumMobileRegulars;
|
||||
UINT8 ubNumMobileElites;
|
||||
|
||||
} MILITIA_LIST_TYPE;
|
||||
|
||||
|
||||
@@ -1,223 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// HEADROCK HAM 3.4: Dynamic Roaming Restrictions XMLization
|
||||
//
|
||||
// This is a new part of the Dynamic Roaming Restrictions system. It reads in
|
||||
// data about sectors to "un-restrict", and the towns that must be liberated
|
||||
// for them to be unrestricted. There can be several unrestriction conditions
|
||||
// for each sector, and only one of the conditions must be true for the sector
|
||||
// to become allowed.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Tactical All.h"
|
||||
#else
|
||||
#include "sgp.h"
|
||||
#include "Debug Control.h"
|
||||
#include "expat.h"
|
||||
#include "gamesettings.h"
|
||||
#include "XML.h"
|
||||
#include "FileMan.h"
|
||||
#include "campaign types.h"
|
||||
#include "militiasquads.h"
|
||||
#include "mapscreen.h"
|
||||
#endif
|
||||
|
||||
// HEADROCK HAM 3.4: Stores restriction data from XML, including required cities for each sector to be allowed.
|
||||
extern DYNAMICRESTRICTIONS gDynamicRestrictions[5001];
|
||||
|
||||
struct
|
||||
{
|
||||
PARSE_STAGE curElement;
|
||||
|
||||
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
|
||||
|
||||
INT16 sCurSectorX;
|
||||
INT16 sCurSectorY;
|
||||
UINT32 uiReqTownFlags;
|
||||
UINT32 maxArraySize;
|
||||
UINT32 curIndex;
|
||||
UINT32 currentDepth;
|
||||
UINT32 maxReadDepth;
|
||||
}
|
||||
typedef dynamicroamingParseData;
|
||||
|
||||
|
||||
static void XMLCALL
|
||||
dynamicroamingStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||
{
|
||||
dynamicroamingParseData * pData = (dynamicroamingParseData *)userData;
|
||||
|
||||
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
|
||||
{
|
||||
if(strcmp(name, "DYNAMICROAMING") == 0 && pData->curElement == ELEMENT_NONE)
|
||||
{
|
||||
// Set all sector IDs to -1 ("unused")
|
||||
for (UINT16 cnt=0; cnt<5001; cnt++)
|
||||
{
|
||||
gDynamicRestrictions[cnt].sSectorID = -1;
|
||||
}
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
else if(strcmp(name, "RESTRICTION") == 0 && pData->curElement == ELEMENT_LIST)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->uiReqTownFlags = 0;
|
||||
|
||||
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3,"MergeStartElementHandle: setting memory for curMerge");
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
|
||||
//pData->curIndex++;
|
||||
}
|
||||
else if(pData->curElement == ELEMENT &&
|
||||
(strcmp(name, "SectorGrid") == 0 ||
|
||||
strcmp(name, "ReqTown") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
|
||||
pData->szCharData[0] = '\0';
|
||||
}
|
||||
|
||||
pData->currentDepth++;
|
||||
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
dynamicroamingCharacterDataHandle(void *userData, const XML_Char *str, int len)
|
||||
{
|
||||
dynamicroamingParseData * pData = (dynamicroamingParseData *)userData;
|
||||
|
||||
if( (pData->currentDepth <= pData->maxReadDepth) &&
|
||||
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
|
||||
){
|
||||
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void XMLCALL
|
||||
dynamicroamingEndElementHandle(void *userData, const XML_Char *name)
|
||||
{
|
||||
dynamicroamingParseData * pData = (dynamicroamingParseData *)userData;
|
||||
|
||||
if(pData->currentDepth <= pData->maxReadDepth) //we're at the end of an element that we've been reading
|
||||
{
|
||||
if(strcmp(name, "DYNAMICROAMING") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT_NONE;
|
||||
}
|
||||
else if(strcmp(name, "RESTRICTION") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
|
||||
if (SECTOR(pData->sCurSectorX, pData->sCurSectorY) >= 0 && SECTOR(pData->sCurSectorX, pData->sCurSectorY) < 256)
|
||||
{
|
||||
pData->curIndex++;
|
||||
gDynamicRestrictions[pData->curIndex].sSectorID = SECTOR(pData->sCurSectorX,pData->sCurSectorY);
|
||||
gDynamicRestrictions[pData->curIndex].uiReqTownFlags |= pData->uiReqTownFlags;
|
||||
}
|
||||
}
|
||||
|
||||
else if(strcmp(name, "SectorGrid") == 0 )
|
||||
{
|
||||
UINT8 x, y;
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
y = (UINT8)pData->szCharData[0] & 0x1F;
|
||||
x = (UINT8)atol(&pData->szCharData[1]);
|
||||
if ( x > 0 && x <= 16 && y > 0 && y <= 16 )
|
||||
{
|
||||
pData->sCurSectorX = x;
|
||||
pData->sCurSectorY = y;
|
||||
}
|
||||
}
|
||||
else if(strcmp(name, "ReqTown") == 0 )
|
||||
{
|
||||
if ((UINT8) atol(pData->szCharData) > 0 && (UINT8) atol(pData->szCharData) < NUM_TOWNS )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->uiReqTownFlags |= (1 << ((UINT8) atol(pData->szCharData) - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
pData->uiReqTownFlags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
|
||||
pData->currentDepth--;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOLEAN ReadInDynamicRoamingRestrictions(STR fileName)
|
||||
{
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesRead;
|
||||
UINT32 uiFSize;
|
||||
CHAR8 * lpcBuffer;
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
|
||||
dynamicroamingParseData pData;
|
||||
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading DynamicRestrictions.xml" );
|
||||
|
||||
// Open merges file
|
||||
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
|
||||
if ( !hFile )
|
||||
return( FALSE );
|
||||
|
||||
uiFSize = FileGetSize(hFile);
|
||||
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
|
||||
|
||||
//Read in block
|
||||
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
|
||||
{
|
||||
MemFree(lpcBuffer);
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
lpcBuffer[uiFSize] = 0; //add a null terminator
|
||||
|
||||
FileClose( hFile );
|
||||
|
||||
|
||||
XML_SetElementHandler(parser, dynamicroamingStartElementHandle, dynamicroamingEndElementHandle);
|
||||
XML_SetCharacterDataHandler(parser, dynamicroamingCharacterDataHandle);
|
||||
|
||||
|
||||
memset(&pData,0,sizeof(pData));
|
||||
pData.maxArraySize = MAXITEMS;
|
||||
pData.curIndex = -1;
|
||||
|
||||
XML_SetUserData(parser, &pData);
|
||||
|
||||
|
||||
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
|
||||
{
|
||||
CHAR8 errorBuf[511];
|
||||
|
||||
sprintf(errorBuf, "XML Parser Error in DynamicRestrictions.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
|
||||
LiveMessage(errorBuf);
|
||||
|
||||
MemFree(lpcBuffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
MemFree(lpcBuffer);
|
||||
|
||||
|
||||
XML_ParserFree(parser);
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -61,16 +61,14 @@ BOOLEAN FacilityTypes_TextOnly;
|
||||
|
||||
void InitFacilityTypeEntry( facilitytypeParseData *pData )
|
||||
{
|
||||
|
||||
// This does base setup on a single type entry, making sure that all values are set to DEFAULT. This is run
|
||||
// immediately before writing XML data into game memory.
|
||||
// Default values set here are only those that differ from 0. Normally this means maximums and performace data
|
||||
// which should equal 100 unless defined otherwise in the XML.
|
||||
|
||||
pData->curFacilityTypeData.usMilitiaTraining = 100;
|
||||
pData->curFacilityTypeData.usMobileMilitiaTraining = 100;
|
||||
|
||||
for (UINT16 cnt = 0; cnt < NUM_FACILITY_ASSIGNMENTS; cnt++ )
|
||||
for (UINT16 cnt = 0; cnt < NUM_FACILITY_ASSIGNMENTS; ++cnt )
|
||||
{
|
||||
pData->curFacilityTypeData.AssignmentData[ cnt ].ubMaximumBreath = 100;
|
||||
pData->curFacilityTypeData.AssignmentData[ cnt ].ubMaximumMorale = 100;
|
||||
@@ -177,9 +175,7 @@ facilitytypeStartElementHandle(void *userData, const XML_Char *name, const XML_C
|
||||
strcmp(name, "ubTotalStaffLimit") == 0 ||
|
||||
|
||||
strcmp(name, "ubMilitiaTrainersAllowed") == 0 ||
|
||||
strcmp(name, "ubMobileMilitiaTrainersAllowed") == 0 ||
|
||||
strcmp(name, "usMilitiaTraining") == 0 ||
|
||||
strcmp(name, "usMobileMilitiaTraining") == 0 ||
|
||||
|
||||
strcmp( name, "pmcentrypoint" ) == 0 ))
|
||||
{
|
||||
@@ -424,9 +420,7 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
gFacilityTypes[pData->curIndex].ubTotalStaffLimit = pData->curFacilityTypeData.ubTotalStaffLimit;
|
||||
|
||||
gFacilityTypes[pData->curIndex].ubMilitiaTrainersAllowed = pData->curFacilityTypeData.ubMilitiaTrainersAllowed;
|
||||
gFacilityTypes[pData->curIndex].ubMobileMilitiaTrainersAllowed = pData->curFacilityTypeData.ubMobileMilitiaTrainersAllowed;
|
||||
gFacilityTypes[pData->curIndex].usMilitiaTraining = pData->curFacilityTypeData.usMilitiaTraining;
|
||||
gFacilityTypes[pData->curIndex].usMobileMilitiaTraining = pData->curFacilityTypeData.usMobileMilitiaTraining;
|
||||
|
||||
gFacilityTypes[pData->curIndex].usFacilityFlags = pData->curFacilityTypeData.usFacilityFlags;
|
||||
|
||||
@@ -504,14 +498,12 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
SGP_THROW(L"FacilityTypes.XML Error: A </FACILITYTYPE> tag was encountered too early! Please make sure all tags are closed properly.");
|
||||
}
|
||||
}
|
||||
|
||||
// Set current Index. As long as it equals 0, the program is not writing any data to memory.
|
||||
else if(strcmp(name, "ubIndex") == 0)
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
pData->curIndex = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// General facility data and militia effects
|
||||
@@ -523,7 +515,6 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curFacilityTypeData.szFacilityName, sizeof(pData->curFacilityTypeData.szFacilityName)/sizeof(pData->curFacilityTypeData.szFacilityName[0]) );
|
||||
pData->curFacilityTypeData.szFacilityName[sizeof(pData->curFacilityTypeData.szFacilityName)/sizeof(pData->curFacilityTypeData.szFacilityName[0]) - 1] = '\0';
|
||||
}
|
||||
|
||||
else if(strcmp(name, "szFacilityShortName") == 0)
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
@@ -531,34 +522,21 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curFacilityTypeData.szFacilityShortName, sizeof(pData->curFacilityTypeData.szFacilityShortName)/sizeof(pData->curFacilityTypeData.szFacilityShortName[0]) );
|
||||
pData->curFacilityTypeData.szFacilityShortName[sizeof(pData->curFacilityTypeData.szFacilityShortName)/sizeof(pData->curFacilityTypeData.szFacilityShortName[0]) - 1] = '\0';
|
||||
}
|
||||
|
||||
else if(strcmp(name, "ubTotalStaffLimit") == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
pData->curFacilityTypeData.ubTotalStaffLimit = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
else if(strcmp(name, "ubMilitiaTrainersAllowed") == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
pData->curFacilityTypeData.ubMilitiaTrainersAllowed = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "ubMobileMilitiaTrainersAllowed") == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
pData->curFacilityTypeData.ubMobileMilitiaTrainersAllowed = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "usMilitiaTraining") == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
pData->curFacilityTypeData.usMilitiaTraining = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "usMobileMilitiaTraining") == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
pData->curFacilityTypeData.usMobileMilitiaTraining = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
else if ( strcmp( name, "pmcentrypoint" ) == 0 )
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "XML.h"
|
||||
#else
|
||||
#include "builddefines.h"
|
||||
#include <stdio.h>
|
||||
#include "XML.h"
|
||||
#include "expat.h"
|
||||
#include "string.h"
|
||||
#include "Campaign Types.h"
|
||||
#include "FileMan.h"
|
||||
#include "MemMan.h"
|
||||
#include "Debug Control.h"
|
||||
#endif
|
||||
|
||||
#define MAX_CHAR_DATA_LENGTH 500
|
||||
|
||||
extern INT32 iRestrictedSectorArraySize;
|
||||
extern UINT32 gRestrictMilitia[256];
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ROAMING_ELEMENT_NONE = 0,
|
||||
ROAMING_ELEMENT_RESTRICTED_SECTORS,
|
||||
ROAMING_ELEMENT_SECTOR,
|
||||
} ROAMING_PARSE_STAGE;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 ubSectorID;
|
||||
BOOLEAN fValidSector;
|
||||
} RoamingInfo;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ROAMING_PARSE_STAGE curElement;
|
||||
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
|
||||
RoamingInfo curRoamingInfo;
|
||||
UINT32 uiSectorCount;
|
||||
UINT32 currentDepth;
|
||||
UINT32 maxReadDepth;
|
||||
} RoamingParseData;
|
||||
|
||||
|
||||
static void XMLCALL
|
||||
RoamingStartElementHandle(void *userData, const XML_Char *name, const char **atts)
|
||||
{
|
||||
RoamingParseData * pData = (RoamingParseData *) userData;
|
||||
|
||||
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
|
||||
{
|
||||
|
||||
if(strcmp(name, "RESTRICTED_SECTORS") == 0 && pData->curElement == ROAMING_ELEMENT_NONE)
|
||||
{
|
||||
pData->curElement = ROAMING_ELEMENT_RESTRICTED_SECTORS;
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
|
||||
else if(strcmp(name, "SECTOR") == 0 && pData->curElement == ROAMING_ELEMENT_RESTRICTED_SECTORS)
|
||||
{
|
||||
pData->curElement = ROAMING_ELEMENT_SECTOR;
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
pData->szCharData[0] = '\0';
|
||||
}
|
||||
|
||||
pData->currentDepth++;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void XMLCALL
|
||||
RoamingCharacterDataHandle(void *userData, const XML_Char *str, int len)
|
||||
{
|
||||
RoamingParseData * pData = (RoamingParseData *) userData;
|
||||
|
||||
if(pData->currentDepth <= pData->maxReadDepth && strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
|
||||
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
|
||||
}
|
||||
|
||||
|
||||
static void XMLCALL
|
||||
RoamingEndElementHandle(void *userData, const XML_Char *name)
|
||||
{
|
||||
RoamingParseData * pData = (RoamingParseData *) userData;
|
||||
|
||||
if(pData->currentDepth <= pData->maxReadDepth) //we're at the end of an element that we've been reading
|
||||
{
|
||||
if(strcmp(name, "RESTRICTED_SECTORS") == 0 && pData->curElement == ROAMING_ELEMENT_RESTRICTED_SECTORS)
|
||||
{
|
||||
pData->curElement = ROAMING_ELEMENT_NONE;
|
||||
iRestrictedSectorArraySize = pData->uiSectorCount;
|
||||
}
|
||||
//Kaiden: Code shamelessly stolen from lesh to accept sector Aliases
|
||||
else if(strcmp(name, "SECTOR") == 0 && pData->curElement == ROAMING_ELEMENT_SECTOR)
|
||||
{
|
||||
UINT8 x, y;
|
||||
pData->curElement = ROAMING_ELEMENT_RESTRICTED_SECTORS;
|
||||
|
||||
y = (UINT8)pData->szCharData[0] & 0x1F;
|
||||
x = (UINT8)atol(&pData->szCharData[1]);
|
||||
if ( x > 0 && x <= 16 && y > 0 && y <= 16 )
|
||||
{
|
||||
pData->curRoamingInfo.fValidSector = TRUE;
|
||||
pData->curRoamingInfo.ubSectorID = SECTOR(x,y);
|
||||
gRestrictMilitia[pData->uiSectorCount] = pData->curRoamingInfo.ubSectorID;
|
||||
pData->uiSectorCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
pData->curRoamingInfo.fValidSector = FALSE;
|
||||
}
|
||||
}
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
|
||||
pData->currentDepth--;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN ReadInRoamingInfo(STR fileName)
|
||||
{
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesRead;
|
||||
UINT32 uiFSize;
|
||||
CHAR8 * lpcBuffer;
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
|
||||
RoamingParseData pData;
|
||||
|
||||
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
|
||||
if ( !hFile )
|
||||
return( FALSE );
|
||||
|
||||
uiFSize = FileGetSize(hFile);
|
||||
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
|
||||
|
||||
//Read in block
|
||||
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
|
||||
{
|
||||
MemFree(lpcBuffer);
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
lpcBuffer[uiFSize] = 0; //add a null terminator
|
||||
|
||||
FileClose( hFile );
|
||||
|
||||
|
||||
XML_SetElementHandler(parser, RoamingStartElementHandle, RoamingEndElementHandle);
|
||||
XML_SetCharacterDataHandler(parser, RoamingCharacterDataHandle);
|
||||
|
||||
|
||||
memset(&pData,0,sizeof(pData));
|
||||
XML_SetUserData(parser, &pData);
|
||||
iRestrictedSectorArraySize = 0;
|
||||
|
||||
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
|
||||
{
|
||||
CHAR8 errorBuf[511];
|
||||
sprintf(errorBuf, "XML Parser Error in RestrictedRoamingMilitia.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
|
||||
LiveMessage(errorBuf);
|
||||
|
||||
MemFree(lpcBuffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
MemFree(lpcBuffer);
|
||||
|
||||
XML_ParserFree(parser);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
+3
-53
@@ -2878,8 +2878,7 @@ void DrawCharacterInfo(INT16 sCharNumber)
|
||||
wcscpy(sString, pAttributeMenuStrings[pSoldier->bTrainStat]);
|
||||
}
|
||||
// train town?
|
||||
// HEADROCK HAM 3.6: Draw for Mobile Trainers as well.
|
||||
else if( pSoldier->bAssignment == TRAIN_TOWN || pSoldier->bAssignment == TRAIN_MOBILE )
|
||||
else if( pSoldier->bAssignment == TRAIN_TOWN )
|
||||
{
|
||||
wcscpy(sString,pTownNames[GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY ) ] );
|
||||
}
|
||||
@@ -6192,11 +6191,6 @@ void DrawAssignment(INT16 sCharNumber, INT16 sRowIndex, INT32 iFont)
|
||||
ubProgress = SectorInfo[SECTOR(sMapX, sMapY)].ubMilitiaTrainingPercentDone;
|
||||
usMaxProgress = 100;
|
||||
}
|
||||
else if ( pSoldier->bAssignment == TRAIN_MOBILE )
|
||||
{
|
||||
ubProgress = SectorInfo[SECTOR(sMapX, sMapY)].ubMobileMilitiaTrainingPercentDone;
|
||||
usMaxProgress = 100;
|
||||
}
|
||||
else if ( pSoldier->bAssignment == TRAIN_SELF ||
|
||||
pSoldier->bAssignment == TRAIN_BY_OTHER )
|
||||
{
|
||||
@@ -8024,16 +8018,6 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
{ //activate autoresolve in prebattle interface.
|
||||
ActivatePreBattleRetreatAction();
|
||||
}
|
||||
// WANNE: Only allow when mobile militia is allowed!
|
||||
else if ( gGameExternalOptions.gfAllowMilitiaGroups && !gGameExternalOptions.fMilitiaStrategicCommand )
|
||||
{
|
||||
// only handle border button keyboard equivalents if the button is visible!
|
||||
if ( !fShowMapInventoryPool )
|
||||
{
|
||||
// toggle show mobile restrictions filter
|
||||
ToggleMobileFilter();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
if( fAlt )
|
||||
@@ -9049,43 +9033,9 @@ void PollRightButtonInMapView( UINT32 *puiNewEvent )
|
||||
else
|
||||
{
|
||||
if ( GetMouseMapXY( &sMapX, &sMapY ) )
|
||||
{
|
||||
// HEADROCK HAM 4: Toggle Militia Restrictions manually. This occurs when the Mobile Restrictions
|
||||
// view is turned on. Each click advances the sector's classification by 1. If max is reached,
|
||||
// loops back to start.
|
||||
// HEADROCK HAM 5: Whoops, disallow changing restrictions for sectors that are
|
||||
// not accessible to militia to begin with.
|
||||
//Moa: we should be able to change restrictions where ever the militia is potentially allowed to move.
|
||||
// Able to change restriction if:
|
||||
// Potentially allowed:
|
||||
// - we are in mobile Restrictions view && we have RESTRICT_ROAMING = TRUE in ini &&
|
||||
// - ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS = TRUE && we have liberated that sector at least once
|
||||
// note that ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS = TRUE does not overwrites any restrictions anymore it extends the region where restrictions are allowed, just like DynamicRestriction does
|
||||
// - ALLOW_MILITIA_MOVEMENT_THROUGH_MINOR_CITIES = TRUE && it is a Minor Cities && we have liberated that citysector
|
||||
// - DynamicRestrictions if set in ini (does not matter if visited or not)
|
||||
//if ( fShowMobileRestrictionsFlag == TRUE && gDynamicRestrictMilitia[ SECTOR( sMapX, sMapY ) ] == TRUE)
|
||||
if ( gusMapDisplayColourMode == MAP_DISPLAY_MOBILEMILITIARESTRICTIONS && gGameExternalOptions.gflimitedRoaming &&
|
||||
( ( gGameExternalOptions.fUnrestrictVisited == TRUE && SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled )
|
||||
|| ( gGameExternalOptions.fAllowMilitiaMoveThroughMinorCities && GetTownIdForSector( sMapX, sMapY ) > BLANK_SECTOR && !gfMilitiaAllowedInTown[GetTownIdForSector( sMapX, sMapY )] && SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled )
|
||||
|| ( gGameExternalOptions.fDynamicRestrictRoaming && gDynamicRestrictMilitia[ SECTOR( sMapX, sMapY ) ] == TRUE )
|
||||
) )
|
||||
{
|
||||
// Restrict more.
|
||||
if ( gubManualRestrictMilitia[ SECTOR( sMapX, sMapY ) ] > MANUAL_MOBILE_NO_ENTER )
|
||||
{
|
||||
gubManualRestrictMilitia[ SECTOR( sMapX, sMapY ) ]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wrap back to highest.
|
||||
gubManualRestrictMilitia[ SECTOR( sMapX, sMapY ) ] = MANUAL_MOBILE_NO_RESTRICTION;
|
||||
}
|
||||
fMapPanelDirty = TRUE;
|
||||
// Skip the rest of this function.
|
||||
return;
|
||||
}
|
||||
{
|
||||
// don't change sectors if we've just done the militia restrictions thing.
|
||||
else if( ( sSelMapX != sMapX ) || ( sSelMapY != sMapY ) )
|
||||
if( ( sSelMapX != sMapX ) || ( sSelMapY != sMapY ) )
|
||||
{
|
||||
ChangeSelectedMapSector( sMapX, sMapY, ( INT8 )iCurrentMapSectorZ );
|
||||
}
|
||||
|
||||
@@ -109,16 +109,6 @@ BOOLEAN InitializeInvPanelCoordsVehicle( );
|
||||
// HEADROCK HAM 3.6: Calculate daily cost for all mercs who have one.
|
||||
INT32 GetTotalContractExpenses ( void );
|
||||
|
||||
// HEADROCK HAM 4: enumarate Manual Militia Restriction states
|
||||
enum
|
||||
{
|
||||
MANUAL_MOBILE_RESTRICTED,
|
||||
MANUAL_MOBILE_NO_ENTER,
|
||||
MANUAL_MOBILE_NO_LEAVE,
|
||||
MANUAL_MOBILE_NO_RESTRICTION,
|
||||
NUM_MANUAL_MOBILE_STATES,
|
||||
};
|
||||
|
||||
// Flugente: militia movement
|
||||
extern BOOLEAN fPlotForMilitia;
|
||||
extern UINT32 gMilitiaPlotStartSector;
|
||||
|
||||
+1
-97
@@ -33,8 +33,6 @@ StrategicMapElement StrategicMap[MAP_WORLD_X*MAP_WORLD_Y];
|
||||
|
||||
extern BOOLEAN fReDrawFace;
|
||||
|
||||
|
||||
|
||||
BOOLEAN HandleStrategicDeath( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
// add the guy to the dead list
|
||||
@@ -100,7 +98,6 @@ BOOLEAN HandleStrategicDeath( SOLDIERTYPE *pSoldier )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
void HandleSoldierDeadComments( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 cnt = 0;
|
||||
@@ -109,8 +106,7 @@ void HandleSoldierDeadComments( SOLDIERTYPE *pSoldier )
|
||||
|
||||
// IF IT'S THE SELECTED GUY, MAKE ANOTHER SELECTED!
|
||||
cnt = gTacticalStatus.Team[ pSoldier->bTeam ].bFirstID;
|
||||
|
||||
|
||||
|
||||
// see if this was the friend of a living merc
|
||||
for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ pSoldier->bTeam ].bLastID; cnt++,pTeamSoldier++)
|
||||
{
|
||||
@@ -166,95 +162,3 @@ void HandleSoldierDeadComments( SOLDIERTYPE *pSoldier )
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN SetMilitiaMovementOrder(INT16 sX, INT16 sY, INT8 sZ, UINT32 dir)
|
||||
{
|
||||
// militia can only move on the surface
|
||||
if ( sZ )
|
||||
return FALSE;
|
||||
|
||||
// militia needs to be here...
|
||||
if ( !NumNonPlayerTeamMembersInSector( sX, sY, MILITIA_TEAM ) )
|
||||
return FALSE;
|
||||
|
||||
// in order to give movement orders, we need a merc to staff a military headquarter
|
||||
if ( !MercStaffsMilitaryHQ() )
|
||||
return FALSE;
|
||||
|
||||
INT16 newX = sX;
|
||||
INT16 newY = sY;
|
||||
UINT8 movetype = THROUGH_STRATEGIC_MOVE;
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case MILITIA_MOVE_NORTH:
|
||||
--newY;
|
||||
movetype = NORTH_STRATEGIC_MOVE;
|
||||
break;
|
||||
|
||||
case MILITIA_MOVE_WEST:
|
||||
--newX;
|
||||
movetype = WEST_STRATEGIC_MOVE;
|
||||
break;
|
||||
|
||||
case MILITIA_MOVE_EAST:
|
||||
++newX;
|
||||
movetype = EAST_STRATEGIC_MOVE;
|
||||
break;
|
||||
|
||||
case MILITIA_MOVE_SOUTH:
|
||||
++newY;
|
||||
movetype = SOUTH_STRATEGIC_MOVE;
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.gflimitedRoaming && !IsSectorRoamingAllowed( SECTOR(newX, newY) ) )
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gpStrategicString[STR_MILITIAMOVEMENT_NO_LIMITEDROAMING] );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UINT8 ubTraverseType = SectorInfo[ SECTOR(sX, sY) ].ubTraversability[ movetype ];
|
||||
|
||||
if( ubTraverseType == GROUNDBARRIER || ubTraverseType == EDGEOFWORLD )
|
||||
return FALSE;
|
||||
|
||||
UINT32 ubTraverseMod = 0;
|
||||
|
||||
switch( ubTraverseType )
|
||||
{
|
||||
case TOWN: ubTraverseMod = 1780;break;
|
||||
case ROAD: ubTraverseMod = 100;break;
|
||||
case PLAINS: ubTraverseMod = 85; break;
|
||||
case SAND: ubTraverseMod = 50; break;
|
||||
case SPARSE: ubTraverseMod = 70; break;
|
||||
case DENSE: ubTraverseMod = 60; break;
|
||||
case SWAMP: ubTraverseMod = 35; break;
|
||||
case WATER: ubTraverseMod = 25; break;
|
||||
case HILLS: ubTraverseMod = 50; break;
|
||||
case NS_RIVER: ubTraverseMod = 25; break;
|
||||
case EW_RIVER: ubTraverseMod = 25; break;
|
||||
}
|
||||
|
||||
if( ubTraverseMod )
|
||||
{
|
||||
UINT32 timeneeded = FOOT_TRAVEL_TIME * 100 / ubTraverseMod;
|
||||
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sX, sY ) ] );
|
||||
|
||||
StrategicMap[ sX + ( sY * MAP_WORLD_X ) ].usFlags &= ~MILITIA_MOVE_ALLDIRS;
|
||||
StrategicMap[ sX + ( sY * MAP_WORLD_X ) ].usFlags |= dir;
|
||||
|
||||
AddStrategicEvent( EVENT_MILITIA_MOVEMENT_ORDER, GetWorldTotalMin() + timeneeded, SECTOR( sX, sY ) );
|
||||
|
||||
fMapPanelDirty = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -65,6 +65,4 @@ void HandleSoldierDeadComments( SOLDIERTYPE *pSoldier );
|
||||
|
||||
BOOLEAN HandleStrategicDeath( SOLDIERTYPE *pSoldier );
|
||||
|
||||
BOOLEAN SetMilitiaMovementOrder(INT16 sX, INT16 sY, INT8 sZ, UINT32 dir);
|
||||
|
||||
#endif
|
||||
@@ -714,7 +714,7 @@ void ChangeStat( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UINT8 ubSta
|
||||
|
||||
//Madd: option to make mercs quiet during training / doctoring / repairing
|
||||
if ( ((pSoldier->bAssignment == TRAIN_BY_OTHER || pSoldier->bAssignment == TRAIN_TEAMMATE || pSoldier->bAssignment == TRAIN_SELF ||
|
||||
pSoldier->bAssignment == FACILITY_STAFF || pSoldier->bAssignment == TRAIN_TOWN || pSoldier->bAssignment == TRAIN_MOBILE
|
||||
pSoldier->bAssignment == FACILITY_STAFF || pSoldier->bAssignment == TRAIN_TOWN
|
||||
|| pSoldier->bAssignment == TRAIN_WORKERS || pSoldier->bAssignment == DRILL_MILITIA )
|
||||
&& !gGameSettings.fOptions[TOPTION_QUIET_TRAINING]) ||
|
||||
(IS_REPAIR(pSoldier->bAssignment) && !gGameSettings.fOptions[TOPTION_QUIET_REPAIRING]) ||
|
||||
|
||||
@@ -2311,8 +2311,6 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
|
||||
case TRAIN_SELF:
|
||||
case TRAIN_TOWN:
|
||||
// HEADROCK HAM 3.6: New assignment.
|
||||
case TRAIN_MOBILE:
|
||||
case TRAIN_TEAMMATE:
|
||||
case TRAIN_BY_OTHER:
|
||||
case TRAIN_WORKERS:
|
||||
@@ -2331,7 +2329,6 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
sPtsAvailable = GetSoldierStudentPts( MercPtrs[ pFace->ubSoldierID ], MercPtrs[ pFace->ubSoldierID ]->bTrainStat, &usMaximumPts );
|
||||
break;
|
||||
case( TRAIN_TOWN ):
|
||||
case( TRAIN_MOBILE ):
|
||||
case DRILL_MILITIA:
|
||||
sPtsAvailable = GetTownTrainPtsForCharacter( MercPtrs[ pFace->ubSoldierID ], &usMaximumPts );
|
||||
// divide both amounts by 10 to make the displayed numbers a little more user-palatable (smaller)
|
||||
|
||||
@@ -60,10 +60,8 @@ INT32 ghMilitiaControlBox = -1;
|
||||
INT16 gsMilitiaControlBoxesX, gsMilitiaControlBoxesY;
|
||||
//INT16 gsTalkToAllBoxesX, gsTalkToAllBoxesY;
|
||||
|
||||
|
||||
// assignment menu mouse regions
|
||||
MOUSE_REGION gMilitiaControlMenuRegion[ MAX_MILCON_STRING_COUNT ];
|
||||
//MOUSE_REGION gTalkToAllMenuRegion[ MAX_TRAIN_STRING_COUNT ];
|
||||
|
||||
MOUSE_REGION gMilitiaControlScreenMaskRegion;
|
||||
|
||||
|
||||
@@ -156,14 +156,12 @@ typedef PARSE_STAGE;
|
||||
#define ALTSECTORSFILENAME "Map\\AltSectors.xml"
|
||||
#define SAMSITESFILENAME "Map\\SamSites.xml"
|
||||
#define HELISITESFILENAME "Map\\HeliSites.xml"
|
||||
#define ROAMINGMILITIAFILENAME "Map\\RestrictedRoamingMilitia.xml"
|
||||
#define EXTRAITEMSFILENAME "Map\\A9_0_ExtraItems" // ".xml" will be added @runtime
|
||||
#define EXTRAITEMSFILENAME2 "Map\\A11_0_ExtraItems" // ".xml" will be added @runtime
|
||||
#define SHIPPINGDESTINATIONSFILENAME "Map\\ShippingDestinations.xml"
|
||||
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
|
||||
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
|
||||
#define SECTORFACILITIESFILENAME "Map\\Facilities.xml"
|
||||
#define DYNAMICROAMINGFILENAME "Map\\DynamicRestrictions.xml"
|
||||
#define FACILITYTYPESFILENAME "Map\\FacilityTypes.xml"
|
||||
#define SECTORNAMESFILENAME "Map\\SectorNames.xml"
|
||||
#define COOLNESSBYSECTORFILENAME "Map\\CoolnessBySector.xml"
|
||||
@@ -427,9 +425,6 @@ extern BOOLEAN WriteInPatrolInfo(STR fileName);
|
||||
extern BOOLEAN ReadInArmyCompositionInfo(STR fileName);
|
||||
extern BOOLEAN WriteInArmyCompositionInfo(STR fileName);
|
||||
|
||||
//Kaiden: Roaming Militia Restricted Sectors List
|
||||
extern BOOLEAN ReadInRoamingInfo(STR filename);
|
||||
|
||||
// Dealtar: New shipping system XMLs
|
||||
extern BOOLEAN ReadInShippingDestinations(STR fileName, BOOLEAN localizedVersion);
|
||||
extern BOOLEAN ReadInDeliveryMethods(STR fileName);
|
||||
@@ -459,9 +454,6 @@ extern BOOLEAN ReadInFuneralLocations(STR fileName);
|
||||
// HEADROCK HAM 3.4: Sector Facility Locations
|
||||
extern BOOLEAN ReadInSectorFacilities(STR fileName);
|
||||
|
||||
// HEADROCK HAM 3.4: Dynamic Roaming Restrictions
|
||||
extern BOOLEAN ReadInDynamicRoamingRestrictions(STR fileName);
|
||||
|
||||
// HEADROCK HAM 3.5: Facility Types and bonuses
|
||||
extern BOOLEAN ReadInFacilityTypes(STR fileName, BOOLEAN localizedVersion);
|
||||
|
||||
|
||||
@@ -1101,8 +1101,62 @@ profileEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->currentDepth--;
|
||||
}
|
||||
|
||||
// Flugente hack: analyze profiles and print out the result
|
||||
#include <vfs/Core/vfs_file_raii.h> // added by Flugente for vfs-stuff
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
extern STR16 gzMercSkillTextNew[];
|
||||
|
||||
void AnalyzeProfiles()
|
||||
{
|
||||
INT32 relevantmerccntr = 0;
|
||||
INT32 traitcntr[NUM_SKILLTRAITS_NT] = { 0 };
|
||||
INT32 experttraitcntr[NUM_SKILLTRAITS_NT] = { 0 };
|
||||
|
||||
for ( int i = 0; i < NUM_PROFILES; ++i )
|
||||
{
|
||||
// we are only interested in AIM/MERC/RPCs
|
||||
if ( i != NO_PROFILE &&
|
||||
( tempProfiles[i].Type == 1 || tempProfiles[i].Type == 2 || tempProfiles[i].Type == 3 )
|
||||
)
|
||||
{
|
||||
++relevantmerccntr;
|
||||
|
||||
INT32 perstraitcntr[NUM_SKILLTRAITS_NT] = { 0 };
|
||||
|
||||
perstraitcntr[tempProfiles[i].bNewSkillTrait1] += 1;
|
||||
perstraitcntr[tempProfiles[i].bNewSkillTrait2] += 1;
|
||||
perstraitcntr[tempProfiles[i].bNewSkillTrait3] += 1;
|
||||
|
||||
for ( int j = 0; j < NUM_SKILLTRAITS_NT; ++j )
|
||||
{
|
||||
traitcntr[j] += perstraitcntr[j];
|
||||
|
||||
if ( perstraitcntr[j] > 1 )
|
||||
experttraitcntr[j] += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// write stuff
|
||||
{
|
||||
std::stringstream settings;
|
||||
const char endl[] = "\r\n";
|
||||
|
||||
settings << "AIM + MERC + RPC: " << relevantmerccntr << endl;
|
||||
settings << endl;
|
||||
settings << "Trait Total Single Experts" << endl;
|
||||
|
||||
for ( int j = 0; j < NUM_SKILLTRAITS_NT; ++j )
|
||||
{
|
||||
settings << j << " " << traitcntr[j] << " " << traitcntr[j] - 2 * experttraitcntr[j] << " " << experttraitcntr[j] << endl;
|
||||
}
|
||||
|
||||
vfs::COpenWriteFile wfile( "MercProfileAnalysis.txt", true, true );
|
||||
wfile->write( settings.str().c_str(), settings.str().length() );
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN ReadInMercProfiles(STR fileName, BOOLEAN localizedVersion)
|
||||
{
|
||||
@@ -1164,6 +1218,9 @@ BOOLEAN ReadInMercProfiles(STR fileName, BOOLEAN localizedVersion)
|
||||
|
||||
XML_ParserFree(parser);
|
||||
|
||||
// Flugente hack: analyze profiles and print out the result
|
||||
//AnalyzeProfiles();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
+5
-13
@@ -2993,7 +2993,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"锻炼", // train yourself
|
||||
L"游击队", // L"Mobile Militia", //ham3.6
|
||||
L"培训工人", //L"Train workers",
|
||||
L"教练", // train your teammates
|
||||
L"学员", // be trained by an instructor
|
||||
@@ -4240,7 +4239,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"等级", // the training level of civilians in this town
|
||||
L"民兵训练度", // 10 // state of civilian training in town
|
||||
L"民兵", // the state of the trained civilians in the town
|
||||
L"巡逻民兵", // L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
|
||||
|
||||
// Flugente: prisoner texts
|
||||
L"囚犯", //L"Prisoners",
|
||||
@@ -4356,7 +4354,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"显示领空 (|A)",
|
||||
L"显示物品 (|I)",
|
||||
L"显示民兵和敌人 (|Z)",
|
||||
L"显示民兵移动 (|R)", // HEADROCK HAM 4: Mobile Restrictions Button
|
||||
L"显示疾病消息", //L"Show Disease Data",
|
||||
L"显示天气", // L"Show Weather",
|
||||
};
|
||||
@@ -6237,10 +6234,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"佣兵有一份限时的合同。", //"Merc has a finite contract.",
|
||||
L"佣兵的合同没投保", //"Merc's contract is not insured",
|
||||
L"地图概况",//"Map Overview", // 24
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"你目前没有民兵。当你招募了一些后再返回这个显示模式。",
|
||||
L"这个视图显示你的移动民兵能去和不能去哪里。 灰色 = 移动民兵拒绝来这里. 红色 = 移动民兵能来这里, 但是你告诉他们不要这样. 黄色 = 移动民兵能进入这个区域, 但是不能离开. 绿色 = 移动民兵可以自由的进入这里. 右击一个绿色/黄色区域循环它的行为.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does //文本描述疾病查看地图并做翻译。
|
||||
L"这个视图会展示出哪个地区爆发了瘟疫,这个数字表明,平均每个人的感染程度,颜色表示它的范围。 灰色=无病。 绿色到红色=不断升级的感染程度。", //L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
|
||||
@@ -6262,25 +6256,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"同意支付吗?",
|
||||
L"你无法支付。",
|
||||
L"继续在%s (%s %d)训练民兵吗?",
|
||||
|
||||
L"花费$",
|
||||
L"( Y/N )", // abbreviated yes/no
|
||||
L"", // unused
|
||||
L"在%d地区训练民兵将花费$%d。%s",
|
||||
|
||||
L"你无法支付$%d以供在这里训练民兵。",
|
||||
L"%s的忠诚度必须达到%d以上方可训练民兵。",
|
||||
L"你不能在%s训练民兵了。",
|
||||
L"你无法支付$%d以供在这里训练巡逻民兵。", // L"You cannot afford the $%d to train mobile militia here.", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"继续在%s (%s %d)训练巡逻民兵吗?", // L"Continue training mobile militia in %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"在%d地区训练巡逻民兵将花费$%d。%s", // L"Training mobile militia in %d sectors will cost $ %d. %s", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"训练一队民兵要花费$", // L"Training a squad of mobile militia will cost $", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"你无法训练更多的游击队因为已经达到上限(%d/%d)。你必须先%s才能训练更多。", //L"You cannot train more mobile militia because the maximum is reached (%d/%d). You have to %s first in order to train more.",
|
||||
L"解放更多城镇分区", //L"liberate more town sectors",
|
||||
|
||||
L"解放新的城镇分区", //L"liberate new town sectors",
|
||||
L"解放更多城镇", //L"liberate more towns",
|
||||
L"恢复失去的进度", //L"regain your lost progress",
|
||||
L"继续进度", //L"progress further",
|
||||
|
||||
L"雇佣更多反抗军", //L"recruit more rebels",
|
||||
L"民兵队长通报你,有%d名民兵在%s分区遭遇敌军时逃跑了。", //L"The militia team leader has to inform you that %d fellow have deserted facing enemy in sector %s.",
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+5
-13
@@ -2994,7 +2994,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Oefenen", // train yourself
|
||||
L"Mobile Militia", // TODO.Translate
|
||||
L"Train workers", // TODO.Translate
|
||||
L"Trainer", // train your teammates
|
||||
L"Student", // be trained by an instructor
|
||||
@@ -4242,7 +4241,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Niveau", // the training level of civilians in this town
|
||||
L"Training Burgers", // 10 // state of civilian training in town
|
||||
L"Militie", // the state of the trained civilians in the town
|
||||
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
|
||||
|
||||
// Flugente: prisoner texts
|
||||
L"Prisoners",
|
||||
@@ -4359,7 +4357,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Toon Luchtruim (|A)",
|
||||
L"Toon |Items",
|
||||
L"Toon Milities & Vijanden (|Z)",
|
||||
L"Show Mobile Militia |Restrictions", // HEADROCK HAM 4: Mobile Restrictions Button // TODO.Translate
|
||||
L"Show Disease Data", // TODO.Translate
|
||||
L"Show Weather", // TODO.Translate
|
||||
};
|
||||
@@ -6245,10 +6242,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"Huurling heeft eindig contract.",
|
||||
L"Contract Huurling is niet verzekerd",
|
||||
L"Map Overview", // 24
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"You currently have no Mobile Militia. Return to this view mode once you've recruited some.",
|
||||
L"This view shows where your Mobile Militia can and cannot go. GREY = Mobile Militia refuse to go here. RED = Mobile Militia can go here, but you've told them not to. YELLOW = Mobile Militia can enter this sector, but not leave. GREEN = Mobile Militia can go here freely. Right click a Green/Yellow sector to cycle its behavior.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does TODO.Translate
|
||||
L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
|
||||
@@ -6270,25 +6264,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Uitgave goedkeuren?", // asking player if they wish to pay the amount requested
|
||||
L"je kunt dit niet betalen.", // telling the player they can't afford to train this town
|
||||
L"Doorgaan met militie trainen %s (%s %d)?", // continue training this town?
|
||||
|
||||
L"Kosten $", // the cost in dollars to train militia
|
||||
L"( J/N )", // abbreviated yes/no
|
||||
L"", // unused
|
||||
L"Stadsmilities trainen in %d sectors kost $ %d. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"Je kunt de $%d niet betalen om de stadsmilitie hier te trainen.",
|
||||
L"%s heeft een loyaliteit nodig van %d procent om door te gaan met milities trainen.",
|
||||
L"Je kunt de militie in %s niet meer trainen.",
|
||||
L"You cannot afford the $%d to train mobile militia here.", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"Continue training mobile militia in %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"Training mobile militia in %d sectors will cost $ %d. %s", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"Training a squad of mobile militia will cost $", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"You cannot train more mobile militia because the maximum is reached (%d/%d). You have to %s first in order to train more.", // TODO.Translate
|
||||
L"liberate more town sectors", // TODO.Translate
|
||||
|
||||
L"liberate new town sectors", // TODO.Translate
|
||||
L"liberate more towns", // TODO.Translate
|
||||
L"regain your lost progress", // TODO.Translate
|
||||
L"progress further", // TODO.Translate
|
||||
|
||||
L"recruit more rebels", // TODO.Translate
|
||||
L"The militia team leader has to inform you that %d fellow have deserted facing enemy in sector %s.", // TODO.Translate
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+5
-13
@@ -2993,7 +2993,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Practice", // train yourself
|
||||
L"Mobile Militia",
|
||||
L"Train workers",
|
||||
L"Trainer", // train your teammates
|
||||
L"Student", // be trained by an instructor
|
||||
@@ -4240,7 +4239,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Level", // the training level of civilians in this town
|
||||
L"Civilian Training", // 10 // state of civilian training in town
|
||||
L"Militia", // the state of the trained civilians in the town
|
||||
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
|
||||
|
||||
// Flugente: prisoner texts
|
||||
L"Prisoners",
|
||||
@@ -4357,7 +4355,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Show |Airspace",
|
||||
L"Show |Items",
|
||||
L"Show Militia & Enemies (|Z)",
|
||||
L"Show Mobile Militia |Restrictions", // HEADROCK HAM 4: Mobile Restrictions Button
|
||||
L"Show Disease Data",
|
||||
L"Show Weather",
|
||||
};
|
||||
@@ -6238,9 +6235,6 @@ STR16 zMarksMapScreenText[] =
|
||||
L"Merc has a finite contract.",
|
||||
L"Merc's contract is not insured",
|
||||
L"Map Overview", // 24
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"You currently have no Mobile Militia. Return to this view mode once you've recruited some.",
|
||||
L"This view shows where your Mobile Militia can and cannot go. GREY = Mobile Militia refuse to go here. RED = Mobile Militia can go here, but you've told them not to. YELLOW = Mobile Militia can enter this sector, but not leave. GREEN = Mobile Militia can go here freely. Right click a Green/Yellow sector to cycle its behavior.",
|
||||
|
||||
// Flugente: disease texts describing what a map view does
|
||||
L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
@@ -6263,25 +6257,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Approve expenditure?", // asking player if they wish to pay the amount requested
|
||||
L"You can't afford it.", // telling the player they can't afford to train this town
|
||||
L"Continue training militia in %s (%s %d)?", // continue training this town?
|
||||
|
||||
L"Cost $", // the cost in dollars to train militia
|
||||
L"( Y/N )", // abbreviated yes/no
|
||||
L"", // unused
|
||||
L"Training town militia in %d sectors will cost $ %d. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"You cannot afford the $%d to train town militia here.",
|
||||
L"%s needs a loyalty of %d percent for you to be able to continue training militia.",
|
||||
L"You cannot train the militia in %s any further.",
|
||||
L"You cannot afford the $%d to train mobile militia here.", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Continue training mobile militia in %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Training mobile militia in %d sectors will cost $ %d. %s", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Training a squad of mobile militia will cost $", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"You cannot train more mobile militia because the maximum is reached (%d/%d). You have to %s first in order to train more.", //Moa: maximum number mobile militia (15)
|
||||
L"You cannot train the militia in %s any further.",
|
||||
L"liberate more town sectors",
|
||||
|
||||
L"liberate new town sectors",
|
||||
L"liberate more towns",
|
||||
L"regain your lost progress",
|
||||
L"progress further",
|
||||
|
||||
L"recruit more rebels",
|
||||
L"The militia team leader has to inform you that %d fellow have deserted facing enemy in sector %s.", //Moa: mobile deserted (22)
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+5
-13
@@ -3001,7 +3001,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Formation", // train yourself
|
||||
L"Milice mobile",
|
||||
L"Train workers", // TODO.Translate
|
||||
L"Entraîneur", // train your teammates
|
||||
L"Élève", // be trained by an instructor
|
||||
@@ -4246,7 +4245,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Niveau ", // the training level of civilians in this town
|
||||
L"Formation ", // 10 // state of civilian training in town
|
||||
L"Milice ", // the state of the trained civilians in the town
|
||||
L"Formation mobile ", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
|
||||
|
||||
// Flugente: prisoner texts // TODO.Translate
|
||||
L"Prisonnier ",
|
||||
@@ -4363,7 +4361,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Espace aérien (|A)",
|
||||
L"Objets (|I)",
|
||||
L"Milice & Ennemis (|Z)",
|
||||
L"Montrer la milice mobile |Restrictions", // HEADROCK HAM 4: Mobile Restrictions Button
|
||||
L"Show Disease Data", // TODO.Translate
|
||||
L"Show Weather", // TODO.Translate
|
||||
};
|
||||
@@ -6250,10 +6247,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"Le mercenaire a un contrat déterminé.",
|
||||
L"Ce mercenaire n'est pas assuré.",
|
||||
L"Écran carte", // 24
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"Vous n'avez actuellement aucune milice mobile. Retournez à ce mode du vue quand vous en aurez recruté.",
|
||||
L"Cette vue montre où votre milice mobile peut aller ou pas. Gris = La milice mobile refuse d'y aller. ROUGE = La milice mobile peut y aller, mais vous avez dit de ne pas y aller. JAUNE = La milice mobile peut entrer dans ce secteur, mais ne peut pas en sortir. VERT = la milice mobile peut y aller librement. Clic droit sur un secteur vert/jaune/rouge pour changer de couleur.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does TODO.Translate
|
||||
L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
|
||||
@@ -6275,25 +6269,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Êtes-vous d'accord ?", // asking player if they wish to pay the amount requested
|
||||
L"Vous n'en avez pas les moyens.", // telling the player they can't afford to train this town
|
||||
L"Voulez-vous poursuivre l'entraînement de la milice à %s (%s %d) ?", // continue training this town?
|
||||
|
||||
L"Coût $ ", // the cost in dollars to train militia
|
||||
L"(O/N)", // abbreviated oui/non
|
||||
L"", // unused
|
||||
L"L'entraînement des milices dans %d secteurs vous coûtera %d $. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"Vous ne pouvez pas payer les %d $ nécessaires à l'entraînement.",
|
||||
L"Vous ne pouvez poursuivre l'entraînement de la milice à %s que si cette ville est à niveau de loyauté de %d pour cent.",
|
||||
L"Vous ne pouvez plus entraîner de milice à %s.",
|
||||
L"Yous ne pouvez pas payer les %d $ nécessaires à l'entraînement de la milice mobile.", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Voulez-vous poursuivre l'entraînement de la milice mobile à %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"L'entraînement des milices mobiles dans %d secteurs vous coûtera %d $. %s", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"L'entraînement de la milice mobile vous coûtera $ ", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Vous ne pouvez plus former de milice mobile, car le maximum est atteint (%d/%d). Vous devez d'abord %s pour continuer.",
|
||||
L"libérer plus de secteurs d'une ville",
|
||||
|
||||
L"libérer de nouveaux secteurs d'une ville",
|
||||
L"libérer plus de villes",
|
||||
L"reprendre vos secteurs perdus",
|
||||
L"progresser dans votre avancée",
|
||||
|
||||
L"recruter plus de rebelles",
|
||||
L"Le chef de la milice informe que %d compagnon(s) ont fui face à l'ennemi dans le secteur %s.",
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+6
-14
@@ -2997,7 +2997,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Üben", // train yourself
|
||||
L"Mobile Miliz",
|
||||
L"Train workers", // TODO.Translate
|
||||
L"Trainer", // train your teammates
|
||||
L"Rekrut", // be trained by an instructor
|
||||
@@ -4240,7 +4239,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Level", // the training level of civilians in this town
|
||||
L"Zivilistentraining", // 10 // state of civilian training in town
|
||||
L"Miliz", // the state of the trained civilians in the town
|
||||
L"Mobile M. Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town
|
||||
|
||||
// Flugente: prisoner texts
|
||||
L"Gefangene",
|
||||
@@ -4349,9 +4347,8 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Luftr|aum zeigen",
|
||||
L"Gegenstände zeigen (|I)",
|
||||
L"Mili|z & Feinde zeigen",
|
||||
L"Zeige Mobile Miliz Begrenzungen (|R)", // HEADROCK HAM 4: Mobile Restrictions Button
|
||||
L"Show Disease Data", // TODO.Translate
|
||||
L"Show Weather", // TODO.Translate
|
||||
L"Zeige Wetter",
|
||||
};
|
||||
|
||||
STR16 pMapScreenInvenButtonHelpText[] =
|
||||
@@ -6090,10 +6087,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"Söldner hat begrenzten Vertrag.",
|
||||
L"Vertrag des Söldners beinhaltet keine Versicherung.",
|
||||
L"Kartenübersicht", // 24
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"Sie haben derzeit keine Mobile Miliz. Rekrutieren Sie einige Milizen und kehren Sie zurück zu dieser Ansicht.",
|
||||
L"Diese Ansicht zeigt Ihnen, wo Ihre Mobile Miliz ins feindliche Gebiet vorrücken kann. GRAU = Mobile Miliz verweigern hier vorzurücken. ROT = Mobile Miliz kann hier vorrücken, aber Sie haben den Befehl nicht gegeben. GELB = Mobile Miliz kann in den Sektor vorrücken, aber nicht verlassen. GRÜN = Mobile Miliz kann sich hier frei bewegen. Rechtsklick auf einen GRÜNEN / GELBEN Bereich um das Verhalten der Miliz zu ändern.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does TODO.Translate
|
||||
L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
|
||||
@@ -6114,25 +6108,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Ausgabe genehmigen?", // asking player if they wish to pay the amount requested
|
||||
L"Sie haben nicht genug Geld.", // telling the player they can't afford to train this town
|
||||
L"Miliz in %s (%s %d) weitertrainieren?", // continue training this town?
|
||||
|
||||
L"Preis $", // the cost in dollars to train militia
|
||||
L"( J/N )", // abbreviated yes/no
|
||||
L"Miliz auf dem Raketenstützpunkt im Sektor %s (%s %d) weitertrainieren?", // continue trainign militia in SAM site sector
|
||||
L"Milizen in %d Sektoren zu trainieren kostet $ %d. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"Sie können sich keine $%d für die Miliz hier leisten.",
|
||||
L"%s benötigt eine Loyalität von %d Prozent, um mit dem Milizen-Training fortzufahren.",
|
||||
L"Sie können die Miliz in %s nicht mehr trainieren.",
|
||||
L"Sie können sich keine $%d für mobile Miliz hier leisten.", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Mobile Milizen in %s (%s %d) weitertrainieren?", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Mobile Milizen in %d Sektoren zu trainieren kostet $ %d. %s", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Eine mobile Milizeinheit für diese Stadt zu trainieren kostet $", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Sie können keine weiteren mobilen Milizen ausbilden, da das Maximum erreicht wurde (%d/%d). Sie müssen zunächst %s um weitere zu trainieren.",
|
||||
L"weitere Stadtteile befreien",
|
||||
|
||||
L"neue Stadtteile befreien",
|
||||
L"mehr Städte erobern",
|
||||
L"den verlorenen Fortschritt wieder aufholen",
|
||||
L"weiter fortschreiten",
|
||||
|
||||
L"mehr Rebellen rekrutieren",
|
||||
L"Der Miliztruppführer muss Sie leider darüber informieren, dass %d Mitstreiter im Angesicht des Feindes desertierten im Sektor %s.",
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+6
-14
@@ -2988,8 +2988,7 @@ STR16 pAttributeMenuStrings[] =
|
||||
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Allenati", // train yourself
|
||||
L"Mobile Militia", // TODO.Translate
|
||||
L"Allenati", // train yourself
|
||||
L"Train workers", // TODO.Translate
|
||||
L"Allenatore", // train your teammates
|
||||
L"Studente", // be trained by an instructor
|
||||
@@ -4236,7 +4235,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Livello", // the training level of civilians in this town
|
||||
L"addestramento civili", // 10 // state of civilian training in town
|
||||
L"Esercito", // the state of the trained civilians in the town
|
||||
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
|
||||
|
||||
// Flugente: prisoner texts // TODO.Translate
|
||||
L"Prisoners",
|
||||
@@ -4353,7 +4351,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Mostra spazio |aereo",
|
||||
L"Mostra oggett|i",
|
||||
L"Mostra esercito & nemici (|Z)",
|
||||
L"Show Mobile Militia |Restrictions", // HEADROCK HAM 4: Mobile Restrictions Button // TODO.Translate
|
||||
L"Show Disease Data", // TODO.Translate
|
||||
L"Show Weather", // TODO.Translate
|
||||
};
|
||||
@@ -6228,10 +6225,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"%s è pieno di soldati.",
|
||||
L"Il mercenario ha un contratto a tempo determinato.",
|
||||
L"Il contratto del mercenario non è assicurato",
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"You currently have no Mobile Militia. Return to this view mode once you've recruited some.",
|
||||
L"This view shows where your Mobile Militia can and cannot go. GREY = Mobile Militia refuse to go here. RED = Mobile Militia can go here, but you've told them not to. YELLOW = Mobile Militia can enter this sector, but not leave. GREEN = Mobile Militia can go here freely. Right click a Green/Yellow sector to cycle its behavior.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does TODO.Translate
|
||||
L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
|
||||
@@ -6253,25 +6247,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Approvate la spesa?", // asking player if they wish to pay the amount requested
|
||||
L"Non potete permettervelo.", // telling the player they can't afford to train this town
|
||||
L"Continuate ad aeddestrare i soldati in %s (%s %d)?", // continue training this town?
|
||||
|
||||
L"Costo $", // the cost in dollars to train militia
|
||||
L"(S/N)", // abbreviated yes/no
|
||||
L"", // unused
|
||||
L"Addestrare l'esrecito cittadino nei settori di %d costerà $ %d. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"Non potete permettervi il $%d per addestrare l'esercito cittadino qui.",
|
||||
L"%s ha bisogno di una percentuale di %d affinché possiate continuare ad addestrare i soldati.",
|
||||
L"Non potete più addestrare i soldati a %s.",
|
||||
L"You cannot afford the $%d to train mobile militia here.", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"Continue training mobile militia in %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"Training mobile militia in %d sectors will cost $ %d. %s", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"Training a squad of mobile militia will cost $", // HEADROCK HAM 3.6: Mobile Militia // TODO.Translate
|
||||
L"You cannot train more mobile militia because the maximum is reached (%d/%d). You have to %s first in order to train more.", // TODO.Translate
|
||||
L"liberate more town sectors", // TODO.Translate
|
||||
|
||||
L"liberate new town sectors", // TODO.Translate
|
||||
L"liberate more towns", // TODO.Translate
|
||||
L"regain your lost progress", // TODO.Translate
|
||||
L"progress further", // TODO.Translate
|
||||
|
||||
L"recruit more rebels", // TODO.Translate
|
||||
L"The militia team leader has to inform you that %d fellow have deserted facing enemy in sector %s.", // TODO.Translate
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+5
-13
@@ -2999,7 +2999,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Praktyka", // train yourself
|
||||
L"Mobile Militia", // TODO.Translate
|
||||
L"Train workers", // TODO.Translate
|
||||
L"Instruktor", // train your teammates
|
||||
L"Uczeń", // be trained by an instructor
|
||||
@@ -4247,7 +4246,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Poziom", // the training level of civilians in this town
|
||||
L"Szkolenie cywili", // 10 // state of civilian training in town
|
||||
L"Samoobrona", // the state of the trained civilians in the town
|
||||
L"Mobile Training", // HEADROCK HAM 3.6: The stat of Mobile militia training in town // TODO.Translate
|
||||
|
||||
// Flugente: prisoner texts // TODO.Translate
|
||||
L"Prisoners",
|
||||
@@ -4364,7 +4362,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Pokaż przestrzeń powietrzną (|A)",
|
||||
L"Pokaż przedmioty (|I)",
|
||||
L"Pokaż samoobronę i wrogów (|Z)",
|
||||
L"Show Mobile Militia |Restrictions", // HEADROCK HAM 4: Mobile Restrictions Button // TODO.Translate
|
||||
L"Show Disease Data", // TODO.Translate
|
||||
L"Show Weather", // TODO.Translate
|
||||
};
|
||||
@@ -6246,10 +6243,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"Najemnik ma kontrakt na określony czas.",
|
||||
L"Kontrakt najemnika nie jest ubezpieczony",
|
||||
L"Mapa", // 24
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"You currently have no Mobile Militia. Return to this view mode once you've recruited some.",
|
||||
L"This view shows where your Mobile Militia can and cannot go. GREY = Mobile Militia refuse to go here. RED = Mobile Militia can go here, but you've told them not to. YELLOW = Mobile Militia can enter this sector, but not leave. GREEN = Mobile Militia can go here freely. Right click a Green/Yellow sector to cycle its behavior.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does TODO.Translate
|
||||
L"This view shows in which sectors disease has broken out. The number indicates the mean magnitude of infection per person, the colour indicates how widespread it is. GREY= No disease known of. GREEN to RED = escalating levels of infection.",
|
||||
|
||||
@@ -6271,25 +6265,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Zatwierdzasz wydatek?", // asking player if they wish to pay the amount requested
|
||||
L"Nie stać cię na to.", // telling the player they can't afford to train this town
|
||||
L"Kontynuować szkolenie samoobrony w - %s (%s %d)?", // continue training this town?
|
||||
|
||||
L"Koszt $", // the cost in dollars to train militia
|
||||
L"( T/N )", // abbreviated yes/no
|
||||
L"", // unused
|
||||
L"Szkolenie samoobrony w %d sektorach będzie kosztowało $ %d. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"Nie masz %d$, aby wyszkolić samoobronę w tym mieście.",
|
||||
L"%s musi mieć %d% lojalności, aby można było kontynuować szkolenie samoobrony.",
|
||||
L"Nie możesz już dłużej szkolić samoobrony w mieście %s.",
|
||||
L"Nie masz %d$ i nie możesz trenować tutaj ruchomej samoobrony.", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Kontynuuj trening ruchomej samoobrony w %s (%s %d)?", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Trenowanie ruchomej samoobrony w %d sektorach będzie kosztować %d$. %s", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"Trenowanie ruchomej samoobrony będzie kosztować $", // HEADROCK HAM 3.6: Mobile Militia
|
||||
L"You cannot train more mobile militia because the maximum is reached (%d/%d). You have to %s first in order to train more.", // TODO.Translate
|
||||
L"liberate more town sectors", // TODO.Translate
|
||||
|
||||
L"liberate new town sectors", // TODO.Translate
|
||||
L"liberate more towns", // TODO.Translate
|
||||
L"regain your lost progress", // TODO.Translate
|
||||
L"progress further", // TODO.Translate
|
||||
|
||||
L"recruit more rebels", // TODO.Translate
|
||||
L"The militia team leader has to inform you that %d fellow have deserted facing enemy in sector %s.", // TODO.Translate
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
+5
-13
@@ -2993,7 +2993,6 @@ STR16 pAttributeMenuStrings[] =
|
||||
STR16 pTrainingMenuStrings[] =
|
||||
{
|
||||
L"Практика", // train yourself
|
||||
L"Патрульные",
|
||||
L"Рабочие", // Train workers
|
||||
L"Тренер", // train your teammates
|
||||
L"Ученик", // be trained by an instructor
|
||||
@@ -4240,7 +4239,6 @@ STR16 pwTownInfoStrings[] =
|
||||
L"Уровень", // the training level of civilians in this town
|
||||
L"Тренировка ополчения", // 10 // state of civilian training in town
|
||||
L"Ополчение", // the state of the trained civilians in the town
|
||||
L"Тренировка патруля", // HEADROCK HAM 3.6: The stat of Mobile militia training in town //Mobile Training
|
||||
|
||||
// Flugente: prisoner texts
|
||||
L"Заключенные",
|
||||
@@ -4357,7 +4355,6 @@ STR16 pMapScreenBorderButtonHelpText[] =
|
||||
L"Карта воздушного пространства (|A)",
|
||||
L"Вещи (|I)",
|
||||
L"Ополчение и враги (|Z)",
|
||||
L"Патруль ополчения (|R)", // HEADROCK HAM 4: Mobile Restrictions Button
|
||||
L"Очаги заболеваний",
|
||||
L"Погода",
|
||||
};
|
||||
@@ -6238,10 +6235,7 @@ STR16 zMarksMapScreenText[] =
|
||||
L"У наёмника ограниченный контракт.",
|
||||
L"Контракт наёмника не застрахован",
|
||||
L"Стратегическая карта",
|
||||
// HEADROCK HAM 4: Prompt messages when turning on Mobile Militia Restrictions view.
|
||||
L"Сейчас у вас нет патрульных групп. Включите этот режим в следующий раз, когда наберёте их.",
|
||||
L"Здесь показано, куда может пройти патруль, и куда нет. СЕРЫЙ = не пойдут туда. КРАСНЫЙ = могут пойти туда, но вы запретили им. ЖЁЛТЫЙ = могут вступить в сектор, но не могут его покинуть. ЗЕЛЁНЫЙ = могут свободно передвигаться. Нажатием правой кнопки мыши можно менять цветовой статус сектора.",
|
||||
|
||||
|
||||
// Flugente: disease texts describing what a map view does
|
||||
L"Здесь показаны вспышки заболеваний по секторам. Число указывает средний показатель инфекции на человека, цвет - насколько широко распространена инфекция. СЕРЫЙ= нет информации о заболеваемости. ЗЕЛЁНЫЙ - КРАСНЫЙ = уровень роста заболеваемости.",
|
||||
|
||||
@@ -6263,25 +6257,23 @@ STR16 pMilitiaConfirmStrings[] =
|
||||
L"Подтвердить платеж?", // asking player if they wish to pay the amount requested
|
||||
L"Вы не можете себе этого позволить.", // telling the player they can't afford to train this town
|
||||
L"Продолжить тренировку в %s (%s %d)?", // continue training this town?
|
||||
|
||||
L"Цена $", // the cost in dollars to train militia
|
||||
L"( Д/Н )", // abbreviated yes/no
|
||||
L"", // unused
|
||||
L"Тренировка ополчения в секторе %d будет стоить $%d. %s", // cost to train sveral sectors at once
|
||||
|
||||
L"У вас нет $%d, чтобы приступить к тренировке ополчения.",
|
||||
L"%s: Требуется не менее %d процентов лояльности, чтобы продолжить тренировку ополчения.",
|
||||
L"Больше вы не можете тренировать ополчение в %s.",
|
||||
L"У вас нет $%d чтобы тренировать здесь патрульные подразделение.",
|
||||
L"Продолжить тренировку патруля в %s (%s %d)?",
|
||||
L"Тренировка патрульного подразделения в секторе %d обойдётся в $ %d. %s",
|
||||
L"Тренировка патрульного подразделения обойдётся в $",
|
||||
L"Вы не можете больше тренировать патруль, так как достигнут максимум (%d/%d). Вам необходимо сначала %s для того, чтобы продложить тренировку.",
|
||||
L"освободить больше городских секторов",
|
||||
|
||||
L"освободить новые городские сектора",
|
||||
L"освободить больше городов",
|
||||
L"восстановить потерянные прогресс",
|
||||
L"продвинуться дальше",
|
||||
|
||||
L"нанять больше повстанцев",
|
||||
L"Лидер ополченцев сообщает вам, что %d человек дезертировали перед лицом противника %s.",
|
||||
};
|
||||
|
||||
//Strings used in the popup box when withdrawing, or depositing money from the $ sign at the bottom of the single merc panel
|
||||
|
||||
Reference in New Issue
Block a user