summaryrefslogtreecommitdiff
path: root/settings.c
AgeCommit message (Collapse)Author
2006-05-01(svn r4639) -Feature: Turkish town names (jnmbk)celestar
2006-04-22(svn r4531) - Fix [NewGRF]: overzealous fixing, reset num_params to 0 from ↵Darkvater
-1 when parsing the parameter list fails.
2006-04-22(svn r4530) - Fix [NewGRF]: don't spew a warning when a grf file has no ↵Darkvater
parameters.
2006-04-22(svn r4527) - Feature [NewGRF]: Add support for specifying parameters to GRF ↵Darkvater
files. Usage: "mygrf = 1". You can pass up to 128 parameters, each one seperated by a comma or a space-character. Big thanks to peter1138 for the inspiration and examples.
2006-04-22(svn r4512) - Codechange: Sprinkle some doxygen magic over settings.cDarkvater
2006-04-21(svn r4498) - Use an item's name instead of value when parsing configuration ↵peter1138
lists.
2006-04-20(svn r4491) - Codechange: handle IGT_LIST types just as the other types with ↵Darkvater
a proper name and value setting (for example for newgrf parameters).
2006-04-20(svn r4490) - Feature: The integer-list parser now accepts a space character ↵Darkvater
as an item seperator next to the comma.
2006-04-20(svn r4489) - Codechange: some small cleanups in the settings-parser code, ↵Darkvater
mainly substituting terminating 0 characters with '\0'.
2006-04-20(svn r4487) - Codechange: replace the custom currency magic number 23 with a ↵peter1138
define
2006-04-16(svn r4445) -Fix: FS#108 Danish name generator bugbjarni
this was actually not a bug in the generator, but rather it saved/loaded the setting danish as swiss (the previous in the list)
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-03-29(svn r4153) -Codechange. Changed NPF_TILE_LENGTH into an enum and moved it ↵celestar
out of variables.h. Just a drop in the bucket, but it is a start
2006-03-28(svn r4142) - Fix [FS#74]: Incorrectly loaded settings from the config file ↵Darkvater
when the signed uint32 variable would be negative.
2006-03-26(svn r4126) - Feature: A new multi-lingual multi-measuring-unit system:peter1138
- Replace miles/kilometres game option with a general measuring units option. - Add {POWER}, {WEIGHT}, {WEIGHT_S} and {VOLUME_S} (_S for short) tags to the language/string system. - Add SI as option for measuring units. Language file updates to use the system will come soon.
2006-03-21(svn r3997) - Default the patch-setting 'pause_on_join' to true.Darkvater
2006-03-17(svn r3930) - [Patches] Change the GUI-patch options from indeces to string ↵Darkvater
representations. Not only makes this the part more humanly readable, but saves us from rewriting the whole index when a patch is added/removed/changed
2006-03-17(svn r3926) - [Patches]: Switched string for ship and aircraft replacement, ↵Darkvater
and also forgot to put back the callback function. Thanks Tron
2006-03-17(svn r3924) - Revert r3923, apparently we are not fond of CONDNULL() structs :)Darkvater
2006-03-17(svn r3923) - [Pathces/HACK]: Add 32 empty bytes at the end of the patches ↵Darkvater
chunk in the savegame to not to have to increase the savegame version every time we add one; at least for a while. To not break in-between nightlies a temporary hack is done. So make sure to upgrade to this nightly before you upgrade to newer ones. Releases are unaffected
2006-03-17(svn r3915) - Savegame version 23: Do not save the autosave interval anymore ↵Darkvater
with savegames. Some people should be very happe atm ;)
2006-03-17(svn r3914) - Properly implement SDT(G)_CONDNULL macro's without special ↵Darkvater
cases (add flag SLF_CONFIG_NO and empty string as name)
2006-03-16(svn r3896) - [Patches] Fix: Honour any conditional settings when retrieving ↵Darkvater
the setting entries.
2006-03-16(svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space ↵Darkvater
reservation in savegames and update where used - Also add this capability to settings
2006-03-15(svn r3880) - just do a string compare without length restrictions; followup ↵Darkvater
for r3875
2006-03-14(svn r3875) - [Patches] Fix up the intro menu so the right values for the ↵Darkvater
mapsize are shown (the default ones). Setting the value involves a small hack in that we also set the _patches value because that is used for world-generation and only inside there do the values get copied from _newgame - [Patches] Fix a stupid, stupid bug where I used sizeof() as length instead of strlen() in getting console values for patches.
2006-03-13(svn r3854) - Fix restart_game_date to default to zero and allow a value of ↵Darkvater
0 which got screwed up during the patch-rewrite. Thanks peter1138
2006-03-13(svn r3852) - Revert r3733 which fixed the default value loading for char, ↵Darkvater
but broke loading a set value. Added a better fix which needs a char value to be a string (eg enclosed in double-quotes)
2006-03-06(svn r3775) Fix loading of server_port from config file, introduced in ↵peter1138
Darkvater's unified configuration changes (r3719+)
2006-03-03(svn r3746) - [7/7] Moving the callback functions for the setting-changes ↵Darkvater
from settings_gui.c to settings.c. Also enable the callback functionality through the console. - Fix a nasty bug with improper counter addition. (*i)++ and NOT *i++ when setting a patch value through the console.
2006-03-02(svn r3733) Fix a bug in r3719, which caused a crash when the default value ↵tron
for a SLE_VAR_CHAR setting was used
2006-03-02(svn r3732) - Fix two warnings. Stupid MSVC didn't even complain :s (Thank ↵Darkvater
Tron and peter1138) - NOTE! There are a few warnings left in settings_gui because tha callback functions are disabled. I still need a good place for them.
2006-03-02(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.Darkvater
- Remove the temporary synchronisation in during the map-transfer as this is no longer needed - The saved patches work just like the saved gameoptions. You have a _patches and a _patches_newgame struct. The _patches_newgame struct contains the values from the configuration file and thus the defaults for new games. When a new game is started or an older game is loaded, the default values are copied over to _patches to be used. When you load a game that has PATS saved, the default values are also loaded, but immediately overwritten by the values from the savegame. This ensures that player-based values are always taken from your personal preferences. - The current implementation also changes the default values if you change player-based settings in the game. For example changing window_snap_radius in a certain game will also change it for all next OpenTTD sessions. - The savegame version has been increased to 22. - The last 6 orso patches close the following reports: [ 1366446 ] different names for patches: all patch settings have the same name as in the configuration file and are reachable from the console. [ 1288024 ] Strange string on OTTD initial screen: configuration (and this includes patches) inputs are validated and clamped to their minimum/maximum values. [ 1423198 ] Make "Signals on Drive side" player, not server, based: this is only visual so current setting is to save it with the savegame but not synchronise in multiplayer. [ 1208070 ] Patches and New GRF options saved: apart from newgrf this is done
2006-03-02(svn r3723) - [5/6] Move over the console commands from settings_gui to ↵Darkvater
settings where they rather belong. - Remove the restriction that the 'patch' console command can only be run from network games.
2006-03-02(svn r3722) - [4/4] Present the game with a unified structure for the ↵Darkvater
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)
2006-03-02(svn r3721) - [3/4] Present the game with a unified structure for the ↵Darkvater
configuration-ini, saveload, console and gui representations of the settings. From part 3 on, OpenTTD is once again compilable. - Code has been added to the saveload code to honour the SLF_SAVE_NO and SLF_NETWORK_NO flags. SLF_NETWORK_NO just reads in the the bytestream and then discards it because that setting is not synchronised. For this the function SlSkipBytes() has been reinstated - SAVEGAME_VERSION has been changed from a constant ENUM to a constant integer. This was done for the configuration-code to be able to tell which version of a CONDVAR type to handle. As said before, because settings can be saved to the savegame, they will become conditional at some point. The configuration code always has to read the 'most recent' version. - GameOptions are saved through the new structure. It is fully compatible with any old savegame...however it is better. Because of the move to this new format we can instruct the loader to skip certain variables. Autosave for example isn't synchronised anymore (in the network). The same goes for currency and kilometers :D. That is the only functionality change this patch is supposed to have if I have written it correctly. - NOTE! Patches are still not saved so for Multiplayer to work network_client.c and network_server.c needed slight modifications.
2006-03-02(svn r3720) - [2/4] Present the game with a unified structure for the ↵Darkvater
configuration-ini, saveload, console and gui representations of the settings. This second part gets rid of the old SettingDesc structures and updates them with the unified types. These new settings are heavily macro'd, which should make it easy to add/edit entries within sections. - This unified structure merges the settings in settings.c (concerned with the ini file) and the ones in setting_gui., having to do with the GUI. I tried to give sensible min and maximum values to _patches that were not present in the GUI I hope they work out all right. - All patch settings miss their callback function which have been temporarily reset to NULL - Fixed a really small typo in a Doxygen comment in settings.h - NOTE! When for example _patches are saved to the savegame (as are _gameopt_settings now), you cannot just blindly edit the struct. The same rules apply as to all the other SaveLoad structs. Eg correct CONDVAR's and only adding new entries at the end. - NOTE! The game is not compilable after this commit.
2006-03-01(svn r3719) - [1/4] Present the game with a unified structure for the ↵Darkvater
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.
2006-03-01(svn r3716) - Move the option settings (_game_opt_desc) from misc.c into ↵Darkvater
settings.c. This will be merged with SettingDesc misc_settings above as they are actually the same. No functionality has changed beside the fact that the settings are now in a different Chunkhandler.
2006-02-20(svn r3641) - Rename MusicFilesettings 'btn_down' to more sensible 'playing'Darkvater
2006-02-20(svn r3640) - Remove win32-only variables from variables.h and put them into ↵Darkvater
win32_v.c. Also ifdef the win32 specific configuration file settings.
2006-02-20(svn r3622) - Partly revert r3214. The patch setting max_num_autosaves stays ↵Darkvater
to help control PDA-troubles which the commit was intended for. Didn't revert makefile-config version since it would cause trouble. But Bjarni promised to rewrite it :)
2006-02-20(svn r3621) - Codechange: Only define the server and bans list if network is ↵Darkvater
enabled. Preparatory work for saving patches/settings to savegame.
2006-02-13(svn r3601) -Codechange: special for Tron, and he was absolutely correct in ↵truelight
thisone: added a comment for last commit
2006-02-13(svn r3600) -Fix: suppress error on 64bit targetstruelight
2006-02-06(svn r3567) -Fix: for once and for all, use 'unsigned long' if you want to ↵truelight
cast something from int-like to void *... we fixed that not too long ago, and the code below this changed line clearly tells you do to that :p
2006-02-04(svn r3550) - [Patches]: fix GCC warning, sorryDarkvater
2006-02-04(svn r3548) - [Patches]: rework two loops in make_oneofmany() and ↵Darkvater
make_manyofmany()
2006-02-04(svn r3547) - [Patches]: do some general cleanup, commentarization before ↵Darkvater
starting actual work. This patch contains no functional changes (I hope). It might break GPMI-builds though when trying to join a trunk/ network game or vice versa. To solve, you can change the order of the first 8 enums in SettingDescType. I think that'll work.
2006-02-04(svn r3534) - Codechange: remove unused savedump patch-settings.Darkvater