Commit Graph

28 Commits

Author SHA1 Message Date
glx22 2c941cd8b3 Codechange: Use ChunkHandlers sub-classes 2021-07-06 22:29:08 +02:00
glx22 c1a9fe6fbd Codechange: Use static array of references to ChunkHandler 2021-07-06 22:29:08 +02:00
Patric Stout cdb3dd0493 Add: store headers for most savegame chunks
When a header is added, the chunk changes from CH_ARRAY type to
CH_TABLE type.
2021-07-02 22:21:58 +02:00
glx22 c27afdf3f6 Codechange: Remove FOR_ALL_CHUNK_HANDLERS
Co-Authored-By: Patric Stout <truebrain@openttd.org>
2021-06-06 19:35:06 +02:00
Patric Stout 9fff00ba20
Codechange: C++-ify lists for SaveLoad (#9323)
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-05-31 22:26:44 +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
glx 869581eb23 Codechange: Replace FOR_ALL_SIGNS 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
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02: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
alberth 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 2016-09-04 12:57:43 +00:00
alberth 3b8ede5ebe (svn r27637) -Codechange: Don't use _saveload_mode for scenario loading detection. 2016-09-04 12:46:29 +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
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. 2012-01-22 13:54:02 +00:00
truebrain 102f811d02 (svn r23636) -Add: introduce ScriptText in parameters where it can be used 2011-12-19 21:06:06 +00:00
rubidium 643c54d288 (svn r23105) -Fix (r23104): Kenobi visited me ;) 2011-11-04 11:29:11 +00:00
rubidium f01b3e2721 (svn r23104) -Codechange: prepare the vehicle/sign z for some further changes to reduce casting 2011-11-04 11:09:06 +00:00
rubidium 5a620d1c65 (svn r22406) -Document: some more "random-ish" tidbits 2011-05-01 19:51:52 +00:00
alberth 3e27739287 (svn r21284) -Codechange: Rename CheckSavegameVersion() to IsSavegameVersionBefore(). 2010-11-21 12:47:04 +00:00
alberth edef25d30c (svn r21282) -Codechange: Rename CheckSavegameVersionOldStyle() to IsSavegameVersionBefore(). 2010-11-21 12:31:16 +00:00
frosch 62ac138154 (svn r19973) -Codechange: Add another procedure to chunk handlers for checking savegames (empty for now). 2010-06-13 14:11:59 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 570af0ce44 (svn r16338) -Codechange: split loading of references to two phases
In the first phase, indexes are stored. In the second phase, indexes are checked for validity and converted to pointers
2009-05-17 16:28:29 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz 52e0c6fd35 (svn r15137) -Fix (r11822)(r14340): signs with sign 'Sign' were lost when converting from TTD savegames 2009-01-18 16:20:04 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00