- externalized game progress weights

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@765 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2007-03-10 17:13:23 +00:00
parent 1d00e73866
commit 9971b56b0e
4 changed files with 35 additions and 9 deletions
+19
View File
@@ -289,6 +289,12 @@ void InitGameOptions()
}
// WDS: These HAVE to total 100% at all times!!!
#define PROGRESS_PORTION_KILLS 25
#define PROGRESS_PORTION_CONTROL 25
#define PROGRESS_PORTION_INCOME 50
// Snap: Read options from an INI file in the default of custom Data directory
void LoadGameExternalOptions()
{
@@ -401,6 +407,19 @@ void LoadGameExternalOptions()
gGameExternalOptions.iPriceModifier = iniReader.ReadInteger("JA2 Gameplay Settings","PRICE_MODIFIER",10);
// WDS: Game progress
gGameExternalOptions.ubGameProgressPortionKills = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_KILLS",25);
gGameExternalOptions.ubGameProgressPortionControl = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_CONTROL",25);
gGameExternalOptions.ubGameProgressPortionIncome = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_INCOME",50);
// Any way to warn on this?
if (gGameExternalOptions.ubGameProgressPortionKills + gGameExternalOptions.ubGameProgressPortionControl + gGameExternalOptions.ubGameProgressPortionIncome != 100)
{
gGameExternalOptions.ubGameProgressPortionKills = 25;
gGameExternalOptions.ubGameProgressPortionControl = 25;
gGameExternalOptions.ubGameProgressPortionIncome = 50;
}
//Global game events
gGameExternalOptions.ubGameProgressStartMadlabQuest = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_START_MADLAB_QUEST",35);
gGameExternalOptions.ubGameProgressMikeAvailable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_MIKE_AVAILABLE",50);