------------------------------------------------------------------------ r3779 | tron | 2006-03-07 07:51:05 +0000 (Tue, 07 Mar 2006) | 1 line Move CheckTunnelInWay() to a more appropriate place, invert its result and give it a less ambiguous name (IsTunnelInWay) ------------------------------------------------------------------------ r3778 | peter1138 | 2006-03-06 23:01:35 +0000 (Mon, 06 Mar 2006) | 1 line - Fix crash when resizing news history window. ------------------------------------------------------------------------ r3777 | tron | 2006-03-06 20:55:24 +0000 (Mon, 06 Mar 2006) | 1 line Add some functions to handle tunnels ------------------------------------------------------------------------ r3776 | tron | 2006-03-06 20:28:28 +0000 (Mon, 06 Mar 2006) | 2 lines Replace many ints and magic numbers by Direction, DiagDirection and friends ------------------------------------------------------------------------ r3775 | peter1138 | 2006-03-06 19:23:26 +0000 (Mon, 06 Mar 2006) | 2 lines Fix loading of server_port from config file, introduced in Darkvater's unified configuration changes (r3719+) ------------------------------------------------------------------------ r3774 | tron | 2006-03-06 13:29:27 +0000 (Mon, 06 Mar 2006) | 1 line Remove some more magic numbers and types ------------------------------------------------------------------------ r3773 | tron | 2006-03-06 13:11:08 +0000 (Mon, 06 Mar 2006) | 2 lines Shove some semantics down ottd's throat by replacing ints and magic numbers by enums and some related changes ------------------------------------------------------------------------ r3770 | tron | 2006-03-05 17:24:04 +0000 (Sun, 05 Mar 2006) | 1 line Remove the _road_special_gettrackstatus hack. Egladil and me deem it unnecessary ------------------------------------------------------------------------ r3769 | tron | 2006-03-05 12:54:22 +0000 (Sun, 05 Mar 2006) | 1 line Add a cast to make KUDr's C++ compiler happy ------------------------------------------------------------------------ r3767 | tron | 2006-03-05 12:34:55 +0000 (Sun, 05 Mar 2006) | 1 line Move all direction related enums and functions to a separate header ------------------------------------------------------------------------ r3766 | tron | 2006-03-05 12:22:20 +0000 (Sun, 05 Mar 2006) | 1 line Add a function to get the RoadBits from an arbitrary tile ------------------------------------------------------------------------ r3765 | tron | 2006-03-05 11:18:34 +0000 (Sun, 05 Mar 2006) | 1 line Fix some naming glitches in r3763 and add missing svn properties ------------------------------------------------------------------------ r3763 | tron | 2006-03-05 10:19:33 +0000 (Sun, 05 Mar 2006) | 1 line Adapt to the new 'map accessors go in foo_map.h'-scheme ------------------------------------------------------------------------ r3761 | tron | 2006-03-04 17:18:13 +0000 (Sat, 04 Mar 2006) | 2 lines Fix two bugs in r3757 ------------------------------------------------------------------------ r3760 | tron | 2006-03-04 13:52:52 +0000 (Sat, 04 Mar 2006) | 1 line Replace some magic numbers for checking for a suitable slope for a level crossing by some less magic numbers. Quite similar to r3699, though this time for placing the rails ------------------------------------------------------------------------ r3759 | bjarni | 2006-03-04 12:09:10 +0000 (Sat, 04 Mar 2006) | 1 line -Fix: [OSX] don't set CC_HOST to i686 gcc when compiling universal binaries on PPC without any Makefile.config. Introduced in 3674 (before that i686 used PPC as CC_HOST, but nobody noticed that) ------------------------------------------------------------------------ r3758 | tron | 2006-03-04 11:15:44 +0000 (Sat, 04 Mar 2006) | 2 lines Remove the news validation callback. It is superseded by r3757. ------------------------------------------------------------------------ r3757 | tron | 2006-03-04 11:01:35 +0000 (Sat, 04 Mar 2006) | 6 lines -Feature: Delete news items about vehicles, when they get stale This is used to delete - all news about a vehicle, when it gets deleted - "vehicle has stopped in depot" news, when it gets started - "vehicle has invalid orders" news, when the orders get changed ------------------------------------------------------------------------ r3754 | tron | 2006-03-03 22:21:29 +0000 (Fri, 03 Mar 2006) | 1 line Miscellaneous changes: indentation, reduce variable scope, constness, avoid some more function pointer casts ------------------------------------------------------------------------ r3752 | tron | 2006-03-03 21:29:13 +0000 (Fri, 03 Mar 2006) | 1 line FYOS avoid to cast function pointers ------------------------------------------------------------------------ r3751 | tron | 2006-03-03 21:18:19 +0000 (Fri, 03 Mar 2006) | 1 line -Fix: Correctly implement minimum search, so road vehicles head twoards the closest station, not the last one in the list ------------------------------------------------------------------------ r3750 | tron | 2006-03-03 20:54:54 +0000 (Fri, 03 Mar 2006) | 1 line Use INVALID_STATION instead of -1 in NPF ------------------------------------------------------------------------ r3749 | tron | 2006-03-03 20:48:03 +0000 (Fri, 03 Mar 2006) | 1 line -Fix: [FS#61] The tooltips for raising and lowering land buttons in the scenario editor are interchanged (Reported and fixed by lc) ------------------------------------------------------------------------ r3748 | tron | 2006-03-03 20:43:54 +0000 (Fri, 03 Mar 2006) | 1 line Remove bubblesort(), it's unused ------------------------------------------------------------------------ r3747 | tron | 2006-03-03 19:42:09 +0000 (Fri, 03 Mar 2006) | 1 line Change HASBIT() to return 0/1 instead of 0/value of tested bit, because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither) ------------------------------------------------------------------------ r3746 | Darkvater | 2006-03-03 11:27:18 +0000 (Fri, 03 Mar 2006) | 2 lines - [7/7] Moving the callback functions for the setting-changes 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. ------------------------------------------------------------------------ r3745 | tron | 2006-03-03 07:51:41 +0000 (Fri, 03 Mar 2006) | 2 lines Fix two buffer overflows, one case of undefined behavior (the destination buffer of sprintf() may not alias with one of its arguments) and some other minor stuff introduced in r3740 ------------------------------------------------------------------------ r3742 | bjarni | 2006-03-02 22:21:27 +0000 (Thu, 02 Mar 2006) | 1 line -codechange: [OSX] changed an assert to use the new error window and added another two to show if the screen buffer fails for some reason in cocoa driver (instead of just crashing) ------------------------------------------------------------------------ r3741 | bjarni | 2006-03-02 22:00:57 +0000 (Thu, 02 Mar 2006) | 3 lines -Fix: [i686 OSX] reverted the change in rev 3670 for non PowerPC (done with #ifdef) since it appeared to crash intel based macs This fix is not a good solution and might not work, but if it works, it's better than nothing until we get the real solution ------------------------------------------------------------------------ r3740 | bjarni | 2006-03-02 21:43:09 +0000 (Thu, 02 Mar 2006) | 4 lines -Feature: [OSX] added OS version, CPU type and newGRF settings to assert window and a message to tell people to add that to a bug report It also adds a new error window, which can be used just like assert, but it is also active when asserts are turned off This is useful for places where it's really important to check even if assert is turned off. It's not used in the code yet ------------------------------------------------------------------------ r3739 | bjarni | 2006-03-02 21:27:20 +0000 (Thu, 02 Mar 2006) | 2 lines -Fix: [Big endian CPUs] fixed bug introduced in rev 3720 where BE computers would read insane map sizes and crash as a result ------------------------------------------------------------------------ r3733 | tron | 2006-03-02 14:45:35 +0000 (Thu, 02 Mar 2006) | 1 line Fix a bug in r3719, which caused a crash when the default value for a SLE_VAR_CHAR setting was used ------------------------------------------------------------------------ r3732 | Darkvater | 2006-03-02 09:57:28 +0000 (Thu, 02 Mar 2006) | 2 lines - 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. ------------------------------------------------------------------------ r3730 | celestar | 2006-03-02 08:55:12 +0000 (Thu, 02 Mar 2006) | 10 lines 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). ------------------------------------------------------------------------ r3727 | Darkvater | 2006-03-02 02:30:15 +0000 (Thu, 02 Mar 2006) | 1 line - Fix some typos in the readme and known-bugs text files ------------------------------------------------------------------------ r3726 | Darkvater | 2006-03-02 02:22:15 +0000 (Thu, 02 Mar 2006) | 10 lines - [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 ------------------------------------------------------------------------ r3724 | Darkvater | 2006-03-02 02:03:21 +0000 (Thu, 02 Mar 2006) | 1 line - [5.5/6] heh, the patch part got left out of the previous commit, sorry ------------------------------------------------------------------------ r3723 | Darkvater | 2006-03-02 01:56:25 +0000 (Thu, 02 Mar 2006) | 2 lines - [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. ------------------------------------------------------------------------ r3722 | Darkvater | 2006-03-02 01:41:25 +0000 (Thu, 02 Mar 2006) | 10 lines - [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) ------------------------------------------------------------------------ r3721 | Darkvater | 2006-03-02 00:32:48 +0000 (Thu, 02 Mar 2006) | 5 lines - [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. ------------------------------------------------------------------------ r3720 | Darkvater | 2006-03-02 00:07:41 +0000 (Thu, 02 Mar 2006) | 7 lines - [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. ------------------------------------------------------------------------ r3719 | Darkvater | 2006-03-01 23:53:20 +0000 (Wed, 01 Mar 2006) | 7 lines - [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. ------------------------------------------------------------------------ r3718 | Darkvater | 2006-03-01 23:39:21 +0000 (Wed, 01 Mar 2006) | 1 line - Add proper Doxygen comments to some saveload-structs (using ///<) ------------------------------------------------------------------------ r3717 | peter1138 | 2006-03-01 23:14:03 +0000 (Wed, 01 Mar 2006) | 2 lines - [2cc] Add 2cc colour maps and use for newgrf engines requiring them. Currently the second colour is fixed to be the player's colour. ------------------------------------------------------------------------ r3716 | Darkvater | 2006-03-01 21:15:25 +0000 (Wed, 01 Mar 2006) | 1 line - 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. ------------------------------------------------------------------------ r3714 | tron | 2006-03-01 21:00:44 +0000 (Wed, 01 Mar 2006) | 1 line Add functions to turn tiles into water and shore tiles ------------------------------------------------------------------------ r3713 | Darkvater | 2006-03-01 20:49:47 +0000 (Wed, 01 Mar 2006) | 4 lines - 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). ------------------------------------------------------------------------ r3712 | Darkvater | 2006-03-01 20:38:39 +0000 (Wed, 01 Mar 2006) | 1 line - Change the boolean assignment/reading from == 1 to != 0 as suggested by Tron. ------------------------------------------------------------------------ r3711 | Darkvater | 2006-03-01 20:34:51 +0000 (Wed, 01 Mar 2006) | 1 line - 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 ------------------------------------------------------------------------ r3710 | Darkvater | 2006-03-01 20:24:22 +0000 (Wed, 01 Mar 2006) | 1 line - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag. ------------------------------------------------------------------------ r3707 | bjarni | 2006-03-01 19:20:35 +0000 (Wed, 01 Mar 2006) | 3 lines -Fix: made the generated Finnish town names sound more Finnish (ln-) note: Bjarni: please go ahead and commit it, i'll take the responsibility if something should go wrong. ------------------------------------------------------------------------ r3701 | peter1138 | 2006-03-01 17:35:01 +0000 (Wed, 01 Mar 2006) | 2 lines [2cc] move vehicle/engine palette functions out of header file and document the remaining definitions ------------------------------------------------------------------------ r3699 | tron | 2006-03-01 15:03:47 +0000 (Wed, 01 Mar 2006) | 1 line Replace some magic numbers for checking for a suitable slope for a level crossing by some less magic numbers ------------------------------------------------------------------------ r3698 | tron | 2006-03-01 12:31:39 +0000 (Wed, 01 Mar 2006) | 1 line Add GetCrossingRailBits() and ComplementRoadBits(). Simplify the code by using them ------------------------------------------------------------------------ r3697 | tron | 2006-03-01 09:40:34 +0000 (Wed, 01 Mar 2006) | 1 line Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes ------------------------------------------------------------------------ r3696 | tron | 2006-03-01 08:56:38 +0000 (Wed, 01 Mar 2006) | 1 line 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 ------------------------------------------------------------------------ r3695 | tron | 2006-03-01 06:39:04 +0000 (Wed, 01 Mar 2006) | 2 lines Add 2 MarkTileByTile() which I forgot in r3689 (noticed by Belugas) ------------------------------------------------------------------------ r3689 | tron | 2006-02-28 21:19:50 +0000 (Tue, 28 Feb 2006) | 1 line Add functions to turn a tile into either a normal road tile, a level crossing or a road depot ------------------------------------------------------------------------