author | rubidium |
Thu, 18 Dec 2008 12:23:08 +0000 | |
changeset 10436 | 8d3a9fbe8f19 |
parent 9893 | bd16f5239fa4 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
8208
3d0590aa2124
(svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents:
8131
diff
changeset
|
3 |
/** @file settings_func.h Functions related to setting/changing the settings. */ |
3115
24c7e92baa31
(svn r3719) - [1/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. This first part rewrites the configuration section to use the SaveLoad VarType in general.
Darkvater
parents:
3020
diff
changeset
|
4 |
|
8208
3d0590aa2124
(svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents:
8131
diff
changeset
|
5 |
#ifndef SETTINGS_FUNC_H |
3d0590aa2124
(svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents:
8131
diff
changeset
|
6 |
#define SETTINGS_FUNC_H |
3888
3cbfc7edbc2b
(svn r4944) Codechange: make _patches_newgame available via settings.h and remove instances of extern Patches _patches_newgame in .c files
rubidium
parents:
3584
diff
changeset
|
7 |
|
9677
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
8 |
#include "core/smallvec_type.hpp" |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
9 |
|
9426
a77c8a4abcf5
(svn r13341) -Codechange: make most of the network settings configurable via the patch command.
rubidium
parents:
9373
diff
changeset
|
10 |
void IConsoleSetPatchSetting(const char *name, const char *value); |
a77c8a4abcf5
(svn r13341) -Codechange: make most of the network settings configurable via the patch command.
rubidium
parents:
9373
diff
changeset
|
11 |
void IConsoleSetPatchSetting(const char *name, int32 value); |
1739
4c8fb3905cbd
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
759
diff
changeset
|
12 |
void IConsoleGetPatchSetting(const char *name); |
9893
bd16f5239fa4
(svn r14041) -Feature(tte): make it possible to filter list_patches output like it's done for other list_* console commands
glx
parents:
9677
diff
changeset
|
13 |
void IConsoleListPatches(const char *prefilter); |
1739
4c8fb3905cbd
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
759
diff
changeset
|
14 |
|
8131
160939e24ed3
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
rubidium
parents:
7901
diff
changeset
|
15 |
void LoadFromConfig(); |
160939e24ed3
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
rubidium
parents:
7901
diff
changeset
|
16 |
void SaveToConfig(); |
160939e24ed3
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
rubidium
parents:
7901
diff
changeset
|
17 |
void CheckConfig(); |
160939e24ed3
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
rubidium
parents:
7901
diff
changeset
|
18 |
|
9677
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
19 |
/* Functions to load and save NewGRF settings to a separate |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
20 |
* configuration file, used for presets. */ |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
21 |
typedef AutoFreeSmallVector<char *, 4> GRFPresetList; |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
22 |
|
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
23 |
void GetGRFPresetList(GRFPresetList *list); |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
24 |
struct GRFConfig *LoadGRFPresetFromConfig(const char *config_name); |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
25 |
void SaveGRFPresetToConfig(const char *config_name, struct GRFConfig *config); |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
26 |
void DeleteGRFPresetFromConfig(const char *config_name); |
4767b9937c04
(svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file.
peter1138
parents:
9426
diff
changeset
|
27 |
|
8208
3d0590aa2124
(svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents:
8131
diff
changeset
|
28 |
#endif /* SETTINGS_FUNC_H */ |