New Feature: Added up to 15 game difficulty settings (by Jazz)

- Externalized the difficulty setings to "TableData\DifficultySettings.xml" file
- Some INI Settings (ja2_options.ini, CTHConstants.ini and Creature_Settings.ini) moved from INI file to this xml file
- see #define DIFFICULTY_SETTING

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-08-28 10:30:40 +00:00
parent 6b728e56ac
commit 344797f6af
47 changed files with 1976 additions and 49 deletions
+14 -1
View File
@@ -75,6 +75,10 @@
#include "Vehicles.h"
#ifdef DIFFICULTY_SETTING
#include "GameInitOptionsScreen.h"
#endif
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
class SOLDIERTYPE;
@@ -5651,6 +5655,10 @@ void HandleRadioScanInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
return;
UINT8 normalgroupsize = 0;
#ifdef DIFFICULTY_SETTING
normalgroupsize = zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
#else
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
@@ -5667,6 +5675,7 @@ void HandleRadioScanInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
normalgroupsize = gGameExternalOptions.ubMinEnemyGroupSizeInsane;
break;
}
#endif
normalgroupsize *= 2;
@@ -5997,6 +6006,10 @@ void HandleGatheringInformationBySoldier( SOLDIERTYPE* pSoldier )
}
UINT16 usNormalGroupSize = 0;
#ifdef DIFFICULTY_SETTING
usNormalGroupSize = zDeffSetting[gGameOptions.ubDifficultyLevel].iMinEnemyGroupSize;
#else
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
@@ -6013,7 +6026,7 @@ void HandleGatheringInformationBySoldier( SOLDIERTYPE* pSoldier )
usNormalGroupSize = gGameExternalOptions.ubMinEnemyGroupSizeInsane;
break;
}
#endif
usNormalGroupSize *= 2;
FLOAT fBaseChance = ( EffectiveLeadership(pSoldier) + EffectiveWisdom(pSoldier) + EffectiveExpLevel(pSoldier) * 10 ) / 3000.0f;