summaryrefslogtreecommitdiff
path: root/src/saveload/economy_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: rework several CH_RIFF chunks to use CH_ARRAY insteadPatric Stout
This adds two byte extra to those chunks, and might feel a bit silly at first. But in later changes we will prefix CH_ARRAY with a table header, and then this change shines. Without this, we could still add headers to these chunks, but any external reader wouldn't know if the CH_RIFF has them or not. This way is much more practical, as they are now more like any other chunk.
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-27Cleanup: Remove save-only autolength flag from economy chunk handlerscirdan
CH_AUTO_LENGTH is only used when saving chunks; it makes no sense to set it for chunks without a save handler.
2019-12-21Codechange: Replace FOR_ALL_CARGO_PAYMENTS 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-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.
2018-06-26Change: Increase cargo type limit to 64.PeterN
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
2013-02-17(svn r25011) -Codechange: allow vehicle transfer and profit text effects to ↵rubidium
be shown at the same time (fonsinchen)
2010-11-21(svn r21284) -Codechange: Rename CheckSavegameVersion() to ↵alberth
IsSavegameVersionBefore().
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-11-08(svn r18008) -Codechange: Rename NUM_PRICES to PR_END, and use the Price ↵frosch
enum some more.
2009-09-06(svn r17433) -Codechange: Store cumulated inflation in savegame and compute ↵frosch
all prices from that instead of storing all prices separately. Note: Savegame conversion computes the inflation from max loan. Prices from modified savegames will get lost. TTO savegames will also behave slightly different. -Change: NewGRF price modifiers now take effect everytime when loading NewGRFs instead of once on gamestart.
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-06-29(svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for ↵rubidium
whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others: * cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder) * cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore * industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
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-01-04(svn r14828) -Codechange: move most of save/load-specific code to separate filessmatz