Commit Graph

1059 Commits

Author SHA1 Message Date
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
dP 7045186594 Change #8159: Remove now unused town cargo caches without bumping the savegame version 2020-06-28 18:23:59 +02:00
dP ca2604c4e2 Revert #8157: Redundant change 2020-06-28 18:23:59 +02:00
Jonathan G Rennison 7a09413a1a Fix: Incorrect save/load array size of Town::cargo_accepted
In 11ab3c4e the number of cargo types was changed from 32 to 64.
The save/load of Town::cargo_accepted was not updated, such that
only half of the data structure is saved/loaded in savegame versions
199 to 218.
Discard and regenerate data from all savegame versions prior to 219.
2020-06-28 15:32:53 +02:00
Jonathan G Rennison 54237b0e98 Codechange: Move SlSkipBytes to saveload.h 2020-06-28 15:32:53 +02:00
Charles Pigott 64b1c70fdd Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed 2020-06-27 14:51:14 +01:00
Jonathan G Rennison e6f3e15c32 Fix 63ccb36e: Incorrect string type for OrderBackup::name save/load
In 63ccb36e BaseConsist::name was changed from a malloced char*
to a std::string.
OrderBackup inherits from BaseConsist.
The saveload of OrderBackup::name was not updated.
2020-06-22 08:02:42 +02:00
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
Michael Lutz 9b6f5e3bb8 Codechange: Store GS lang texts in std::strings. 2020-05-21 20:02:34 +02:00
glx22 cca613e3b8
Fix #8142, 5aa6351: Buoy owner and tile owner can be different (#8143) 2020-05-12 15:22:58 +02:00
glx 5aa6351042 Fix #8132: Corrupted savegame crashing OpenTTD on load 2020-05-10 20:03:41 +01:00
glx 0ed00ae111 Fix: Stop any gamelog action when recovering from SlError() 2020-05-10 20:02:55 +01:00
glx bc8333723c Fix #8021: limit savegame range for docking tiles fixing 2020-05-06 23:12:59 +02:00
Yexo 64278fd598 Fix: reset roadtype/streetcartype info for non-road bridges 2020-05-06 22:10:08 +02:00
Yexo 19dc31e0b3 Fix #8108: always update tile_hash after updating v->tile 2020-05-04 23:26:50 +02:00
SamuXarick 8edbb42fe8 Fix c01a2e2: crash on loading old savegames with invalid animated tile information 2020-05-04 21:21:06 +02:00
SamuXarick c01803cd42 Fix #8108: possible crash on loading TTD savegames with phantom oil rigs 2020-05-04 21:21:06 +02:00
SamuXarick 57553cd809 Fix #8020: Add missing docking tiles around industry neutral stations 2020-03-30 08:21:40 +02:00
glx 9116b22386 Fix #8011, f5381798: Dock tile in TTD savegame was only 2 bytes 2020-02-19 17:45:42 +01:00
glx 2f264f2c92 Change: Heading for 1.11 now 2020-02-08 23:38:49 +01:00
Johannes E. Krause 107283748a Feature: SLF_HEX to print hexadecimal numbers in the config file 2020-02-06 21:00:30 +00:00
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 2020-01-12 19:37:43 +00:00
frosch a4be4514c9 Fix #7925: Reset temporary saveload data at the start of loading a savegame instead of at the end.
Otherwise temporary data may be passed from an aborted load action to the next load action.
2020-01-12 19:08:38 +01:00
Charles Pigott d1cead7f25 Fix: When loading old timetabled saves, also reset cached timetable duration 2020-01-05 20:51:26 +00:00
Charles Pigott cddb8a4605 Fix #7587: Crash when loading saves with waypoints with invalid locations 2020-01-05 20:51:26 +00:00
Niels Martin Hansen 2fd871e2af Feature: Configurable game ending year
Functionally reverts 683b65ee1
2019-12-28 12:27:39 +01:00
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 0b489f9924 Codechange: Replace FOR_ALL_SUBSIDIES with range-based for loops 2019-12-21 20:13:03 +01:00
glx 847e5f33d4 Codechange: Replace story related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 869581eb23 Codechange: Replace FOR_ALL_SIGNS with range-based for loops 2019-12-21 20:13:03 +01:00
glx b91abd3af9 Codechange: Replace FOR_ALL_ROADSTOPS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 514565fad6 Codechange: Replace FOR_ALL_OBJECTS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 11f178a312 Codechange: Replace FOR_ALL_STORAGES with range-based for loops 2019-12-21 20:13:03 +01:00
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 9892d90b26 Codechange: Replace order related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 09fa39c5b5 Codechange: Replace linkgraph related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 00c2a98cf3 Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops 2019-12-21 20:13:03 +01:00
glx 4ae829cb27 Codechange: Replace FOR_ALL_GROUPS with range-based for loops 2019-12-21 20:13:03 +01:00
glx f58ce3db19 Codechange: Replace FOR_ALL_GOALS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 1f6b3a37f9 Codechange: Replace FOR_ALL_ENGINES with range-based for loops 2019-12-21 20:13:03 +01:00
glx 1c92ba8ebe Codechange: Replace FOR_ALL_CARGO_PAYMENTS with range-based for loops 2019-12-21 20:13:03 +01:00
glx fa9769f81a Codechange: Replace FOR_ALL_DEPOTS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 5fce5fa300 Codechange: Replace FOR_ALL_CARGOPACKETS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 60e3cf8aff Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops 2019-12-21 20:13:03 +01:00
glx ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jack Baron e4f08f2880 Fix: Bump savegame version 2019-10-19 20:31:44 +01:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
peter1138 f538179878 Feature: Multi-tile docks and docking points. 2019-06-30 16:46:32 +02:00
Niels Martin Hansen 140a96b3a0 Change: Limit memory allocations for each Squirrel instance
This can avoid out-of-memory situations due to single scripts using up the entire address space.
Instead, scripts that go above the maximum are killed.
The maximum is default 1 GB per script, but can be configured by a setting.
2019-05-11 15:34:33 +02:00
PeterN 83c1678f9e
Fix #7577: Check if linkgraph station index is valid before dereferencing. (#7583) 2019-05-10 21:36:03 +01:00
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Charles Pigott 63a7df027d Fix 5db883f: Railtype bits were moved too late, leading to rails under bridges losing their type 2019-04-29 17:46:28 +01:00
Charles Pigott d9f9a64389 Fix #6507: Don't try to load invalid depots from older savegames 2019-04-29 17:46:28 +01:00
Charles Pigott 3299d6540b Cleanup: Delete GetSavegameType function since it's been commented out since 2005 2019-04-29 17:46:28 +01:00
Charles Pigott 9da1c5bb0b Fix: Crash when attempting to load old save game with GRFs set
GroupStatistics pool was not initialised before trying to delete vehicles (specifically, trams with no tram track)
2019-04-29 17:46:28 +01:00
Charles Pigott 327ff89808 Codechange: Remove PauseModeByte 2019-04-29 17:40:22 +01:00
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 2019-04-29 17:40:22 +01:00
Charles Pigott f20b75d712 Codechange: Remove TownLayoutByte type 2019-04-29 17:40:22 +01:00
Charles Pigott 96a4787710 Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte 2019-04-29 17:40:22 +01:00
Michael Lutz 4e85ccf3c0 Codechange: Replace SmallStackSafeStackAlloc with std::array.
The only port that ever used it to make heap allocations instead of stack ones was the NDS port, which got thrown out some time ago.
2019-04-15 22:52:50 +01:00
peter1138 4f052fc2a4 Cleanup: Fix alignment after NULL -> nullptr change. 2019-04-13 20:35:10 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Michael Lutz 8b1880187a Remove: AutoFreeSmallVector.
The last use was for storing a list of memory blocks. As the way these lists are accessed is very
specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour.
2019-04-09 22:45:15 +02:00
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
Michael Lutz d3e113eb5f Codechange: Use std::vector instead of AutoDeleteSmallVector in GS text handling. 2019-04-09 22:45:15 +02:00
Michael Lutz 94c5269fa7 Codechange: Use atomic variables for thread synchronization where useful. 2019-04-06 11:27:39 +02:00
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
2019-04-06 11:27:39 +02:00
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 2019-03-26 20:15:57 +00:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
Peter Nelson f6264e5212 Change: Bump savegame version for tree tile water class conversion. 2019-03-24 15:16:54 +00:00
Peter Nelson 76e77aefad Fix #7400: Water class for tree tiles was not converted for old saves preventing industry creation.
As the information is always available from the tree ground type, unconditionally
update the map array for tree tiles.
2019-03-24 15:16:54 +00:00
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Charles Pigott fe448a2616 Remove: OPF 2019-03-16 22:30:11 +00:00
Patric Stout 7adae09897 Codechange: liblzma is called liblzma, how ever strange that might be
It is the only library we use that calls itself with 'lib' in the
name. This might be confusing, but with the arrival of cmake a lot
of these things are automated. And detection will find 'liblzma',
not 'lzma', like with 'lzo', 'zlib', ..
2019-03-11 10:16:00 +01:00
Niels Martin Hansen e8d397e4ee Codechange: Make a merged k-d tree index of all viewport signs 2019-03-09 20:27:11 +01:00
Niels Martin Hansen d84b67e54d Codechange: Make a k-d tree index of stations 2019-03-09 20:27:11 +01:00
Niels Martin Hansen 7b56be0f3a Codechange: Make a k-d tree index of towns 2019-03-09 20:27:11 +01:00
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 2019-03-09 16:33:47 +00:00
PeterN 6c6971fb43
Add: Road vehicle path cache. (#7261) 2019-03-08 23:52:45 +00:00
PeterN dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. (#7234)
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.

"Company stations can serve industries with attached neutral stations"

When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.

When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00:00
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 2019-03-08 16:52:08 +01:00
Niels Martin Hansen 52572cafa6 Add: Option for population-linear town cargo generation
Introduce a new default algorithm for town cargo generation (passengers and mail), and a game setting to choose between the new and original algorithm.

The original town cargo generation algorithm has the property of the generated amount relating to the square of each building's population, meaning large towns easily produce more cargo than can realistically be transported. The problem is excessive cargo is amplified if playing with cargodist.

The new algorithm introduced instead has a linear relation to the population. The result is that smaller towns will produce slightly more cargo, while the largest towns will produce about a fourth of what they would with the original algorithm.

Existing savegames will use the original algorithm, while new games will default to the new algorithm.
2019-03-04 20:19:44 +01:00
frosch a67ee02529
Change: Heading for 1.10 now (#7319) 2019-03-03 20:51:57 +01:00
PeterN c0c8fb25fb
Change: Use SlErrorCorrupt() on pool index error when loading a savegame, instead of terminating. (#7219) 2019-02-13 09:01:49 +00:00
Gabda 37bb2c9308 Codechange: Make the style of MakeVoid calls uniform (#7192) 2019-02-08 23:05:25 +00:00
Peter Nelson 64878320cc Fix #6803: CargoMonitorID bit packing updated to handle 64 cargo types.
This requires a saveload bump to change the bitpacking on loading older saves.
2019-02-04 20:43:14 +00:00
Peter Nelson 0b10678050 Change: Make ships stop in locks to move up/down instead of following the slope. 2019-02-04 20:20:49 +00:00
Peter Nelson 33e3f49161 Fix #7119: When rotating a ship, apply an additional offset to avoid movement glitch. 2019-02-04 00:19:48 +00:00
Niels Martin Hansen faee0737e0 Codechange: Separate gamelog revision length from network revision length 2019-02-03 18:00:16 +01:00
Peter Nelson e21ade375e Codechange: Change from numeric to descriptive SLV enum labels for last entries. 2019-02-02 21:39:06 +00:00
Peter Nelson 0f37a683a2 Codechange: Additional type safety for saveload version variables. 2019-02-02 21:39:06 +00:00
Peter Nelson 9de12521ec Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
2019-02-02 21:39:06 +00:00
Peter Nelson ea4ea62816 Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared. 2019-02-02 21:39:06 +00:00
PeterN 23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
2019-01-31 14:57:44 +01:00
Peter Nelson 67633606b0 Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.
The original translation functionality hasn't been used since 2007.
2019-01-30 17:11:40 +00:00
Peter Nelson 225790892d Change: Make ships stop and change direction slowly instead of instantly turning. 2019-01-24 20:47:40 +00:00
Peter Nelson 81330b8d6e Change: Add path cache for ships. 2019-01-19 23:11:17 +00:00
Peter Nelson 1c725fce47 Change: Add ability to save/load std::deque<> containers. 2019-01-19 23:11:17 +00:00
Niels Martin Hansen e66cec8f86 Add: NewGRF support for 16-in-16-out industries 2018-11-03 21:43:54 +01:00
Niels Martin Hansen 8859381d30 Add: Industries can produce and accept up to 16 different cargoes 2018-11-03 21:43:54 +01:00
Charles Pigott e0c0394e37 Fix: Remove various dead or unnecessary assignments 2018-10-31 12:41:49 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
Michael Lutz 4b0b4e0643 Feature: [NewGRF] Increase size of persistent storage to 256. 2018-09-02 21:31:15 +02:00
Peter Nelson bf8d7df736 Change: Extend rail types to 64 (6 bit storage) 2018-07-26 13:27:40 +01:00
Peter Nelson 5db883fbe9 Change: Move rail type bits from m3 to m8. 2018-07-26 13:27:40 +01:00
Peter Nelson 65548c37a8 Change: Extend map array by 2 bytes with a uint16. 2018-07-26 13:27:40 +01:00
Charles Pigott 2aacddd412 Codechange: lengthof is not defined for runtime-length strings, use sizeof instead 2018-06-27 22:54:46 +02:00
Charles Pigott 5f86e1a390 Codechange: Silence -Wclass-memaccess warnings with GCC8 2018-06-27 22:54:46 +02:00
PeterN 11ab3c4ea2
Change: Increase cargo type limit to 64. 2018-06-26 13:32:58 +01:00
PeterN a07394a63a
Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
2018-05-22 18:43:34 +01:00
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 2018-05-21 22:08:39 +01:00
PeterN 42b43c9983
Change: Available railtypes is always calculated on load, so no need to load value for old savegames (#6782) 2018-05-19 22:31:46 +01:00
Pavel Stupnikov fef8b831a9 Change: Switch town growth rate and counter to actual game ticks (#6763) 2018-05-02 21:01:30 +02:00
J0an Josep cfb8092397 Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation. 2018-04-30 21:52:40 +02:00
Michael Lutz 7dd6027194 Codechange: Use a SmallVec for the animated tile list instead of replicating most of the logic. 2018-04-15 20:49:29 +02:00
frosch 8c458c153d (svn r27990) -Update: Docs 2018-03-14 18:05:06 +00:00
frosch 59dd7be686 (svn r27978) -Fix [FS#6673] (r18541): Store the map variety setting in the samegame like the other mapgen settings, so restarting maps considers it. (Samu) 2018-03-11 12:11:09 +00:00
frosch 135ad9c6c9 (svn r27929) -Cleanup: Remove unused Industry::random_triggers 2017-10-25 15:38:19 +00:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
peter1138 19d56a33e8 (svn r27822) -Feature: Vehicle Group Info: Add profits and occupancy display to group vehicle list (mtm, JGR) 2017-03-24 07:33:31 +00:00
peter1138 ff26c6393e (svn r27793) -Fix [FS#6450]: Use of uninitialised variable cause lzo to fail. Add check for error status. 2017-03-13 22:16:44 +00:00
frosch ca3aaf8f6d (svn r27778) -Change [FS#6442-ish]: Convenience savegame bump to distinguish 1.7 savegames from 1.6 savegames. 2017-03-11 20:37:32 +00:00
frosch 24786a71ee (svn r27772) -Fix [FS#5819]: If the intro game had a savegame version which contains a NewGRF configuration, then townname NewGRFs would not be activated in the game options. 2017-03-07 20:18:54 +00:00
fonsinchen 4e13285274 (svn r27770) -Fix [FS#6540]: Initialize variables in station_sl.cpp (JGR) 2017-03-05 17:06:14 +00:00
frosch 1b9139efe8 (svn r27760) -Change: Enable realisitic train and road vehicle acceleration by default. 2017-02-26 20:31:02 +00:00
frosch fc4c4d080c (svn r27757) -Change: Make StringID 32bit. 2017-02-26 19:41:14 +00:00
frosch a56e2bccd0 (svn r27756) -Codechange: Add StringTab enum 2017-02-26 19:40:53 +00:00
frosch 9ad09627ad (svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs. 2017-02-26 19:39:58 +00:00
frosch 4342798ff5 (svn r27709) -Fix-ish: Silence some warnings. (adf88) 2016-12-25 13:26:15 +00:00
frosch 31f046bd9b (svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR) 2016-10-30 17:29:33 +00:00
frosch 117e73751c (svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites. 2016-10-16 14:59:44 +00:00
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
alberth 0adfb1ac6f (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 2016-09-04 16:06:50 +00:00
alberth 4001f6215e (svn r27652) -Fix(r27650): Use the file operation being performed to set the _sl.action variable. 2016-09-04 15:10:41 +00:00
alberth 6f201ce4a8 (svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload. 2016-09-04 12:58:04 +00:00
alberth 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 2016-09-04 12:57:43 +00:00
alberth df9a9f074a (svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it. 2016-09-04 12:57:20 +00:00
alberth c6ac071619 (svn r27639) -Codechange: Also always set the abstract FileToSaveLoad::filetype when setting a mode. 2016-09-04 12:47:39 +00:00
alberth 2fa0fdb176 (svn r27638) -Codechange: Move FiosType enum, move and rename SetFiosType function. 2016-09-04 12:47:07 +00:00
alberth 3b8ede5ebe (svn r27637) -Codechange: Don't use _saveload_mode for scenario loading detection. 2016-09-04 12:46:29 +00:00
alberth 087ed1e999 (svn r27636) -Codechange: Rename FileType to AbstractFileType. 2016-09-04 12:46:07 +00:00
alberth 9135f7130e (svn r27635) -Codechange: Move FileType and FileToSaveLoad structure definitions. 2016-09-04 12:45:40 +00:00
frosch 4d1843a95e (svn r27627) -Codechange: Deduplicate some cursor magic into SetMouseCursorBusy. 2016-08-15 18:32:48 +00:00
frosch 13a86497ea (svn r27572) -Fix [FS#6442]: Convenience savegame bump to distinguish 1.6 savegames from 1.5 savegames. 2016-05-22 10:10:17 +00:00
frosch 0c7c0ada78 (svn r27518) -Update: Numbers 2016-03-01 20:00:22 +00:00
frosch 613212c486 (svn r27320) -Codechange: Do not drop order backups when loading a savegame for replaying. 2015-06-27 11:46:41 +00:00
frosch a97e7bae65 (svn r27291) -Fix (r27278) [FS#6303]: Some savegame data was discarded again during loading. 2015-05-21 18:59:11 +00:00
frosch 3f55e5364e (svn r27278) -Fix: Handle savegames with an unexpected amount of industry-builder or NewGRF entity-mapping more gracefully. 2015-05-09 10:04:50 +00:00
frosch 8ffe068c11 (svn r27243) -Fix (r26816) [FS#6285]: Duplicate frees due to pool item classes not having copy constructors. 2015-04-23 20:07:07 +00:00
frosch 6477356dd2 (svn r27192) -Change: heading for 1.6 now 2015-03-17 20:33:44 +00:00
frosch 780e595933 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 2015-03-07 18:27:01 +00:00
rubidium d534c80e94 (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 2014-10-15 18:31:37 +00:00
rubidium 771dcf3b7b (svn r27003) -Cleanup: fix the use of spaces and asterices "around" some comments 2014-10-12 18:41:53 +00:00
peter1138 aeda5e37e7 (svn r26978) -Fix (r23609): Typo in game script warning message. 2014-10-08 16:34:52 +00:00
rubidium fedc1acd62 (svn r26881) -Codechange: bump the savegame version 2014-09-21 11:28:29 +00:00
rubidium f41b55f0ff (svn r26880) -Add: stub settings for limiting bridge and map height 2014-09-21 11:27:34 +00:00
rubidium 9daf7e749c (svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible 2014-09-21 11:24:51 +00:00
rubidium 982f5a6aa2 (svn r26878) -Change: move m6 to TileExtended to keep Tile 8 bytes and thus better alignable 2014-09-21 11:23:33 +00:00
rubidium 0ac2d3b324 (svn r26876) -Codechange: move 'has bride above' data from m6 to type 2014-09-21 11:20:11 +00:00
rubidium 47852f119e (svn r26875) -Codechange: move TropicZone information from m6 to type 2014-09-21 11:18:10 +00:00
rubidium 04e2324b8f (svn r26873) -Change: split type_height into a type and height array (ic111) 2014-09-21 11:14:58 +00:00
rubidium 51a1c712f2 (svn r26872) -Change: give the disaster vehicles the same treatment as aircraft in r26866; make the ascend and descend if needed to cross high mountains (based on patch by ic111) 2014-09-21 11:12:42 +00:00
rubidium c0771b1657 (svn r26866) -Change: make aircraft ascend/descend when they are too close to the ground or too far away (based on patch by ic111) 2014-09-21 06:35:34 +00:00
rubidium 9e0f4b3847 (svn r26864) -Codechange: bring a bit more OO into the disaster vehicles 2014-09-20 15:46:44 +00:00
rubidium 6c2abf0930 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 2014-09-20 15:31:26 +00:00
rubidium 32c56b5f84 (svn r26819) -Fix [FS#6112] (r26787): trying to delete just loaded objects that had not yet resolved their references caused a crash upon savegame load (only when loading a game from a server, e.g. joining MP) 2014-09-14 15:11:33 +00:00
frosch e53d97b4f8 (svn r26816) -Fix [FS#6109]: Properly zero-initialise data in _temp_engine. 2014-09-13 14:46:03 +00:00
alberth f72ad87540 (svn r26802) -Add: Command to set visibility of an engine for a company (based on patch by Juanjo). 2014-09-07 16:12:58 +00:00
frosch 9b72a9f6b8 (svn r26787) -Fix (r20547): Loading a game with order backups leaked Orders and left unreachable items in the pool. 2014-09-07 13:52:20 +00:00
rubidium 134ad63b80 (svn r26753) -Fix: desync due to not always properly restoring game state from the savegame 2014-08-22 17:11:59 +00:00
rubidium 48d446ffeb (svn r26700) -Fix [FS#6066]: incorrect saving of order backups 2014-07-21 18:03:32 +00:00
fonsinchen 37b1d36fb8 (svn r26650) -Fix [FS#6041]: Support save/load chunk lengths of up to (1 << 32) - 1 2014-06-17 06:13:38 +00:00
fonsinchen 957f5ca117 (svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size. 2014-06-14 13:35:39 +00:00
rubidium ad64b99eb0 (svn r26636) -Fix [FS#6026-ish]: (memory) size of variables saved for disaster vehicles was not correct in saveload description 2014-06-09 17:42:48 +00:00
frosch 2a4f0fb67d (svn r26593) -Fix: Goals were saved/loaded with incorrect size. 2014-05-17 17:18:07 +00:00
rubidium 46792e58dd (svn r26591) -Add: some instrumentation to catch most cases where the wrong number of bytes would be written into variables during loading (or read during saving) 2014-05-16 17:41:55 +00:00
rubidium 191fd09d32 (svn r26590) -Fix: possible desync (big/little endian) due to not writing complete variables upon saveload 2014-05-16 17:39:35 +00:00
rubidium 9270d94e7e (svn r26589) -Fix: SIGSEGV on all big endian architectures that tried to load e.g. the 1.4 intro game or anything else with more than 0 linkgraph nodes that was saved on little endian 2014-05-16 17:38:59 +00:00
rubidium 89c25b955e (svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore) 2014-05-11 18:02:11 +00:00
fonsinchen 2c11eeb39e (svn r26551) -Fix: document revision number for latest savegame version change 2014-05-01 14:56:33 +00:00
fonsinchen 3ee31a8f89 (svn r26547) -Codechange: Collect order travel and wait times independent of timetables 2014-05-01 14:49:16 +00:00
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
rubidium b4914b91d9 (svn r26493) -Codechange: use strecat to concatenate script settings instead of manually accounting for the amount of characters that has been written 2014-04-24 04:41:54 +00:00
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 2014-04-23 21:12:09 +00:00
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 2014-04-23 20:44:42 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
peter1138 567d0ff3a7 (svn r26450) -Feature: Hierarchical vehicle subgroups. 2014-04-08 21:09:06 +00:00
frosch 8ff9499fe2 (svn r26409) -Update: Version number in some more places. 2014-03-17 20:16:05 +00:00
frosch a32d18cbb9 (svn r26371) -Fix [FS#5831]: Calling DoCommandP during the gameloop cleared pending persistent storage changes. 2014-02-23 22:03:08 +00:00
frosch 41b7a04a68 (svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity when they are not supposed to, and truncate cargo appropiately if they are allowed to. 2014-02-07 23:48:56 +00:00
frosch 49852e3dac (svn r26175) -Add: Log in desync output when persistent storage is discarded. 2013-12-23 18:09:29 +00:00
frosch b02179bd8e (svn r26169) -Fix-ish [FS#5831-ish]: Unify the time a RV needs to travel through a curve. 2013-12-22 11:55:07 +00:00
rubidium 77e5b1e3b2 (svn r26115) -Fix: AfterLoadGame can throw an exception; from the old savegame load section this wouldn't be caught 2013-11-25 22:22:32 +00:00
rubidium d9ee35006d (svn r26064) -Fix: possible uninitialised array when loading a broken TT-ish savegame 2013-11-23 18:06:00 +00:00
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 2013-11-23 13:15:07 +00:00
rubidium b3e93d6520 (svn r26057) -Fix: a number of possibly uninitialised variables 2013-11-23 13:12:19 +00:00
rubidium 1ffcdbd515 (svn r25954) -Fix [FS#5731]: All semaphores got converted to electric signals when loading savegames from v15 to v20 (adf88) 2013-11-08 21:27:56 +00:00
rubidium a7fd0f8f5d (svn r25953) -Fix [FS#5732]: Wrong bits used when converting signal types/variants while loading savegames older than v64 (adf88) 2013-11-08 21:25:35 +00:00
fonsinchen bd230f34f4 (svn r25900) -Change [FS#5677]: Allow restricted flows to be picked for kept cargo. 2013-10-22 16:15:59 +00:00
fonsinchen 6524849386 (svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore. 2013-10-22 16:13:54 +00:00
fonsinchen 29e987f3fc (svn r25898) -Codechange: Add second timestamp for 'restricted links' to all edges. 2013-10-22 16:13:28 +00:00
fonsinchen ec2d36a4a4 (svn r25897) -Fix: Dates are int32, not uint32, and should be saved as such. 2013-10-22 16:12:08 +00:00
frosch 871519f75a (svn r25855) -Fix [FS#5788] (r25833): Obiwan messed up savegame conversion. 2013-10-13 10:51:58 +00:00
zuu fb5dc7762b (svn r25852) -Codechange: Merge GetFenceXX/SetFenceXX into one common GetFonce/SetFence for all directions that take an extra direction parameter (cirdan, LordAro) 2013-10-12 22:23:43 +00:00
zuu dfb5663313 (svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope information for situations when we only want to know if a tile is flat or not (cirdan, LordAro) 2013-10-12 22:07:58 +00:00
frosch 69a0c91d63 (svn r25844) -Change: Increase maximum number of object instances on the map from 64k to about 16M. 2013-10-12 16:35:50 +00:00
frosch 35d7e8bca4 (svn r25833) -Codechange: Move ObjectType from map array into pool item. 2013-10-12 16:30:42 +00:00
frosch 2080a8c16f (svn r25832) -Codechange: Reduce variety of object type test functions. 2013-10-12 16:30:22 +00:00
frosch 4912e3170e (svn r25817) -Fix [FS5750-ish]: Handle savegames which contain GS translations for languages with empty name more gently. 2013-10-06 12:10:33 +00:00
frosch b0a063ed77 (svn r25702) -Add: about 3000 years of savegame compatibility. 2013-08-08 19:01:02 +00:00
zuu 09897c5fd6 (svn r25620) -Fix (r25342): Save/load of story books were broken 2013-07-21 13:18:45 +00:00
rubidium dd49c84363 (svn r25510) -Fix: forgot to update some documentation 2013-06-29 09:51:03 +00:00
rubidium f9c9ff6ec3 (svn r25508) -Change: split unit localisation choice into a choice per type of unit, and move it to the advanced settings
-Feature [FS#5482]: have tractive effort in imperial (lbf) and metric (kgf) units
-Feature: have weights and volumes in imperial units (short tons, gallons)
2013-06-29 09:47:18 +00:00
fonsinchen 06d95e9123 (svn r25390) -Fix: add missing compatibility settings in afterload. 2013-06-10 21:30:31 +00:00
rubidium b860353a66 (svn r25387) -Fix: "typos" in @file filename 2013-06-09 18:58:36 +00:00
fonsinchen 0e5fa8d195 (svn r25363) -Codechange: bump the savegame version for cargodist 2013-06-09 13:06:03 +00:00
fonsinchen 741c431caa (svn r25362) -Feature: consider cargo waiting at other stations for rating at the origin station 2013-06-09 13:04:32 +00:00
fonsinchen 04e3eb6fab (svn r25361) -Feature: distribute cargo according to plan given by linkgraph 2013-06-09 13:03:48 +00:00
fonsinchen a2ff96d682 (svn r25360) -Codechange: save and load flow stats 2013-06-09 13:03:11 +00:00
fonsinchen 3d0a0e8e48 (svn r25358) -Codechange: save and load link graph jobs and the schedule 2013-06-09 13:02:05 +00:00
zuu 9aa1bf0264 (svn r25342) -Add: StoryPage data structures and GS API 2013-06-09 12:19:09 +00:00
fonsinchen 16307a8a6f (svn r25337) -Fix: saving only 8 bits of 16 causes endianness problems 2013-06-08 20:47:59 +00:00
rubidium f292a87dc4 (svn r25312) -Fix-ish: missing spaces after comma + realignment of tables; quite boring with -x -w 2013-06-01 07:44:53 +00:00
zuu a4cddc3e08 (svn r25296) -Feature: Goals can now have a progress text and/or be marked as completed. 2013-05-26 19:54:43 +00:00
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 2013-05-19 14:22:04 +00:00
rubidium 0cc3d8df4b (svn r25258) -Codechange: save linkgraph (fonsinchen) 2013-05-19 14:17:02 +00:00
frosch 5eddbb338b (svn r25185) -Fix [FS#5508]: Remove ambivalent functions CargoList::Empty() and Count(), and replace them with VehicleCargoList::StoredCount(), TotalCount(), StationCargoList::AvailableCount() and TotalCount(). (fonsinchen) 2013-04-13 13:42:08 +00:00
rubidium aa2c1ce4b0 (svn r25152) -Fix-ish [FS#5520]: remove stray reservation from savegames affected by FS#5510 et al. upon loading 2013-04-06 18:30:45 +00:00
rubidium 327615c2ce (svn r25136) -Merge: 1.3 release (documentation) updates 2013-03-31 21:14:39 +00:00
frosch 30f601d685 (svn r25115) -Fix (r8973) [FS#5492-ish]: [NewGRF] Acceleration of NewGRF aircraft was too fast, while acceleration of default aircraft was way too slow. I.e. choose wisely who to let write the software for your orbiter. 2013-03-22 21:27:13 +00:00
frosch 22bb015f3d (svn r25041) -Remove [FS#3764-ish]: ordered refit with subtypes, since the cases where it worked were corner cases rather than the general case. 2013-02-24 16:41:51 +00:00
rubidium cdb0a76958 (svn r25012) -Codechange: persistently keep 'reserved' cargo (for full-load improved loading) instead of calculating if for every cycle 2013-02-17 14:54:50 +00:00
rubidium 446d50f658 (svn r25011) -Codechange: allow vehicle transfer and profit text effects to be shown at the same time (fonsinchen) 2013-02-17 14:50:54 +00:00
rubidium ced17303c2 (svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138) 2013-02-14 17:24:55 +00:00
rubidium 369a6f9d1b (svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138) 2013-02-14 17:06:49 +00:00
rubidium c77cd1f409 (svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138) 2013-02-14 17:04:01 +00:00
peter1138 c00a400cc7 (svn r24905) -Feature(ish): Implement station randomisation triggers. 2013-01-11 07:39:25 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
rubidium f4915ce34f (svn r24878) -Update: the obligatory first of January commit 2013-01-01 11:08:22 +00:00
rubidium d5d96ba683 (svn r24877) -Fix: some whitespace "errors" 2013-01-01 10:52:32 +00:00