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
+34 -2
View File
@@ -58,6 +58,10 @@
#include "Explosion Control.h"
#include "ub_config.h"
#ifdef DIFFICULTY_SETTING
#include "GameInitOptionsScreen.h"
#endif
//*******************************************************************
//
// Local Defines
@@ -1547,6 +1551,31 @@ void HandleJa25EnemyExpLevelModifier( )
}
}
break;
#ifdef DIFFICULTY_SETTING
default:
//Get the 2nd highest player exp level
bPlayerExpLevel = JA25SecondHighestExpLevelOnPlayersTeam( );
//get the enemies exp level
bEnemyExpLevel = JA25SecondHighestExpLevelOnEnemiesTeam( );
//get the difference b/n the 2
bDifference = bPlayerExpLevel - bEnemyExpLevel;
//if the players exp level is less then enemies
if( bDifference < 0 )
{
//if the difference
if( bDifference < JA25__MAX_EXP_DECREASE )
{
bDifference = JA25__MAX_EXP_DECREASE;
}
//Degrade all the enemies exp levels by difference
Ja25ScaleAllEnemiesByValue( bDifference );
}
break;
#endif
}
}
@@ -1798,7 +1827,10 @@ void HandleInitialEventsInHeliCrash()
UINT32 GetNumberOfTurnsPowerGenFanWillBeStoppedFor()
{
UINT32 uiNumTurns = PGF__NUM_TURNS_TILL_START_FAN_BACK_UP_EASY;
#ifdef DIFFICULTY_SETTING
uiNumTurns = zDeffSetting[gGameOptions.ubDifficultyLevel].iGetNumberOfTurnsPowerGenFanWillBeStoppedFor;
#else
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
@@ -1811,7 +1843,7 @@ UINT32 GetNumberOfTurnsPowerGenFanWillBeStoppedFor()
uiNumTurns = PGF__NUM_TURNS_TILL_START_FAN_BACK_UP_HARD;
break;
}
#endif
return( uiNumTurns );
}