settings_func.h File Reference

Functions related to setting/changing the settings. More...

#include "core/smallvec_type.hpp"

Go to the source code of this file.

Typedefs

typedef AutoFreeSmallVector
< char *, 4 > 
GRFPresetList

Functions

void IConsoleSetSetting (const char *name, const char *value)
void IConsoleSetSetting (const char *name, int32 value)
void IConsoleGetSetting (const char *name)
 Output value of a specific setting to the console.
void IConsoleListSettings (const char *prefilter)
 List all settings and their value to the console.
void LoadFromConfig ()
 Load the values from the configuration files.
void SaveToConfig ()
 Save the values to the configuration file.
void CheckConfig ()
void GetGRFPresetList (GRFPresetList *list)
struct GRFConfigLoadGRFPresetFromConfig (const char *config_name)
void SaveGRFPresetToConfig (const char *config_name, struct GRFConfig *config)
void DeleteGRFPresetFromConfig (const char *config_name)
uint GetCompanySettingIndex (const char *name)
 Get the index in the _company_settings array of a setting.
void SetDefaultCompanySettings (CompanyID cid)
 Set the company settings for a new company to their default values.
static void SyncCompanySettings ()


Detailed Description

Functions related to setting/changing the settings.

Definition in file settings_func.h.


Function Documentation

uint GetCompanySettingIndex ( const char *  name  ) 

Get the index in the _company_settings array of a setting.

Parameters:
name The name of the setting
Returns:
The index in the _company_settings array

Definition at line 1615 of file settings.cpp.

References GetSettingFromName(), and SGF_PER_COMPANY.

Referenced by AIGroup::EnableWagonRemoval(), ReplaceVehicleWindow::OnClick(), AICompany::SetAutoRenewMoney(), AICompany::SetAutoRenewMonths(), and AICompany::SetAutoRenewStatus().

void IConsoleGetSetting ( const char *  name  ) 

Output value of a specific setting to the console.

Parameters:
name Name of the setting to output its value

Definition at line 1726 of file settings.cpp.

References GetSettingFromName(), GetVariableAddress(), IConsolePrintF(), ReadValue(), SDT_BOOLX, SDT_STRING, and SGF_0ISDISABLED.

void IConsoleListSettings ( const char *  prefilter  ) 

List all settings and their value to the console.

Parameters:
prefilter If not NULL, only list settings with names that begin with prefilter prefix

Definition at line 1759 of file settings.cpp.

References GetVariableAddress(), IConsolePrintF(), lengthof, min(), ReadValue(), SDT_BOOLX, SDT_STRING, and SlIsObjectCurrentlyValid().


Generated on Sat Dec 26 20:06:14 2009 for OpenTTD by  doxygen 1.5.6