summaryrefslogtreecommitdiff
path: root/src/saveload/engine_sl.cpp
AgeCommit message (Collapse)Author
2021-06-15Codechange: mark chunks that are not stored as CH_READONLYPatric Stout
This makes it easier to spot chunks that have a save_proc that is a nullptr, but also prevents confusion, where it looks like the CH_ type of a chunk has influence on how it is being read. It is not, it is only used for saving.
2021-06-15Change: prefix SL_ARR with the length of the arrayPatric Stout
This means that during loading we can validate that what is saved is also that what is expected. Additionally, this makes all list types similar to how they are stored on disk: First a gamma to indicate length, followed by the data. The size still depends on the type.
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.
2020-12-15Codechange: Make use of the improved C++17 emplace_back function.Michael Lutz
2020-05-21Codechange: Use std::string for most of the user-settable custom names.Michael Lutz
2020-01-12Fix #7925: Reset temporary saveload data at the start of loading a savegame ↵frosch
instead of at the end. Otherwise temporary data may be passed from an aborted load action to the next load action.
2019-12-21Codechange: Replace FOR_ALL_ENGINES with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-13Cleanup: Fix alignment after NULL -> nullptr change.peter1138
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
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.
2015-04-23(svn r27243) -Fix (r26816) [FS#6285]: Duplicate frees due to pool item ↵frosch
classes not having copy constructors.
2014-09-13(svn r26816) -Fix [FS#6109]: Properly zero-initialise data in _temp_engine.frosch
2014-09-07(svn r26802) -Add: Command to set visibility of an engine for a company ↵alberth
(based on patch by Juanjo).
2014-04-25(svn r26509) -Codechange: replace strdup with stredup (the latter ensures ↵rubidium
the return is not NULL)
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
2012-12-09(svn r24810) -Fix: Make engine preview offers more robust wrt. changes in ↵frosch
the company ranking.
2010-10-01(svn r20860) -Cleanup: remove some unused functions and variablessmatz
2010-08-02(svn r20311) -Codechange: don't reserve extra space in the savegame that is ↵yexo
never used
2010-06-13(svn r19973) -Codechange: Add another procedure to chunk handlers for ↵frosch
checking savegames (empty for now).
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-06-17(svn r16586) -Codechange: don't store lifelength in the savegame; it can ↵rubidium
easily be calculated, it isn't used often and now changing extend_vehicle_life in game has some effect.
2009-05-17(svn r16338) -Codechange: split loading of references to two phasessmatz
In the first phase, indexes are stored. In the second phase, indexes are checked for validity and converted to pointers
2009-03-08(svn r15645) -Fix (r12924)[FS#2612]: Add an EngineOverrideManager to give ↵frosch
the term 'compatible newgrf' again some sense and to not crash because of trivial changes.
2009-01-31(svn r15299) -Cleanup: remove many redundant includessmatz
2009-01-04(svn r14828) -Codechange: move most of save/load-specific code to separate filessmatz