From a499435351fcb7b25e1e49e1366ebeac91636c35 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 5 Dec 2012 19:34:45 +0000 Subject: (svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables. --- src/script/script_config.cpp | 2 +- src/script/script_info.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script') diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index 7f41304d4..46f13cd0c 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -87,7 +87,7 @@ void ScriptConfig::ClearConfigList() int ScriptConfig::GetSetting(const char *name) const { /* Return default values if the difficulty is not set to Custom */ - if (GetGameSettings().difficulty.diff_level != 3) { + if (GetGameSettings().difficulty.diff_level != SP_CUSTOM) { return this->info->GetSettingDefaultValue(name); } diff --git a/src/script/script_info.cpp b/src/script/script_info.cpp index b5a83ccb2..94c977225 100644 --- a/src/script/script_info.cpp +++ b/src/script/script_info.cpp @@ -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(); } } -- cgit v1.2.3-54-g00ecf