From 21bd2722cd89995370523385c213da32c8d47100 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 10 Feb 2010 16:24:05 +0000 Subject: (svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel --- src/settings.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index 63d13470d..42776fc0f 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -866,7 +866,10 @@ static bool DifficultyChange(int32) } if (((_game_mode == GM_MENU) ? _settings_newgame.difficulty : _settings_game.difficulty).max_no_competitors != 0 && - AI::GetInfoList()->size() == 0 && (!_networking || _network_server)) { +#ifdef ENABLE_AI + AI::GetInfoList()->size() == 0 && +#endif /* ENABLE_AI */ + (!_networking || _network_server)) { ShowErrorMessage(STR_WARNING_NO_SUITABLE_AI, INVALID_STRING_ID, 0, 0, true); } @@ -1145,6 +1148,7 @@ static void NewsDisplayLoadConfig(IniFile *ini, const char *grpname) static void AILoadConfig(IniFile *ini, const char *grpname) { +#ifdef ENABLE_AI IniGroup *group = ini->GetGroup(grpname); IniItem *item; @@ -1169,6 +1173,7 @@ static void AILoadConfig(IniFile *ini, const char *grpname) } if (item->value != NULL) config->StringToSettings(item->value); } +#endif /* ENABLE_AI */ } /* Load a GRF configuration from the given group name */ @@ -1254,6 +1259,7 @@ static void NewsDisplaySaveConfig(IniFile *ini, const char *grpname) static void AISaveConfig(IniFile *ini, const char *grpname) { +#ifdef ENABLE_AI IniGroup *group = ini->GetGroup(grpname); if (group == NULL) return; @@ -1274,6 +1280,7 @@ static void AISaveConfig(IniFile *ini, const char *grpname) IniItem *item = new IniItem(group, name, strlen(name)); item->SetValue(value); } +#endif /* ENABLE_AI */ } /** -- cgit v1.2.3-54-g00ecf