Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company

This commit is contained in:
rubidium42
2021-05-18 20:57:44 +02:00
committed by rubidium42
parent db54e20825
commit 8ffb4122df
6 changed files with 54 additions and 83 deletions

View File

@@ -123,9 +123,9 @@ struct SettingDesc {
* offset in a certain struct */
typedef SettingDesc SettingDescGlobVarList;
const SettingDesc *GetSettingFromName(const char *name, uint *i);
bool SetSettingValue(uint index, int32 value, bool force_newgame = false);
bool SetSettingValue(uint index, const char *value, bool force_newgame = false);
void SetCompanySetting(uint index, int32 value);
const SettingDesc *GetSettingFromName(const char *name);
bool SetSettingValue(const SettingDesc *sd, int32 value, bool force_newgame = false);
bool SetSettingValue(const SettingDesc *sd, const char *value, bool force_newgame = false);
uint GetSettingIndex(const SettingDesc *sd);
#endif /* SETTINGS_INTERNAL_H */