summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-05-30 13:16:51 +0000
committeralberth <alberth@openttd.org>2010-05-30 13:16:51 +0000
commit2224c9b515b2e63b7268221905772770352e5425 (patch)
tree16ee342254a2b3d8253f09ff1bbafad9c642334f /src/settings.cpp
parent51e67a40e09b6fba154704e89c5ea5462c7552cb (diff)
downloadopenttd-2224c9b515b2e63b7268221905772770352e5425.tar.xz
(svn r19910) -Doc: Doxygen additions.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 71bdf9e2b..b60675e5a 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1464,6 +1464,10 @@ void SaveToConfig()
delete ini;
}
+/**
+ * Get the list of known NewGrf presets.
+ * @param list[inout] Pointer to list for storing the preset names.
+ */
void GetGRFPresetList(GRFPresetList *list)
{
list->Clear();
@@ -1479,6 +1483,12 @@ void GetGRFPresetList(GRFPresetList *list)
delete ini;
}
+/**
+ * Load a NewGRF configuration by preset-name.
+ * @param config_name Name of the preset.
+ * @return NewGRF configuration.
+ * @see GetGRFPresetList
+ */
GRFConfig *LoadGRFPresetFromConfig(const char *config_name)
{
char *section = (char*)alloca(strlen(config_name) + 8);
@@ -1491,6 +1501,12 @@ GRFConfig *LoadGRFPresetFromConfig(const char *config_name)
return config;
}
+/**
+ * Save a NewGRF configuration with a preset name.
+ * @param config_name Name of the preset.
+ * @param config NewGRF configuration to save.
+ * @see GetGRFPresetList
+ */
void SaveGRFPresetToConfig(const char *config_name, GRFConfig *config)
{
char *section = (char*)alloca(strlen(config_name) + 8);
@@ -1502,6 +1518,10 @@ void SaveGRFPresetToConfig(const char *config_name, GRFConfig *config)
delete ini;
}
+/**
+ * Delete a NewGRF configuration by preset name.
+ * @param config_name Name of the preset.
+ */
void DeleteGRFPresetFromConfig(const char *config_name)
{
char *section = (char*)alloca(strlen(config_name) + 8);