Thu, 02 Mar 2006 14:45:35 +0000(svn r3733) Fix a bug in r3719, which caused a crash when the default value for a SLE_VAR_CHAR setting was used
tron [Thu, 02 Mar 2006 14:45:35 +0000] rev 3125
(svn r3733) Fix a bug in r3719, which caused a crash when the default value for a SLE_VAR_CHAR setting was used

Thu, 02 Mar 2006 09:57:28 +0000(svn r3732) - Fix two warnings. Stupid MSVC didn't even complain :s (Thank Tron and peter1138)
Darkvater [Thu, 02 Mar 2006 09:57:28 +0000] rev 3124
(svn r3732) - Fix two warnings. Stupid MSVC didn't even complain :s (Thank 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.

Thu, 02 Mar 2006 08:55:12 +0000(svn r3730) Multistop modifications:
celestar [Thu, 02 Mar 2006 08:55:12 +0000] rev 3123
(svn r3730) Multistop modifications:
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).

Thu, 02 Mar 2006 02:30:15 +0000(svn r3727) - Fix some typos in the readme and known-bugs text files
Darkvater [Thu, 02 Mar 2006 02:30:15 +0000] rev 3122
(svn r3727) - Fix some typos in the readme and known-bugs text files

Thu, 02 Mar 2006 02:22:15 +0000(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.
Darkvater [Thu, 02 Mar 2006 02:22:15 +0000] rev 3121
(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.
- 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

Thu, 02 Mar 2006 02:03:21 +0000(svn r3724) - [5.5/6] heh, the patch part got left out of the previous commit, sorry
Darkvater [Thu, 02 Mar 2006 02:03:21 +0000] rev 3120
(svn r3724) - [5.5/6] heh, the patch part got left out of the previous commit, sorry

Thu, 02 Mar 2006 01:56:25 +0000(svn r3723) - [5/6] Move over the console commands from settings_gui to settings where they rather belong.
Darkvater [Thu, 02 Mar 2006 01:56:25 +0000] rev 3119
(svn r3723) - [5/6] Move over the console commands from settings_gui to settings where they rather belong.
- Remove the restriction that the 'patch' console command can only be run from network games.

Thu, 02 Mar 2006 01:41:25 +0000(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).
Darkvater [Thu, 02 Mar 2006 01:41:25 +0000] rev 3118
(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)

Thu, 02 Mar 2006 00:32:48 +0000(svn r3721) - [3/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. From part 3 on, OpenTTD is once again compilable.
Darkvater [Thu, 02 Mar 2006 00:32:48 +0000] rev 3117
(svn r3721) - [3/4] Present the game with a unified structure for the 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.

Thu, 02 Mar 2006 00:07:41 +0000(svn r3720) - [2/4] Present the game with a unified structure for the 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.
Darkvater [Thu, 02 Mar 2006 00:07:41 +0000] rev 3116
(svn r3720) - [2/4] Present the game with a unified structure for the 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.