(svn r15175) -Feature: Add the option to select the AIs to start in a new game and configure them via the gui.

This commit is contained in:
Yexo
2009-01-20 16:49:10 +00:00
parent 49c5c71348
commit 3d35b3c2cc
12 changed files with 581 additions and 36 deletions

View File

@@ -6,6 +6,7 @@
#define AI_CONFIG_HPP
#include <map>
#include "ai_info.hpp"
#ifndef AI_HPP
struct ltstr { bool operator()(const char *s1, const char *s2) const { return strcmp(s1, s2) < 0; } };
@@ -19,7 +20,8 @@ public:
AIConfig() :
name(NULL),
version(-1),
info(NULL)
info(NULL),
config_list(NULL)
{}
AIConfig(const AIConfig *config);
~AIConfig();
@@ -44,6 +46,11 @@ public:
*/
class AIInfo *GetInfo();
/**
* Get the config list for this AIConfig.
*/
const AIConfigItemList *GetConfigList();
/**
* Get the config of a company.
*/
@@ -63,6 +70,11 @@ public:
*/
void SetSetting(const char *name, int value);
/**
* Reset all settings to their default value.
*/
void ResetSettings();
/**
* Randomize all settings the AI requested to be randomized.
*/
@@ -100,6 +112,7 @@ private:
int version;
class AIInfo *info;
SettingValueList settings;
AIConfigItemList *config_list;
};
#endif /* AI_CONFIG_HPP */