(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)
This commit is contained in:
Darkvater
2006-03-02 01:41:25 +00:00
parent 903c3aa63d
commit 4412871e5c
3 changed files with 153 additions and 278 deletions

View File

@@ -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 */