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.

Wed, 01 Mar 2006 23:53:20 +0000(svn r3719) - [1/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. This first part rewrites the configuration section to use the SaveLoad VarType in general.
Darkvater [Wed, 01 Mar 2006 23:53:20 +0000] rev 3115
(svn r3719) - [1/4] Present the game with a unified structure for the 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.

Wed, 01 Mar 2006 23:39:21 +0000(svn r3718) - Add proper Doxygen comments to some saveload-structs (using ///<)
Darkvater [Wed, 01 Mar 2006 23:39:21 +0000] rev 3114
(svn r3718) - Add proper Doxygen comments to some saveload-structs (using ///<)

Wed, 01 Mar 2006 23:14:03 +0000(svn r3717) - [2cc] Add 2cc colour maps and use for newgrf engines requiring them. Currently the second colour is fixed to be the player's colour.
peter1138 [Wed, 01 Mar 2006 23:14:03 +0000] rev 3113
(svn r3717) - [2cc] Add 2cc colour maps and use for newgrf engines requiring them. Currently the second colour is fixed to be the player's colour.

Wed, 01 Mar 2006 21:15:25 +0000(svn r3716) - Move the option settings (_game_opt_desc) from misc.c into 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.
Darkvater [Wed, 01 Mar 2006 21:15:25 +0000] rev 3112
(svn r3716) - Move the option settings (_game_opt_desc) from misc.c into 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.

Wed, 01 Mar 2006 21:00:44 +0000(svn r3714) Add functions to turn tiles into water and shore tiles
tron [Wed, 01 Mar 2006 21:00:44 +0000] rev 3111
(svn r3714) Add functions to turn tiles into water and shore tiles

Wed, 01 Mar 2006 20:49:47 +0000(svn r3713) - Fix up the cheats window a little. The cheats code is still abominable, but at least a bit more readable now.
Darkvater [Wed, 01 Mar 2006 20:49:47 +0000] rev 3110
(svn r3713) - Fix up the cheats window a little. The cheats code is still abominable, but at least a bit more readable now.
Use the now generalized ReadValue/WriteValue functions as well as using general variable-types (SLE_VAR, instead of custom CE_ ones).
Remove the CE_CLICK type and use a SLE_BOOL type instead with a flag of CE_CLICK.
Remove stepsize from the struct. The stepsize is automatically calculated from the minimum and maximum values (in 20 steps).

Wed, 01 Mar 2006 20:38:39 +0000(svn r3712) - Change the boolean assignment/reading from == 1 to != 0 as suggested by Tron.
Darkvater [Wed, 01 Mar 2006 20:38:39 +0000] rev 3109
(svn r3712) - Change the boolean assignment/reading from == 1 to != 0 as suggested by Tron.

Wed, 01 Mar 2006 20:34:51 +0000(svn r3711) - Extract the WriteValue() and ReadValue() parts of the saveload code to assign/read to/from a variable. Preparatory work to make this the general function type for such assignments
Darkvater [Wed, 01 Mar 2006 20:34:51 +0000] rev 3108
(svn r3711) - Extract the WriteValue() and ReadValue() parts of the saveload code to assign/read to/from a variable. Preparatory work to make this the general function type for such assignments

Wed, 01 Mar 2006 20:24:22 +0000(svn r3710) - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag.
Darkvater [Wed, 01 Mar 2006 20:24:22 +0000] rev 3107
(svn r3710) - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag.

Wed, 01 Mar 2006 19:20:35 +0000(svn r3707) -Fix: made the generated Finnish town names sound more Finnish (ln-)
bjarni [Wed, 01 Mar 2006 19:20:35 +0000] rev 3106
(svn r3707) -Fix: made the generated Finnish town names sound more Finnish (ln-)
note: <ln-> Bjarni: please go ahead and commit it, i'll take the responsibility if something should go wrong.

Wed, 01 Mar 2006 17:35:01 +0000(svn r3701) [2cc] move vehicle/engine palette functions out of header file and document the remaining definitions
peter1138 [Wed, 01 Mar 2006 17:35:01 +0000] rev 3105
(svn r3701) [2cc] move vehicle/engine palette functions out of header file and document the remaining definitions

Wed, 01 Mar 2006 15:03:47 +0000(svn r3699) Replace some magic numbers for checking for a suitable slope for a level crossing by some less magic numbers
tron [Wed, 01 Mar 2006 15:03:47 +0000] rev 3104
(svn r3699) Replace some magic numbers for checking for a suitable slope for a level crossing by some less magic numbers

Wed, 01 Mar 2006 12:31:39 +0000(svn r3698) Add GetCrossingRailBits() and ComplementRoadBits(). Simplify the code by using them
tron [Wed, 01 Mar 2006 12:31:39 +0000] rev 3103
(svn r3698) Add GetCrossingRailBits() and ComplementRoadBits(). Simplify the code by using them

Wed, 01 Mar 2006 09:40:34 +0000(svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes
tron [Wed, 01 Mar 2006 09:40:34 +0000] rev 3102
(svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes

Wed, 01 Mar 2006 08:56:38 +0000(svn r3696) Add functions to turn a tile into a normal rail tile/depot/waypoint. This is just a tiny step, the rail code needs way more love and caring
tron [Wed, 01 Mar 2006 08:56:38 +0000] rev 3101
(svn r3696) Add functions to turn a tile into a normal rail tile/depot/waypoint. This is just a tiny step, the rail code needs way more love and caring

Wed, 01 Mar 2006 06:39:04 +0000(svn r3695) Add 2 MarkTileByTile() which I forgot in r3689 (noticed by Belugas)
tron [Wed, 01 Mar 2006 06:39:04 +0000] rev 3100
(svn r3695) Add 2 MarkTileByTile() which I forgot in r3689 (noticed by Belugas)

Tue, 28 Feb 2006 21:19:50 +0000(svn r3689) Add functions to turn a tile into either a normal road tile, a level crossing or a road depot
tron [Tue, 28 Feb 2006 21:19:50 +0000] rev 3099
(svn r3689) Add functions to turn a tile into either a normal road tile, a level crossing or a road depot

Tue, 28 Feb 2006 13:18:14 +0000(svn r3687) Complete some bits I missed whenn adding accessor functions for road types and pieces
tron [Tue, 28 Feb 2006 13:18:14 +0000] rev 3098
(svn r3687) Complete some bits I missed whenn adding accessor functions for road types and pieces

Tue, 28 Feb 2006 11:49:12 +0000(svn r3686) Dispel some strange magic regarding level crossings and foundations:
tron [Tue, 28 Feb 2006 11:49:12 +0000] rev 3097
(svn r3686) Dispel some strange magic regarding level crossings and foundations:
if a level crossing is on a sloped tile, it has to be on a level foundation

Tue, 28 Feb 2006 08:16:00 +0000(svn r3685) Include a file missed from r3684...
peter1138 [Tue, 28 Feb 2006 08:16:00 +0000] rev 3096
(svn r3685) Include a file missed from r3684...

Tue, 28 Feb 2006 08:13:15 +0000(svn r3684) - NewGRF: Support loading of miscellaneous flags (not used yet)
peter1138 [Tue, 28 Feb 2006 08:13:15 +0000] rev 3095
(svn r3684) - NewGRF: Support loading of miscellaneous flags (not used yet)

Tue, 28 Feb 2006 06:14:42 +0000(svn r3683) Get rid of another FindLandscapeHeight()
tron [Tue, 28 Feb 2006 06:14:42 +0000] rev 3094
(svn r3683) Get rid of another FindLandscapeHeight()

Mon, 27 Feb 2006 19:49:53 +0000(svn r3682) -Fix: didn't write $ correct in G5_detector in r3673, which caused problems for tortoisesvn
bjarni [Mon, 27 Feb 2006 19:49:53 +0000] rev 3093
(svn r3682) -Fix: didn't write $ correct in G5_detector in r3673, which caused problems for tortoisesvn

Mon, 27 Feb 2006 19:43:19 +0000(svn r3681) - [Multistop] Check the RoadStop type before check its status. This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType().
peter1138 [Mon, 27 Feb 2006 19:43:19 +0000] rev 3092
(svn r3681) - [Multistop] Check the RoadStop type before check its status. This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType().

Mon, 27 Feb 2006 17:24:31 +0000(svn r3680) Fix some magic numbers which got damaged in r1768
tron [Mon, 27 Feb 2006 17:24:31 +0000] rev 3091
(svn r3680) Fix some magic numbers which got damaged in r1768
-Fix: Correctly restore the roadside after roadworks are finished