Commit Graph

128 Commits

Author SHA1 Message Date
Darkvater 00aaf8b8f1 (svn r5871) -Feature: Add a possibility to handle pointer strings without a buffer from the configuration file. Handy for variables that will never be changed during runtime 2006-08-12 22:56:45 +00:00
tron 2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
richk a832ca51fe (svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
Commuter airport: Small. 5x4. 3 terminals, 2 helipads.
Intercontinental: massive. 9x11. 8 terminals, 2 helipads, 4 runways.
Helidepot: a small heliport with a depot for helis only.
Helistation: a large heliport with 3 helipads and a depot.
2006-06-23 22:05:40 +00:00
tron 4a5305161e (svn r5307) Remove two unnecessary indirections which used function pointers instead of directly calling the functions 2006-06-18 07:49:25 +00:00
glx 84f553b47f (svn r5229) Remove a write-only variable 2006-06-11 21:38:35 +00:00
tron be88e269b9 (svn r5155) - Remove the bridge branch merge (revision r5070) 2006-06-07 19:35:21 +00:00
celestar 25a63ec7af (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-06-02 13:05:41 +00:00
KUDr 5e73dce0e7 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 2006-05-27 16:12:16 +00:00
peter1138 10992deeb3 (svn r4757) - Newstations: add saveload support for custom station speclists 2006-05-06 21:46:26 +00:00
Darkvater 6410eac6be (svn r4524) - Codechange: Use GB() macros for getting the saveload file/memory types 2006-04-22 12:40:25 +00:00
peter1138 ae7ec5cd0d (svn r4471) - Pools: Add a facility for calling a custom function during pool block clean up. 2006-04-18 18:48:50 +00:00
KUDr 24ef4ce560 (svn r4470) -Fix: FS#97 — Possible bug in Win64 versions (by michi_cc)
Doesn't fix any known bug, but the code is now bit cleaner. The proper result of subtraction of two pointers is ptrdiff_t.
2006-04-18 18:02:52 +00:00
celestar e75e4e8f74 (svn r4466) -Fix: (FS#71) Game no longer crashes when the last vehicle serving a station has been deleted.
-Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings.
   -Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
2006-04-18 08:50:17 +00:00
Darkvater 57bc71993c (svn r4361) - Fix: Write and Read the true length of a string-buffer into the savegame instead of the whole buffer. 2006-04-11 17:05:50 +00:00
Darkvater aa4f6605ad (svn r4360) - CodeChange: add shortcut to SlGetArrayLength of the gamma-function along the lines of the Write/Read functions 2006-04-11 17:03:13 +00:00
celestar 5931b34aff (svn r4259) -[multistop] Fix/Feature/Codechange:
1) Improved the road vehicle allocation (aka slotting) for multistop. Stops can now accept unlimited, er... 256, vehicles.
2) Removed the "wait for stop" feature, because it did not work in practise.
3) Slotting now ignores unreachable stations. Uses NPF at the moment because the old pathfinder cannot do it (yet)
4) Now matter how many vehicles approach a station, they will always be distributed evenly over existing stops.
5) Hopefully the last fundamental change to multistop
2006-04-03 14:25:32 +00:00
celestar a7d8ad0004 (svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas. 2006-03-29 16:30:26 +00:00
Darkvater 9b5d8a9921 (svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
- CodeChange: Change the function GetCurrentLocale(). It returns the locale from some default environment-variables, plus a custom one defined as parameter. If all fail, it tries $LANG.
2006-03-25 09:22:10 +00:00
bjarni 0b102f0e00 (svn r4019) -Fix: [OSX] stopped using iconv for 10.2.8, since it was added in 10.3
this have the sideeffect that 10.2.8 will still have the "failure to save with certain chars in the filename bug", but at least it can compile again
2006-03-22 13:06:50 +00:00
bjarni 1c7d139171 (svn r3972) changed r3966 to only affect OSX. Too bad linuxes with utf-8 filesystems now got the saving problem again, but now we can compile on all platforms again 2006-03-18 16:37:25 +00:00
bjarni 5affa77822 (svn r3966) -Fix: [OSX and some linux] [ 1157244 ] Can't save game if name contains german umlauts
now it saves correctly, but the load window still display some chars wrong (fix by ln-)
2006-03-18 15:55:24 +00:00
Darkvater d8677f1afa (svn r3915) - Savegame version 23: Do not save the autosave interval anymore with savegames. Some people should be very happe atm ;) 2006-03-17 08:06:56 +00:00
Darkvater 42dec88a29 (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
2006-03-02 02:22:15 +00:00
Darkvater 903c3aa63d (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.
2006-03-02 00:32:48 +00:00
Darkvater 4367870b18 (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. 2006-03-01 21:15:25 +00:00
Darkvater 6e9211fc5a (svn r3712) - Change the boolean assignment/reading from == 1 to != 0 as suggested by Tron. 2006-03-01 20:38:39 +00:00
Darkvater 01c371fe0e (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 2006-03-01 20:34:51 +00:00
Darkvater 2912d0e67b (svn r3662) Fix regression FS#58 with union, endiannes and static decleration problems. Removed the union. 2006-02-23 20:53:30 +00:00
Darkvater 3efd51dd76 (svn r3628) - Add BOOL and STRING types to saveload capabilities. String is unused up till now and it saves the full-buffer, regardless of how many characters the string actually has. So give a warning for that and figure it out later. 2006-02-20 19:58:46 +00:00
Darkvater fa337ae64a (svn r3626) - Merge the SlGlobVarList (global variables) and SaveLoad (offset in struct, variable determined runtime) structs. The only difference between these two is the last element that either holds the address or the offset in the struct. Which one to take is determined by which function is called; SlObject or SlGlobList. 2006-02-20 19:42:39 +00:00
Darkvater f579e2ee83 (svn r3624) - CodeChange: Some cosmetic changes in the saveload code;
- hide and validate variable-size calculation (SlCalcConvMemLen/SlCalcConvFileLen)
   - some signed/unsigned fixes
   - handle conditional variables the same way for global -and struct types, through checking version_from and version_to
2006-02-20 19:04:18 +00:00
Darkvater f15b8b6cda (svn r3623) - Standardize DEBUG() messages in saveload.c 2006-02-20 18:01:38 +00:00
tron b844aa2db3 (svn r3520) Remove unused parameters from some functions 2006-02-02 07:15:46 +00:00
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
truelight b7beb3d87d (svn r3483) -Fix: fixed warning about setjmp (tnx Bjarni for testing, and tnx for
taking the effort to commit it)
2006-01-29 22:42:17 +00:00
Darkvater 4e09974975 (svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
2006-01-29 18:57:26 +00:00
bjarni e35a131153 (svn r3403) -Codechange: [multiheaded engines] the references between the front and rear engines are no longer saved
instead the pointers are generated on load
2006-01-18 15:05:01 +00:00
peter1138 90aff7a026 (svn r3396) - Autoreplace changes:
- Change fixed array per player to a single pool. This avoids future problems
    with vehicle numbers and decreases savegame size. Engine replacements from
    previous savegames will be lost.
  - Move engine replacement code from players.c to engine.c.
                                      (thanks to blathijs for rewriting this)
2006-01-12 15:52:18 +00:00
truelight efd3d42107 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
-Fix: [ FS#30 ] don't reset date in SE when pressing RandomLand (rewrote patch of MeusH, but Peter warned me I should put his name in, so... oh well)
2006-01-06 21:57:37 +00:00
peter1138 2a94a64711 (svn r3356) - Remove unused parameter of AfterLoadGame().
- Initialize _sl_version after loading an old savegame.
2005-12-29 22:28:19 +00:00
Darkvater 56998926e7 (svn r3294) - Fix: use INVALID_STRING_ID instead of -1.
- Fix: savegames only give back one message, show this by ignoring the first argument. Perhaps make the message more verbose in the future by adding STR_ equivalents next to the already existing debug messages.
2005-12-13 21:21:57 +00:00
Darkvater 728aba9d7c (svn r3236) - Fix: warnings about 'CDECL must be used with ...' on VS6 2005-11-26 12:57:42 +00:00
truelight 4845ff063b (svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed 'major' version to just: version. 2005-11-22 19:33:29 +00:00
bjarni 22a4679837 (svn r3218) -Feature: Multiheaded train engines will now stay in the same train
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
	This fixes the assert when moving multiheaded engines (introduced in r3144)
	Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs

-Codechange: train subtype is now a bitmask
	This allows fast access to info like if it is a wagon or engine and if it is in front and so on
	Note: savegame version bump
2005-11-18 23:41:03 +00:00
peter1138 754d26407e (svn r3212) - Waypoints/Depots: Store waypoint index in m2 for waypoints. This moves the ground type bits from m2 to m4 for waypoints and depots (leaving room for depot index in m2 in future), and moves the custom graphics ID to the waypoint struct.
- Waypoints: Until now stat_id was saved but never assigned to. Instead we now save the GRFID/local index of the custom graphics so that GRF file changes can leave graphics intact.
2005-11-16 22:20:15 +00:00
bjarni 5481dcd191 (svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
-Trains will now remember the length of stations it visits and sell cars
        when being autoreplaced if they became too long
        -If it needs to remove cars, then it starts from the front and sells
        all it can find until the train is short enough
        -This only works for trains, that knows the station length of the route
        so a full uninterrupted run is needed
        -a train needs 1-2 runs to detect if the shortest station is expanded
        -This feature can be turned on and off in the train replace window
        and each company can have it's own setting
        -NOTE: minor savegame version bump
2005-11-07 23:20:47 +00:00
tron 2cc2154ad2 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
2005-10-22 06:39:32 +00:00
Darkvater a3d40a29fc (svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)
Fix warning in graph_gui.c with const problem
2005-10-02 22:39:56 +00:00
Darkvater c5fa3848f6 (svn r2944) Add Revision keyword to the file for --version/-v 2005-09-11 18:20:32 +00:00
Darkvater ffd044c5e8 (svn r2940) (Internal) Remove the need for the 'tmp' variable for _sl.buf, instead operate on _sl.buf_ori which is not changed for init/deinit. 2005-09-11 14:20:46 +00:00