summaryrefslogtreecommitdiff
path: root/src/saveload/vehicle_sl.cpp
AgeCommit message (Collapse)Author
2021-07-06Cleanup: Remove now unneeded ChunkHandler membersglx22
2021-07-06Codechange: Use ChunkHandlers sub-classesglx22
2021-07-06Codechange: Use static array of references to ChunkHandlerglx22
2021-07-02Add: store headers for chunks with SL_STRUCTLISTPatric Stout
2021-07-02Feature: framework to make savegames self-descriptivePatric Stout
We won't be able to make it fully self-descriptive (looking at you MAP-chunks), but anything else can. With this framework, we can add headers for each chunk explaining how each chunk looks like in detail. They also will all be tables, making it a lot easier to read in external tooling, and opening the way to consider a database (like SQLite) to use as savegame format. Lastly, with the headers in the savegame, you can freely add fields without needing a savegame version bump; older versions of OpenTTD will simply ignore the new field. This also means we can remove all the SLE_CONDNULL, as they are irrelevant. The next few commits will start using this framework.
2021-06-14Codechange: remove the special station/vehicle code from SaveLoadPatric Stout
With the new SLEG_STRUCT it is much easier to embed a struct in a struct, where the sub-struct has limitations on when it is being used. This makes both the code easier to read (less magic) and avoids the SaveLoad needing to know all these things about Stations and Vehicles.
2021-06-10Codechange: rename SL_LST to SL_REFLIST to highlight the "reference" partPatric Stout
You can easily mistake SlList / SL_LST to be a list of SL_VAR, but it is a list of SL_REF. With this rename, it hopefully saves a few people from "wtf?" moments.
2021-06-06Codechange: Remove FOR_ALL_CHUNK_HANDLERSglx22
Co-Authored-By: Patric Stout <truebrain@openttd.org>
2021-05-31Codechange: C++-ify lists for SaveLoad (#9323)Patric Stout
Basically, this changes "SaveLoad *" to either: 1) "SaveLoadTable" if a list of SaveLoads was meant 2) "SaveLoad &" if a single entry was meant As added bonus, this removes SL_END / SLE_END / SLEG_END. This also adds core/span.hpp, a "std::span"-lite.
2021-01-18Fix #8589, 653e7fa548: Motion counter is NewGRF-visible but not saved, ↵Michael Lutz
leading to desyncs. (#8591)
2021-01-17Fix eeb88e8: Trains reversed while paused do not correctly update sprite ↵Matt Kimber
bounds (#8540)
2021-01-05Codechange: create MutableSpriteCache to remove the need to cast Vehicle to ↵Matt Kimber
a mutable type in render methods
2020-05-21Codechange: Use std::string for most of the user-settable custom names.Michael Lutz
2019-12-21Codechange: Replace vehicle related FOR_ALL with range-based for loopsglx
2019-12-21Codechange: Replace FOR_ALL_ENGINES with range-based for loopsglx
2019-12-21Codechange: Replace station related FOR_ALL with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-05-01Feature: Add NotRoadTypes (NRT)peter1138
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-08Add: Road vehicle path cache. (#7261)PeterN
2019-02-04Fix #7119: When rotating a ship, apply an additional offset to avoid ↵Peter Nelson
movement glitch.
2019-02-02Codechange: Change from numeric to descriptive SLV enum labels for last entries.Peter Nelson
2019-02-02Codechange: Convert saveload numbers to enum values.Peter Nelson
(This was mostly achieved with a few in-place regexes)
2019-02-02Codechange: Make saveload version upper bound exclusive, i.e. version object ↵Peter Nelson
was removed instead of version object last appeared.
2019-01-30Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.Peter Nelson
The original translation functionality hasn't been used since 2007.
2019-01-24Change: Make ships stop and change direction slowly instead of instantly ↵Peter Nelson
turning.
2019-01-19Change: Add path cache for ships.Peter Nelson
2018-05-22Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)PeterN
The value is either unused or always the same as this->direction.
2018-04-30Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation.J0an Josep
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2017-03-24(svn r27822) -Feature: Vehicle Group Info: Add profits and occupancy display ↵peter1138
to group vehicle list (mtm, JGR)
2016-10-16(svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites.frosch
2016-10-16(svn r27666) -Codechange: Pass vehicle sprites around using a struct ↵frosch
VehicleSpriteSeq.
2014-09-21(svn r26872) -Change: give the disaster vehicles the same treatment as ↵rubidium
aircraft in r26866; make the ascend and descend if needed to cross high mountains (based on patch by ic111)
2014-09-21(svn r26866) -Change: make aircraft ascend/descend when they are too close ↵rubidium
to the ground or too far away (based on patch by ic111)
2014-09-20(svn r26864) -Codechange: bring a bit more OO into the disaster vehiclesrubidium
2014-09-20(svn r26863) -Codechange: move a number of Vehicle* functions into the ↵rubidium
Vehicle class
2014-06-09(svn r26636) -Fix [FS#6026-ish]: (memory) size of variables saved for ↵rubidium
disaster vehicles was not correct in saveload description
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-02-07(svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity ↵frosch
when they are not supposed to, and truncate cargo appropiately if they are allowed to.
2013-05-19(svn r25259) -Codechange: track capacities and usage of linksrubidium
2013-02-24(svn r25041) -Remove [FS#3764-ish]: ordered refit with subtypes, since the ↵frosch
cases where it worked were corner cases rather than the general case.
2013-02-17(svn r25012) -Codechange: persistently keep 'reserved' cargo (for full-load ↵rubidium
improved loading) instead of calculating if for every cycle
2013-02-14(svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag ↵rubidium
appropriately on creation (peter1138)
2013-02-14(svn r24995) -Codechange: Add flags to vehicle service interval for custom & ↵rubidium
ispercent (peter1138)
2013-02-14(svn r24994) -Codechange: Replace access to service_interval with accessors ↵rubidium
(peter1138)
2012-02-21(svn r23973) -Fix (r23947): Also save the maximum travel speed for the ↵michi_cc
current vehicle order.
2012-01-08(svn r23773) -Change: [NewGRF] Update all cached train properties if a train ↵michi_cc
vehicle enters a new railtype.
2012-01-02(svn r23713) -Codechange: split VehicleMove() into two functions, to ↵truebrain
minimalize the work done where possible
2011-12-19(svn r23636) -Add: introduce ScriptText in parameters where it can be usedtruebrain