(svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables.

This commit is contained in:
frosch
2012-12-05 19:34:45 +00:00
parent 5b2da98ca3
commit a499435351
10 changed files with 60 additions and 41 deletions

View File

@@ -294,10 +294,10 @@ int ScriptInfo::GetSettingDefaultValue(const char *name) const
if (strcmp((*it).name, name) != 0) continue;
/* The default value depends on the difficulty level */
switch (GetGameSettings().difficulty.diff_level) {
case 0: return (*it).easy_value;
case 1: return (*it).medium_value;
case 2: return (*it).hard_value;
case 3: return (*it).custom_value;
case SP_EASY: return (*it).easy_value;
case SP_MEDIUM: return (*it).medium_value;
case SP_HARD: return (*it).hard_value;
case SP_CUSTOM: return (*it).custom_value;
default: NOT_REACHED();
}
}