Commit Graph

52 Commits

Author SHA1 Message Date
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
glx22 6e627f35ac Cleanup: Remove now unneeded ChunkHandler members 2021-07-06 22:29:08 +02:00
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 8e91527251 Codechange: mark chunks that are not stored as CH_READONLY
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-15 19:36:15 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +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 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 2020-12-15 00:29:30 +01:00
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
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.
2020-01-12 19:08:38 +01:00
Charles Pigott cddb8a4605 Fix #7587: Crash when loading saves with waypoints with invalid locations 2020-01-05 20:51:26 +00:00
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 9892d90b26 Codechange: Replace order related FOR_ALL 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
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00: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
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 0f0e7e43cf (svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount(). 2012-04-22 16:28:14 +00:00
rubidium 13fd2cd335 (svn r22057) -Fix: waypoint conversion could (previously) silently overfill the pool and crash 2011-02-11 09:33:38 +00:00
alberth 3e27739287 (svn r21284) -Codechange: Rename CheckSavegameVersion() to IsSavegameVersionBefore(). 2010-11-21 12:47:04 +00:00
rubidium 7148a8e21f (svn r21074) -Fix [FS#4194]: Crash when loading a corrupted 0.7.x (or before) savegame where the waypoint refered to an already removed town 2010-11-01 22:27:34 +00:00
rubidium edbadde301 (svn r20406) -Codechange: make StationClass use the new generic class 2010-08-07 22:07:07 +00:00
rubidium b6a0806948 (svn r20400) -Codechange: let StationSpec use GRFFilePropsBase 2010-08-07 20:52:45 +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 ac9af8e1e1 (svn r19738) -Fix: MSVC 64 bits compile warnings 2010-04-29 18:28:24 +00:00
rubidium 7590651aea (svn r19612) -Fix [FS#3756] (r3212): crash when opening a savegame with a waypoint from around 0.4.0 2010-04-11 21:46:20 +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 d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 35d5a197d6 (svn r17138) -Fix: some MSVC 64 bits compiler warnings 2009-08-09 19:06:35 +00:00
rubidium 0bb3d7030f (svn r17004) -Fix (r16909): StationRect of loading buoys/waypoints wasn't correctly set when loading 'old' games. 2009-07-31 19:04:22 +00:00
rubidium cf38a5bee6 (svn r16939) -Codechange: s/RailwayStation/RailStation/ to unify the way it's written. 2009-07-24 11:47:12 +00:00
rubidium cb0409fe52 (svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h 2009-07-22 10:18:19 +00:00
rubidium 68ead6b84f (svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
2009-07-22 08:59:57 +00:00
rubidium 0658d6cb3d (svn r16900) -Codechange: prepare the waypoint window for buoys 2009-07-21 16:30:01 +00:00
rubidium ed5ced71c8 (svn r16897) -Codechange: use the 'generic' station spec to station allocation for waypoints too 2009-07-21 11:20:34 +00:00
rubidium c9cab7ba19 (svn r16862) -Codechange: make waypoints use the same system of station station spec lists. 2009-07-17 20:40:29 +00:00
rubidium 9933df9d89 (svn r16855) -Codechange: remove unused 'conversion' stuff from the waypoint struct and make it more similar to Station. 2009-07-16 23:02:39 +00:00
rubidium a007d609af (svn r16854) -Fix (r2046): savegames from before this version would get the town id as their 'index' (#<num). For stations with custom names that custom name would be dropped and the lowest 6 bits of the StringID would be used for the 'index'. In other words, it resulted in a mess. 2009-07-16 22:58:06 +00:00
rubidium 665fa7f9c1 (svn r16851) -Codechange: use StationSpecList in waypoint too 2009-07-16 20:29:08 +00:00
rubidium dea1144bcb (svn r16850) -Codechange: unify some naming of variables between waypoints and stations. 2009-07-16 20:15:28 +00:00