Commit Graph

1122 Commits (3a676a5af09c94e9de8a1ce584156fb04a6b2b00)

Author SHA1 Message Date
cirdan 395a5d9991 Cleanup: Remove unused ChunkType flag CH_AUTO_LENGTH
CH_AUTO_LENGTH is no longer used anywhere, so remove all code
that depends on it.
4 years ago
cirdan 46ff7d918b Cleanup: Remove save-only autolength flag from economy chunk handlers
CH_AUTO_LENGTH is only used when saving chunks; it makes no sense
to set it for chunks without a save handler.
4 years ago
glx22 d8605ad18d Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops 4 years ago
Jonathan G Rennison 0c5dc5d41e Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)
Check if the job is still running two date fract ticks before it is due
to join, and if so pause the game until its done.
When loading a game, check if the game would block immediately due to
a job which is scheduled to be joined within two date fract ticks,
and if so pause the game until its done.
This avoids the main thread being blocked on a thread join, which appears
to the user as if the game is unresponsive, as the UI does not repaint
and cannot be interacted with.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
4 years ago
Pavel Stupnikov 9a45a0f535
Feature: Set exclusive access to industry from GS (#8115) 4 years ago
Niels Martin Hansen b7751c483e
Feature: Influence industry production changes from GS (#7912) 4 years ago
Patric Stout d8c8f4e72d
Fix: next 67 savegame versions are used in PatchPacks; skip them (#8411)
Various of PatchPacks (Spring 2013, Joker, ChillPP) used versions
slightly higher than ours. Of course, as time went by, this
caught up with us, and we are now almost pushing a new version
that would conflict with them. To avoid users creating unneeded
issues about "why can I not load my savegame", lets be ahead of
the curve and flat-out refuse to load them.

Version-wise, this is totally fine. We have ~32k versions to go
before we run out (0x8000 is masked by JGRPP; we should avoid
using that). At the rate we bump savegames, this is not going to
happen in any sane reality.
4 years ago
Patric Stout d15dc9f40f Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.

Co-authored-by: milek7 <me@milek7.pl>
4 years ago
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 4 years ago
Patric Stout 731af1f1f3 Codechange: don't do work GetVariableAddress() is already doing 4 years ago
Patric Stout c98717cb45 Fix: do not add an offset to a nullptr
This is, by specs, undefined behaviour. See
https://reviews.llvm.org/D67122

In cases where this is done, optimizations done by LLVM can
generate code that causes crashes.

GetVariableAddress() had two (legit) ways this could happen:
- For SaveLoad set to global
- For SaveLoad set to SLE_VAR_NULL, where sld->address is always
  a nullptr, and object could or could not be a nullptr.
4 years ago
Michael Lutz c558936ec3
Fix 63ccb36ef3: Crash trying to load TTO/TTD savegames. (#8356) 4 years ago
dP 452e1e3328 Codechange #8258: Remove unused town cargo caches from the savegame 4 years ago
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
dP 7045186594 Change #8159: Remove now unused town cargo caches without bumping the savegame version 4 years ago
dP ca2604c4e2 Revert #8157: Redundant change 4 years ago
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.
4 years ago
Jonathan G Rennison 54237b0e98 Codechange: Move SlSkipBytes to saveload.h 4 years ago
Charles Pigott 64b1c70fdd Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed 4 years ago
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.
4 years ago
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.
4 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
Michael Lutz 9b6f5e3bb8 Codechange: Store GS lang texts in std::strings. 4 years ago
glx22 cca613e3b8
Fix #8142, 5aa6351: Buoy owner and tile owner can be different (#8143) 4 years ago
glx 5aa6351042 Fix #8132: Corrupted savegame crashing OpenTTD on load 4 years ago
glx 0ed00ae111 Fix: Stop any gamelog action when recovering from SlError() 4 years ago
glx bc8333723c Fix #8021: limit savegame range for docking tiles fixing 4 years ago
Yexo 64278fd598 Fix: reset roadtype/streetcartype info for non-road bridges 4 years ago
Yexo 19dc31e0b3 Fix #8108: always update tile_hash after updating v->tile 4 years ago
SamuXarick 8edbb42fe8 Fix c01a2e2: crash on loading old savegames with invalid animated tile information 4 years ago
SamuXarick c01803cd42 Fix #8108: possible crash on loading TTD savegames with phantom oil rigs 4 years ago
SamuXarick 57553cd809 Fix #8020: Add missing docking tiles around industry neutral stations 4 years ago
glx 9116b22386 Fix #8011, f5381798: Dock tile in TTD savegame was only 2 bytes 4 years ago
glx 2f264f2c92 Change: Heading for 1.11 now 4 years ago
Johannes E. Krause 107283748a Feature: SLF_HEX to print hexadecimal numbers in the config file 4 years ago
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 5 years ago
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.
5 years ago
Charles Pigott d1cead7f25 Fix: When loading old timetabled saves, also reset cached timetable duration 5 years ago
Charles Pigott cddb8a4605 Fix #7587: Crash when loading saves with waypoints with invalid locations 5 years ago
Niels Martin Hansen 2fd871e2af Feature: Configurable game ending year
Functionally reverts 683b65ee1
5 years ago
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 5 years ago
glx 0b489f9924 Codechange: Replace FOR_ALL_SUBSIDIES with range-based for loops 5 years ago
glx 847e5f33d4 Codechange: Replace story related FOR_ALL with range-based for loops 5 years ago
glx 869581eb23 Codechange: Replace FOR_ALL_SIGNS with range-based for loops 5 years ago
glx b91abd3af9 Codechange: Replace FOR_ALL_ROADSTOPS with range-based for loops 5 years ago
glx 514565fad6 Codechange: Replace FOR_ALL_OBJECTS with range-based for loops 5 years ago
glx 11f178a312 Codechange: Replace FOR_ALL_STORAGES with range-based for loops 5 years ago
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
glx 9892d90b26 Codechange: Replace order related FOR_ALL with range-based for loops 5 years ago
glx 09fa39c5b5 Codechange: Replace linkgraph related FOR_ALL with range-based for loops 5 years ago
glx 00c2a98cf3 Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops 5 years ago
glx 4ae829cb27 Codechange: Replace FOR_ALL_GROUPS with range-based for loops 5 years ago
glx f58ce3db19 Codechange: Replace FOR_ALL_GOALS with range-based for loops 5 years ago
glx 1f6b3a37f9 Codechange: Replace FOR_ALL_ENGINES with range-based for loops 5 years ago
glx 1c92ba8ebe Codechange: Replace FOR_ALL_CARGO_PAYMENTS with range-based for loops 5 years ago
glx fa9769f81a Codechange: Replace FOR_ALL_DEPOTS with range-based for loops 5 years ago
glx 5fce5fa300 Codechange: Replace FOR_ALL_CARGOPACKETS with range-based for loops 5 years ago
glx 60e3cf8aff Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops 5 years ago
glx ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 5 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jack Baron e4f08f2880 Fix: Bump savegame version 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
peter1138 f538179878 Feature: Multi-tile docks and docking points. 5 years ago
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.
5 years ago
PeterN 83c1678f9e
Fix #7577: Check if linkgraph station index is valid before dereferencing. (#7583) 5 years ago
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 5 years ago
Charles Pigott 63a7df027d Fix 5db883f: Railtype bits were moved too late, leading to rails under bridges losing their type 5 years ago
Charles Pigott d9f9a64389 Fix #6507: Don't try to load invalid depots from older savegames 5 years ago
Charles Pigott 3299d6540b Cleanup: Delete GetSavegameType function since it's been commented out since 2005 5 years ago
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)
5 years ago
Charles Pigott 327ff89808 Codechange: Remove PauseModeByte 5 years ago
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 5 years ago
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 5 years ago
Charles Pigott f20b75d712 Codechange: Remove TownLayoutByte type 5 years ago
Charles Pigott 96a4787710 Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte 5 years ago
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.
5 years ago
peter1138 4f052fc2a4 Cleanup: Fix alignment after NULL -> nullptr change. 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
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.
5 years ago
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 5 years ago
Michael Lutz d3e113eb5f Codechange: Use std::vector instead of AutoDeleteSmallVector in GS text handling. 5 years ago
Michael Lutz 94c5269fa7 Codechange: Use atomic variables for thread synchronization where useful. 5 years ago
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.
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
Peter Nelson f6264e5212 Change: Bump savegame version for tree tile water class conversion. 5 years ago
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.
5 years ago
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.
5 years ago
Charles Pigott fe448a2616 Remove: OPF 5 years ago
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', ..
5 years ago
Niels Martin Hansen e8d397e4ee Codechange: Make a merged k-d tree index of all viewport signs 5 years ago
Niels Martin Hansen d84b67e54d Codechange: Make a k-d tree index of stations 5 years ago
Niels Martin Hansen 7b56be0f3a Codechange: Make a k-d tree index of towns 5 years ago
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 5 years ago
PeterN 6c6971fb43
Add: Road vehicle path cache. (#7261) 5 years ago
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.
5 years ago
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 5 years ago
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.
5 years ago
frosch a67ee02529
Change: Heading for 1.10 now (#7319) 5 years ago
PeterN c0c8fb25fb
Change: Use SlErrorCorrupt() on pool index error when loading a savegame, instead of terminating. (#7219) 5 years ago
Gabda 37bb2c9308 Codechange: Make the style of MakeVoid calls uniform (#7192) 5 years ago
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.
5 years ago
Peter Nelson 0b10678050 Change: Make ships stop in locks to move up/down instead of following the slope. 5 years ago
Peter Nelson 33e3f49161 Fix #7119: When rotating a ship, apply an additional offset to avoid movement glitch. 5 years ago
Niels Martin Hansen faee0737e0 Codechange: Separate gamelog revision length from network revision length 5 years ago
Peter Nelson e21ade375e Codechange: Change from numeric to descriptive SLV enum labels for last entries. 5 years ago
Peter Nelson 0f37a683a2 Codechange: Additional type safety for saveload version variables. 5 years ago
Peter Nelson 9de12521ec Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
5 years ago
Peter Nelson ea4ea62816 Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared. 5 years ago
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.
5 years ago
Peter Nelson 67633606b0 Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.
The original translation functionality hasn't been used since 2007.
5 years ago
Peter Nelson 225790892d Change: Make ships stop and change direction slowly instead of instantly turning. 6 years ago
Peter Nelson 81330b8d6e Change: Add path cache for ships. 6 years ago
Peter Nelson 1c725fce47 Change: Add ability to save/load std::deque<> containers. 6 years ago
Niels Martin Hansen e66cec8f86 Add: NewGRF support for 16-in-16-out industries 6 years ago
Niels Martin Hansen 8859381d30 Add: Industries can produce and accept up to 16 different cargoes 6 years ago
Charles Pigott e0c0394e37 Fix: Remove various dead or unnecessary assignments 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Michael Lutz 4b0b4e0643 Feature: [NewGRF] Increase size of persistent storage to 256. 6 years ago
Peter Nelson bf8d7df736 Change: Extend rail types to 64 (6 bit storage) 6 years ago
Peter Nelson 5db883fbe9 Change: Move rail type bits from m3 to m8. 6 years ago
Peter Nelson 65548c37a8 Change: Extend map array by 2 bytes with a uint16. 6 years ago
Charles Pigott 2aacddd412 Codechange: lengthof is not defined for runtime-length strings, use sizeof instead 6 years ago
Charles Pigott 5f86e1a390 Codechange: Silence -Wclass-memaccess warnings with GCC8 6 years ago
PeterN 11ab3c4ea2
Change: Increase cargo type limit to 64. 6 years ago
PeterN a07394a63a
Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
6 years ago
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 6 years ago
PeterN 42b43c9983
Change: Available railtypes is always calculated on load, so no need to load value for old savegames (#6782) 6 years ago
Pavel Stupnikov fef8b831a9 Change: Switch town growth rate and counter to actual game ticks (#6763) 6 years ago
J0an Josep cfb8092397 Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation. 6 years ago
Michael Lutz 7dd6027194 Codechange: Use a SmallVec for the animated tile list instead of replicating most of the logic. 6 years ago
frosch 8c458c153d (svn r27990) -Update: Docs 6 years ago
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) 6 years ago
frosch 135ad9c6c9 (svn r27929) -Cleanup: Remove unused Industry::random_triggers 7 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
peter1138 19d56a33e8 (svn r27822) -Feature: Vehicle Group Info: Add profits and occupancy display to group vehicle list (mtm, JGR) 7 years ago
peter1138 ff26c6393e (svn r27793) -Fix [FS#6450]: Use of uninitialised variable cause lzo to fail. Add check for error status. 7 years ago
frosch ca3aaf8f6d (svn r27778) -Change [FS#6442-ish]: Convenience savegame bump to distinguish 1.7 savegames from 1.6 savegames. 7 years ago
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. 7 years ago
fonsinchen 4e13285274 (svn r27770) -Fix [FS#6540]: Initialize variables in station_sl.cpp (JGR) 7 years ago
frosch 1b9139efe8 (svn r27760) -Change: Enable realisitic train and road vehicle acceleration by default. 7 years ago
frosch fc4c4d080c (svn r27757) -Change: Make StringID 32bit. 7 years ago
frosch a56e2bccd0 (svn r27756) -Codechange: Add StringTab enum 7 years ago
frosch 9ad09627ad (svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs. 7 years ago
frosch 4342798ff5 (svn r27709) -Fix-ish: Silence some warnings. (adf88) 8 years ago
frosch 31f046bd9b (svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR) 8 years ago
frosch 117e73751c (svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites. 8 years ago
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 8 years ago
alberth 0adfb1ac6f (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 8 years ago
alberth 4001f6215e (svn r27652) -Fix(r27650): Use the file operation being performed to set the _sl.action variable. 8 years ago
alberth 6f201ce4a8 (svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload. 8 years ago
alberth 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 8 years ago
alberth df9a9f074a (svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it. 8 years ago
alberth c6ac071619 (svn r27639) -Codechange: Also always set the abstract FileToSaveLoad::filetype when setting a mode. 8 years ago
alberth 2fa0fdb176 (svn r27638) -Codechange: Move FiosType enum, move and rename SetFiosType function. 8 years ago
alberth 3b8ede5ebe (svn r27637) -Codechange: Don't use _saveload_mode for scenario loading detection. 8 years ago
alberth 087ed1e999 (svn r27636) -Codechange: Rename FileType to AbstractFileType. 8 years ago
alberth 9135f7130e (svn r27635) -Codechange: Move FileType and FileToSaveLoad structure definitions. 8 years ago
frosch 4d1843a95e (svn r27627) -Codechange: Deduplicate some cursor magic into SetMouseCursorBusy. 8 years ago
frosch 13a86497ea (svn r27572) -Fix [FS#6442]: Convenience savegame bump to distinguish 1.6 savegames from 1.5 savegames. 8 years ago
frosch 0c7c0ada78 (svn r27518) -Update: Numbers 8 years ago
frosch 613212c486 (svn r27320) -Codechange: Do not drop order backups when loading a savegame for replaying. 9 years ago
frosch a97e7bae65 (svn r27291) -Fix (r27278) [FS#6303]: Some savegame data was discarded again during loading. 9 years ago
frosch 3f55e5364e (svn r27278) -Fix: Handle savegames with an unexpected amount of industry-builder or NewGRF entity-mapping more gracefully. 9 years ago
frosch 8ffe068c11 (svn r27243) -Fix (r26816) [FS#6285]: Duplicate frees due to pool item classes not having copy constructors. 9 years ago
frosch 6477356dd2 (svn r27192) -Change: heading for 1.6 now 9 years ago
frosch 780e595933 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 9 years ago
rubidium d534c80e94 (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 10 years ago
rubidium 771dcf3b7b (svn r27003) -Cleanup: fix the use of spaces and asterices "around" some comments 10 years ago
peter1138 aeda5e37e7 (svn r26978) -Fix (r23609): Typo in game script warning message. 10 years ago
rubidium fedc1acd62 (svn r26881) -Codechange: bump the savegame version 10 years ago
rubidium f41b55f0ff (svn r26880) -Add: stub settings for limiting bridge and map height 10 years ago
rubidium 9daf7e749c (svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible 10 years ago
rubidium 982f5a6aa2 (svn r26878) -Change: move m6 to TileExtended to keep Tile 8 bytes and thus better alignable 10 years ago
rubidium 0ac2d3b324 (svn r26876) -Codechange: move 'has bride above' data from m6 to type 10 years ago
rubidium 47852f119e (svn r26875) -Codechange: move TropicZone information from m6 to type 10 years ago
rubidium 04e2324b8f (svn r26873) -Change: split type_height into a type and height array (ic111) 10 years ago
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) 10 years ago
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) 10 years ago
rubidium 9e0f4b3847 (svn r26864) -Codechange: bring a bit more OO into the disaster vehicles 10 years ago
rubidium 6c2abf0930 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 10 years ago
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) 10 years ago
frosch e53d97b4f8 (svn r26816) -Fix [FS#6109]: Properly zero-initialise data in _temp_engine. 10 years ago
alberth f72ad87540 (svn r26802) -Add: Command to set visibility of an engine for a company (based on patch by Juanjo). 10 years ago
frosch 9b72a9f6b8 (svn r26787) -Fix (r20547): Loading a game with order backups leaked Orders and left unreachable items in the pool. 10 years ago
rubidium 134ad63b80 (svn r26753) -Fix: desync due to not always properly restoring game state from the savegame 10 years ago
rubidium 48d446ffeb (svn r26700) -Fix [FS#6066]: incorrect saving of order backups 10 years ago
fonsinchen 37b1d36fb8 (svn r26650) -Fix [FS#6041]: Support save/load chunk lengths of up to (1 << 32) - 1 10 years ago
fonsinchen 957f5ca117 (svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size. 10 years ago
rubidium ad64b99eb0 (svn r26636) -Fix [FS#6026-ish]: (memory) size of variables saved for disaster vehicles was not correct in saveload description 10 years ago
frosch 2a4f0fb67d (svn r26593) -Fix: Goals were saved/loaded with incorrect size. 10 years ago
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) 10 years ago
rubidium 191fd09d32 (svn r26590) -Fix: possible desync (big/little endian) due to not writing complete variables upon saveload 10 years ago
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 10 years ago
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) 10 years ago
fonsinchen 2c11eeb39e (svn r26551) -Fix: document revision number for latest savegame version change 10 years ago
fonsinchen 3ee31a8f89 (svn r26547) -Codechange: Collect order travel and wait times independent of timetables 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium b4914b91d9 (svn r26493) -Codechange: use strecat to concatenate script settings instead of manually accounting for the amount of characters that has been written 10 years ago
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 10 years ago
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 10 years ago
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 10 years ago
peter1138 567d0ff3a7 (svn r26450) -Feature: Hierarchical vehicle subgroups. 10 years ago
frosch 8ff9499fe2 (svn r26409) -Update: Version number in some more places. 10 years ago
frosch a32d18cbb9 (svn r26371) -Fix [FS#5831]: Calling DoCommandP during the gameloop cleared pending persistent storage changes. 10 years ago
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. 11 years ago
frosch 49852e3dac (svn r26175) -Add: Log in desync output when persistent storage is discarded. 11 years ago
frosch b02179bd8e (svn r26169) -Fix-ish [FS#5831-ish]: Unify the time a RV needs to travel through a curve. 11 years ago
rubidium 77e5b1e3b2 (svn r26115) -Fix: AfterLoadGame can throw an exception; from the old savegame load section this wouldn't be caught 11 years ago
rubidium d9ee35006d (svn r26064) -Fix: possible uninitialised array when loading a broken TT-ish savegame 11 years ago
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 11 years ago
rubidium b3e93d6520 (svn r26057) -Fix: a number of possibly uninitialised variables 11 years ago
rubidium 1ffcdbd515 (svn r25954) -Fix [FS#5731]: All semaphores got converted to electric signals when loading savegames from v15 to v20 (adf88) 11 years ago
rubidium a7fd0f8f5d (svn r25953) -Fix [FS#5732]: Wrong bits used when converting signal types/variants while loading savegames older than v64 (adf88) 11 years ago
fonsinchen bd230f34f4 (svn r25900) -Change [FS#5677]: Allow restricted flows to be picked for kept cargo. 11 years ago
fonsinchen 6524849386 (svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore. 11 years ago
fonsinchen 29e987f3fc (svn r25898) -Codechange: Add second timestamp for 'restricted links' to all edges. 11 years ago
fonsinchen ec2d36a4a4 (svn r25897) -Fix: Dates are int32, not uint32, and should be saved as such. 11 years ago
frosch 871519f75a (svn r25855) -Fix [FS#5788] (r25833): Obiwan messed up savegame conversion. 11 years ago
zuu fb5dc7762b (svn r25852) -Codechange: Merge GetFenceXX/SetFenceXX into one common GetFonce/SetFence for all directions that take an extra direction parameter (cirdan, LordAro) 11 years ago
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) 11 years ago
frosch 69a0c91d63 (svn r25844) -Change: Increase maximum number of object instances on the map from 64k to about 16M. 11 years ago
frosch 35d7e8bca4 (svn r25833) -Codechange: Move ObjectType from map array into pool item. 11 years ago
frosch 2080a8c16f (svn r25832) -Codechange: Reduce variety of object type test functions. 11 years ago
frosch 4912e3170e (svn r25817) -Fix [FS5750-ish]: Handle savegames which contain GS translations for languages with empty name more gently. 11 years ago
frosch b0a063ed77 (svn r25702) -Add: about 3000 years of savegame compatibility. 11 years ago
zuu 09897c5fd6 (svn r25620) -Fix (r25342): Save/load of story books were broken 11 years ago
rubidium dd49c84363 (svn r25510) -Fix: forgot to update some documentation 11 years ago
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)
11 years ago
fonsinchen 06d95e9123 (svn r25390) -Fix: add missing compatibility settings in afterload. 11 years ago
rubidium b860353a66 (svn r25387) -Fix: "typos" in @file filename 11 years ago
fonsinchen 0e5fa8d195 (svn r25363) -Codechange: bump the savegame version for cargodist 11 years ago
fonsinchen 741c431caa (svn r25362) -Feature: consider cargo waiting at other stations for rating at the origin station 11 years ago
fonsinchen 04e3eb6fab (svn r25361) -Feature: distribute cargo according to plan given by linkgraph 11 years ago
fonsinchen a2ff96d682 (svn r25360) -Codechange: save and load flow stats 11 years ago
fonsinchen 3d0a0e8e48 (svn r25358) -Codechange: save and load link graph jobs and the schedule 11 years ago
zuu 9aa1bf0264 (svn r25342) -Add: StoryPage data structures and GS API 11 years ago
fonsinchen 16307a8a6f (svn r25337) -Fix: saving only 8 bits of 16 causes endianness problems 11 years ago
rubidium f292a87dc4 (svn r25312) -Fix-ish: missing spaces after comma + realignment of tables; quite boring with -x -w 11 years ago
zuu a4cddc3e08 (svn r25296) -Feature: Goals can now have a progress text and/or be marked as completed. 11 years ago
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 11 years ago
rubidium 0cc3d8df4b (svn r25258) -Codechange: save linkgraph (fonsinchen) 11 years ago
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) 11 years ago
rubidium aa2c1ce4b0 (svn r25152) -Fix-ish [FS#5520]: remove stray reservation from savegames affected by FS#5510 et al. upon loading 11 years ago
rubidium 327615c2ce (svn r25136) -Merge: 1.3 release (documentation) updates 11 years ago
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. 11 years ago
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. 12 years ago
rubidium cdb0a76958 (svn r25012) -Codechange: persistently keep 'reserved' cargo (for full-load improved loading) instead of calculating if for every cycle 12 years ago
rubidium 446d50f658 (svn r25011) -Codechange: allow vehicle transfer and profit text effects to be shown at the same time (fonsinchen) 12 years ago
rubidium ced17303c2 (svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138) 12 years ago
rubidium 369a6f9d1b (svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138) 12 years ago
rubidium c77cd1f409 (svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138) 12 years ago
peter1138 c00a400cc7 (svn r24905) -Feature(ish): Implement station randomisation triggers. 12 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
rubidium f4915ce34f (svn r24878) -Update: the obligatory first of January commit 12 years ago
rubidium d5d96ba683 (svn r24877) -Fix: some whitespace "errors" 12 years ago
frosch 0e4b212c45 (svn r24810) -Fix: Make engine preview offers more robust wrt. changes in the company ranking. 12 years ago
frosch d8fb8e6cfc (svn r24795) -Fix (r24789): Unfinished patch. 12 years ago
frosch d1ab0f03bc (svn r24790) -Remove: Classic difficulty profiles. 12 years ago
frosch 812ae4140a (svn r24789) -Add: Separate setting to control the default settings of newly added scripts and random AIs. 12 years ago
alberth 732e073261 (svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb) 12 years ago
rubidium 3a40a0f1e8 (svn r24754) -Fix [FS#5367]: crash on corrupted savegame 12 years ago
frosch 883f9bec9b (svn r24718) -Codechange: Rename GoodsEntry::days_since_pickup to GoodsEntry::time_since_pickup. 12 years ago
frosch ce87b8fc63 (svn r24717) -Fix [FS#5139]: When starting a scenario apply the local company settings to the new company. 12 years ago
planetmaker f2e94237fc (svn r24619) -Change: Check for bankruptcy on a monthly basis (ZxBioHazardZx) 12 years ago
frosch 0ba2ed7676 (svn r24565) -Fix: Stop both price and payment inflation if either of them has reached MAX_INFLATION. 12 years ago
frosch 7122602026 (svn r24564) -Fix [FS#5312] (r17433): Limiting the inflation did not quite work. 12 years ago
alberth 5add39d560 (svn r24540) -Codechange: Remove the not-so-useful HALF_TILE_SIZE constant. 12 years ago
frosch b11b0bb0e2 (svn r24482) -Fix [FS#5232] (r24180): Do not call RebuildSubsidisedSourceAndDestinationCache() before subsidy savegame conversion is finished. 12 years ago
frosch 9527bad3a7 (svn r24446) -Add [FS#5199]: Store more consist properties in order backups. 12 years ago
frosch fcbe53d204 (svn r24445) -Fix: Do not load order backups when loading a server-saved game in single player. 12 years ago
frosch 5ce1971588 (svn r24444) -Codechange: Base OrderBackup on BaseConsist. 12 years ago
alberth 05aaf18d38 (svn r24405) -Add: Save and load of active cargo monitors. 12 years ago
frosch 0d03c1ff85 (svn r24182) -Fix [FS#5169-ish]: The population of a town was computed incorrectly for overridden houses when loading a game. 12 years ago
rubidium b926277caf (svn r24180) -Codechange/feature-ish: add cache checker for the town's cache 12 years ago
rubidium 41e5c839e0 (svn r24179) -Codechange: move some variables of Town to TownCache 12 years ago
frosch 0f0e7e43cf (svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount(). 12 years ago
michi_cc 6a70abbd99 (svn r24136) -Feature [FS#4465]: Autoreplace vehicles only when they get old. (Vikthor) 12 years ago
michi_cc f3e295b4ec (svn r24134) -Add: Configurable limits for tree planting. 12 years ago
michi_cc 6f9668330e (svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile loop. (monoid) 12 years ago
rubidium 4e3b95067b (svn r24033) -Fix: reset "is random" status of temporary variable during saveload as it's not always written to when loading an AI which means it'd be taking the is random setting of another AI. 12 years ago
michi_cc 5aeae7ca49 (svn r23973) -Fix (r23947): Also save the maximum travel speed for the current vehicle order. 13 years ago
rubidium 1c4827cc71 (svn r23967) -Fix-ish: don't fix road ownership of standard road stops each time you load a savegame, only when loading an old one 13 years ago
michi_cc f2c694c8fb (svn r23947) -Feature: Timetabled maximum travel speeds for non-flying vehicles. 13 years ago
rubidium 060cac439c (svn r23942) -Fix: infrastructure cache of standard road stops would get messed up when buying a company with them 13 years ago
frosch 07f69d8b88 (svn r23920) -Fix: Consider only the middle tile of a lock for lock-infrastructure costs. The other two tiles may be owned by other companies. Also do not count the middle tile of a lock as canal, independent of whether it is build on ground or river slope. 13 years ago
rubidium d99eb6aac2 (svn r23853) -Fix: several incorrect @files 13 years ago
michi_cc 52b951ca6f (svn r23844) -Fix (r23414): Infrastructure count for stations wasn't updated properly on company takeover. And don't count buoys while loading a game either. 13 years ago
frosch 5bf1710a28 (svn r23835) -Change [FS#4999]: Make signs placed in scenario editor belong to the GS. That way they are always shown in game and are not editable. 13 years ago
frosch d5e0be7d7f (svn r23829) -Fix [FS#4996]: Loading empty GS strings/translations failed. 13 years ago
frosch 5fa15c563c (svn r23828) -Fix: Return early from SlString() for empty strings, before doing invalid things which surprisingly do not break everything. 13 years ago
rubidium 70c7fbd90e (svn r23826) -Fix [FS#4972]: the detailed performance rating window showed the cargo count of the current quarter instead of the last quarter like the tooltip says 13 years ago
yexo 2c99805117 (svn r23816) -Fix (r23635, r23805): make SCC_ENCODED the first entry in the StringControlCode enum since it's value is not allowed to change 13 years ago