--- a/src/settings.cpp Sun Apr 15 17:04:44 2007 +0000
+++ b/src/settings.cpp Sat Apr 21 08:23:57 2007 +0000
@@ -412,7 +412,7 @@
/** Find the set-integer value MANYofMANY type in a string
* @param many full domain of values the MANYofMANY setting can have
* @param str the current string value of the setting, each individual
- * of seperated by a whitespace\tab or | character
+ * of seperated by a whitespace,tab or | character
* @return the 'fully' set integer, or -1 if a set is not found */
static uint32 lookup_manyofmany(const char *many, const char *str)
{
@@ -682,7 +682,8 @@
* @param ini pointer to IniFile structure that holds administrative information
* @param sd pointer to SettingDesc structure whose internally pointed variables will
* be given values
- * @param grpname the group of the IniFile to search in for the new values */
+ * @param grpname the group of the IniFile to search in for the new values
+ * @param object pointer to the object been loaded */
static void ini_load_settings(IniFile *ini, const SettingDesc *sd, const char *grpname, void *object)
{
IniGroup *group;
@@ -752,6 +753,7 @@
* @param sd read-only SettingDesc structure which contains the unmodified,
* loaded values of the configuration file and various information about it
* @param grpname holds the name of the group (eg. [network]) where these will be saved
+ * @param object pointer to the object been saved
* The function works as follows: for each item in the SettingDesc structure we
* have a look if the value has changed since we started the game (the original
* values are reloaded when saving). If settings indeed have changed, we get
@@ -865,7 +867,7 @@
* The list parameter can be a NULL pointer, in this case nothing will be
* saved and a callback function should be defined that will take over the
* list-handling and store the data itself somewhere.
- * @param IniFile handle to the ini file with the source data
+ * @param ini IniFile handle to the ini file with the source data
* @param grpname character string identifying the section-header of the ini
* file that will be parsed
* @param list pointer to an string(pointer) array that will store the parsed
@@ -895,10 +897,10 @@
/** Saves all items from a list into the 'grpname' section
* The list parameter can be a NULL pointer, in this case a callback function
* should be defined that will provide the source data to be saved.
- * @param IniFile handle to the ini file where the destination data is saved
+ * @param ini IniFile handle to the ini file where the destination data is saved
* @param grpname character string identifying the section-header of the ini file
* @param list pointer to an string(pointer) array that will be used as the
- * source to be saved into the relevant ini section
+ * source to be saved into the relevant ini section
* @param len the maximum number of items available for the above list
* @param proc callback function that can will provide the source data if defined */
static void ini_save_setting_list(IniFile *ini, const char *grpname, char **list, uint len, SettingListCallbackProc proc)
@@ -1138,15 +1140,15 @@
const Patches *ptc = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches;
if (p1) {
- warning = ( (IS_INT_INSIDE(ptc->servint_trains, 5, 90+1) || ptc->servint_trains == 0) &&
- (IS_INT_INSIDE(ptc->servint_roadveh, 5, 90+1) || ptc->servint_roadveh == 0) &&
- (IS_INT_INSIDE(ptc->servint_aircraft, 5, 90+1) || ptc->servint_aircraft == 0) &&
- (IS_INT_INSIDE(ptc->servint_ships, 5, 90+1) || ptc->servint_ships == 0) );
+ warning = ( (IS_INT_INSIDE(ptc->servint_trains, 5, 90 + 1) || ptc->servint_trains == 0) &&
+ (IS_INT_INSIDE(ptc->servint_roadveh, 5, 90 + 1) || ptc->servint_roadveh == 0) &&
+ (IS_INT_INSIDE(ptc->servint_aircraft, 5, 90 + 1) || ptc->servint_aircraft == 0) &&
+ (IS_INT_INSIDE(ptc->servint_ships, 5, 90 + 1) || ptc->servint_ships == 0) );
} else {
- warning = ( (IS_INT_INSIDE(ptc->servint_trains, 30, 800+1) || ptc->servint_trains == 0) &&
- (IS_INT_INSIDE(ptc->servint_roadveh, 30, 800+1) || ptc->servint_roadveh == 0) &&
- (IS_INT_INSIDE(ptc->servint_aircraft, 30, 800+1) || ptc->servint_aircraft == 0) &&
- (IS_INT_INSIDE(ptc->servint_ships, 30, 800+1) || ptc->servint_ships == 0) );
+ warning = ( (IS_INT_INSIDE(ptc->servint_trains, 30, 800 + 1) || ptc->servint_trains == 0) &&
+ (IS_INT_INSIDE(ptc->servint_roadveh, 30, 800 + 1) || ptc->servint_roadveh == 0) &&
+ (IS_INT_INSIDE(ptc->servint_aircraft, 30, 800 + 1) || ptc->servint_aircraft == 0) &&
+ (IS_INT_INSIDE(ptc->servint_ships, 30, 800 + 1) || ptc->servint_ships == 0) );
}
if (!warning)
@@ -1278,7 +1280,7 @@
* and why not byte for example? */
SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, (SLE_FILE_I16 | SLE_VAR_I32), 0, 0, GameOptions, diff, 17, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 0, 3),
SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, (SLE_FILE_I16 | SLE_VAR_I32), 0, 0, GameOptions, diff, 18, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 4, SL_MAX_VERSION),
- SDT_VAR(GameOptions, diff_level,SLE_UINT8, 0, 0, 0, 0, 3, 0, STR_NULL, NULL),
+ SDT_VAR(GameOptions, diff_level, SLE_UINT8, 0, 0, 0, 0, 3, 0, STR_NULL, NULL),
SDT_OMANY(GameOptions, currency, SLE_UINT8, N, 0, 0, CUSTOM_CURRENCY_ID, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SIT|SEK|YTL|SKK|BRR|custom", STR_NULL, NULL, NULL),
SDT_OMANY(GameOptions, units, SLE_UINT8, N, 0, 1, 2, "imperial|metric|si", STR_NULL, NULL, NULL),
SDT_OMANY(GameOptions, town_name, SLE_UINT8, 0, 0, 0, 20, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian|catalan", STR_NULL, NULL, NULL),
@@ -1392,8 +1394,9 @@
SDT_VAR(Patches, ending_year, SLE_INT32,0,NC|NO,2051, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_PATCHES_ENDING_YEAR, NULL),
SDT_BOOL(Patches, smooth_economy, 0, 0, true, STR_CONFIG_PATCHES_SMOOTH_ECONOMY, NULL),
SDT_BOOL(Patches, allow_shares, 0, 0, false, STR_CONFIG_PATCHES_ALLOW_SHARES, NULL),
- SDT_CONDVAR(Patches, town_growth_rate, SLE_UINT8, 54, SL_MAX_VERSION, 0, MS, 2, 0, 4, 0, STR_CONFIG_PATCHES_TOWN_GROWTH, NULL),
- SDT_CONDVAR(Patches, larger_towns, SLE_UINT8, 54, SL_MAX_VERSION, 0, D0, 4, 0, 255, 1, STR_CONFIG_PATCHES_LARGER_TOWNS, NULL),
+ SDT_CONDVAR(Patches, town_growth_rate, SLE_UINT8, 54, SL_MAX_VERSION, 0, MS, 2, 0, 4, 0, STR_CONFIG_PATCHES_TOWN_GROWTH, NULL),
+ SDT_CONDVAR(Patches, larger_towns, SLE_UINT8, 54, SL_MAX_VERSION, 0, D0, 4, 0, 255, 1, STR_CONFIG_PATCHES_LARGER_TOWNS, NULL),
+ SDT_CONDVAR(Patches, initial_city_size, SLE_UINT8, 56, SL_MAX_VERSION, 0, 0, 2, 1, 10, 1, STR_CONFIG_PATCHES_CITY_SIZE_MULTIPLIER, NULL),
/***************************************************************************/
/* AI section of the GUI-configure patches window */
@@ -1524,7 +1527,7 @@
static const SettingDesc _currency_settings[] = {
SDT_VAR(CurrencySpec, rate, SLE_UINT16, S, 0, 1, 0, 100, 0, STR_NULL, NULL),
SDT_CHR(CurrencySpec, separator, S, 0, ".", STR_NULL, NULL),
- SDT_VAR(CurrencySpec, to_euro, SLE_INT32, S, 0, 0, 0,3000, 0, STR_NULL, NULL),
+ SDT_VAR(CurrencySpec, to_euro, SLE_INT32, S, 0, 0, 0, 3000, 0, STR_NULL, NULL),
SDT_STR(CurrencySpec, prefix, SLE_STRBQ, S, 0, NULL, STR_NULL, NULL),
SDT_STR(CurrencySpec, suffix, SLE_STRBQ, S, 0, " credits", STR_NULL, NULL),
SDT_END()
@@ -1728,6 +1731,8 @@
}
/** Network-safe changing of patch-settings (server-only).
+ * @param tile unused
+ * @param flags operation to perform
* @param p1 the index of the patch in the SettingDesc array which identifies it
* @param p2 the new value for the patch
* The new value is properly clamped to its minimum/maximum when setting
@@ -1878,6 +1883,7 @@
}
/** Loadhandler for a list of global variables
+ * @param sdg pointer for the global variable list SettingDescGlobVarList
* @note this is actually a stub for LoadSettings with the
* object pointer set to NULL */
static inline void LoadSettingsGlobList(const SettingDescGlobVarList *sdg)
@@ -1886,7 +1892,7 @@
}
/** Save and load handler for patches/settings
- * @param osd SettingDesc struct containing all information
+ * @param sd SettingDesc struct containing all information
* @param object can be either NULL in which case we load global variables or
* a pointer to a struct which is getting saved */
static void SaveSettings(const SettingDesc *sd, void *object)