diff options
author | Darkvater <darkvater@openttd.org> | 2006-03-01 23:53:20 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-03-01 23:53:20 +0000 |
commit | 1e247cab2127acfb42976f24645d360f9906e013 (patch) | |
tree | e944f27325635c837de8daa350f4401f58e0b6d0 /saveload.h | |
parent | a98e66c2c05e26affaf46f488f1b8782b8e2c3d5 (diff) | |
download | openttd-1e247cab2127acfb42976f24645d360f9906e013.tar.xz |
(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.
- This unified structure consists of a SaveLoad type which stores all data relevant about the variable internals such as type, mem/filesize, address, version-control. The SettingDesc type is concerned more about the representation. Things like default value, string-name, minimum/maximum values, gui-behaviour etc.
- The SaveLoad type has received a few flags controlling saving/loading. These are:
SLF_SAVE_NO: the setting is not saved with the savegame, effectively making this setting player-based. Eg. it will NOT be overwritten when joining a network-game
SLF_CONFIG_NO: the setting is not saved to the configuration file so you cannot overwrite it ingame.
SLF_NETWORK_NO: the setting is not synchronised with the local settings when the game is loaded during network-play. Note that when SLF_SAVE_NO is set, SLF_NETWORK_NO is also set (which is logical), at least if the proper macros are used (in [2/4]).
- NOTE! The game is not compilable after this commit.
Diffstat (limited to 'saveload.h')
-rw-r--r-- | saveload.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/saveload.h b/saveload.h index df2165d94..e56d25876 100644 --- a/saveload.h +++ b/saveload.h @@ -126,6 +126,13 @@ enum VarTypes { SLE_INT = SLE_INT32, SLE_STRB = SLE_STRINGBUF, SLE_STRQ = SLE_STRINGQUOTE, + + /* 8 bytes allocated for a maximum of 8 flags + * Flags directing saving/loading of a variable */ + SLF_SAVE_NO = 1 << 8, ///< do not save with savegame, basically player-based + SLF_CONFIG_NO = 1 << 9, ///< do not save to config file + SLF_NETWORK_NO = 1 << 10, ///< do not synchronize over network (but it is saved if SSF_SAVE_NO is not set) + /* 5 more possible flags */ }; typedef uint32 VarType; |