summaryrefslogtreecommitdiff
path: root/settings.h
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-03-02 01:41:25 +0000
committerDarkvater <Darkvater@openttd.org>2006-03-02 01:41:25 +0000
commit2269685c23c07d265e0d539d225e916209462520 (patch)
tree79d987885acc57b06525b224bd2eb12a17f9cf5c /settings.h
parenta9d33943d734671990920fc093d0025845479370 (diff)
downloadopenttd-2269685c23c07d265e0d539d225e916209462520.tar.xz
(svn r3722) - [4/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. The last part finishes the transition with the merging of the settings_gui table(s).
- Because patches are (will be in a few commits) saved, you cannot specify the order of the GUI-items in the SettingDesc tables themselves. Doing so would mean messing around with the savegame-version, or doing expensive lookups. So the GUI-tables are now just simple indeces into the original table. No more is needed since that table contains all information - The only change in functionality is that the stepsize has been automated. It is calculated from the minimum and maximum values such that within 50 clicks you will have gone from one end to the other if scrolling. - The GUI has kept its flags intact. These are: SGF_0ISDISABLED: the variable might have a domain higher than zero, but a special value of nul is used as telling that feature is disabled. SGF_NOCOMMA: represent the number without any thousand-seperators SGF_MULTISTRING: internally the variable is a number, but its representation is a string based on a simple offset. SGF_NETWORK_ONLY: this setting can only be changed during network games SGF_CURRENCY: the variable represents money and will be shown in the local currency - - NOTE! The game is not compilable after this commit (because console hooks have not been updated)
Diffstat (limited to 'settings.h')
-rw-r--r--settings.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/settings.h b/settings.h
index eb5117101..0969ffe47 100644
--- a/settings.h
+++ b/settings.h
@@ -76,5 +76,7 @@ static inline void *ini_get_variable(const SaveLoad *sld, const void *object)
void IConsoleSetPatchSetting(const char *name, const char *value);
void IConsoleGetPatchSetting(const char *name);
+const SettingDesc *GetSettingDescription(uint index);
+void SetPatchValue(uint index, const Patches *object, int32 value);
#endif /* SETTINGS_H */