Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-06-14 | Codechange: remove the special station/vehicle code from SaveLoad | Patric 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-14 | Codechange: ability to store structs and list of structs in savegames | Patric Stout | |
The commits following this will use this new functionality. Currently, a few places do this manually. This has as drawback that the Save() and Load() code need to be in sync, and that any change can result in (old) savegames no longer loading. In general, it is annoying code to maintain. By putting everything in a description table, and use that for both Save() and Load(), it becomes easier to see what is going on, and hopefully less likely for people to make mistakes. | |||
2021-06-13 | Codechange: convert printf DEBUG statements to fmt Debug statements | rubidium42 | |
2021-06-10 | Codechange: rename SL_LST to SL_REFLIST to highlight the "reference" part | Patric 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-10 | Codechange: refactor SlList to use SlStorageHelper | Patric Stout | |
2021-06-10 | Codechange: refactor SlDequeueHelper to work with unsigned and be more generic | Patric Stout | |
Future additions will start using it for std::list too. | |||
2021-06-10 | Codechange: use wrappers to get Var[Mem|File]Type, instead of GB() | Patric Stout | |
2021-06-10 | Codechange: move GetVariableAddress inside SlObjectMember | Patric Stout | |
Also move it to static, as nobody else is using it. | |||
2021-06-07 | Codechange: make [Save|Load]Settings() behave more like other Save/Load code ↵ | Patric Stout | |
(#9335) Prepare the full description and send it to SlObject. This does require some code to be able to read to a SLE_VAR_NULL, like strings etc, as there is no way to know their length beforehand. | |||
2021-06-06 | Codechange: move SLF_NO_NETWORK_SYNC into settings | Patric Stout | |
It is a settings-only flag, so don't pollute SaveLoad code with it. | |||
2021-06-06 | Codechange: move SLF_NOT_IN_SAVE into settings | Patric Stout | |
It is a settings-only flag, so don't pollute SaveLoad code with it. | |||
2021-06-06 | Codechange: Remove FOR_ALL_CHUNK_HANDLERS | glx22 | |
Co-Authored-By: Patric Stout <truebrain@openttd.org> | |||
2021-06-03 | Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways ↵ | Patric Stout | |
we had While at it, replace OTTD_ASSERT with WITH_ASSERT, as this is always set if assert() is valid. No matter if NDEBUG is set or not. | |||
2021-05-31 | Codechange: 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-05-29 | Codechange: rename str_validate to StrMakeValid(InPlace) (#9304) | Patric Stout | |
This to be more explicit the function changes the value, and not returns yes/no. | |||
2021-05-15 | Change: Use gender-neutral pronouns | rubidium42 | |
2021-05-13 | Codechange: clean up C-string support from settings | rubidium42 | |
2021-05-13 | Codechange: move misc settings to std::string | rubidium42 | |
2021-04-29 | Fix: [MinGW] Set minimum OS version to Windows XP (#9135) | Loïc Guilloux | |
2021-02-28 | Add: settings to limit your fast-forward game speed | Patric Stout | |
By default this setting is set to 2500% normal game speed. | |||
2021-01-08 | Codechange: Remove min/max functions in favour of STL variants (#8502) | Charles Pigott | |
2021-01-01 | Codechange: move some DEBUG-levels and remove some others in saveload ↵ | Patric Stout | |
routine (#8474) When running with -dsl=2 it is very easy to miss important information as there was a lot of noise in between too. This tunes the debug levels a bit to be less noisy while keeping the important bits. | |||
2020-12-27 | Codechange: Even more std::string usage in file IO. | Michael Lutz | |
2020-12-27 | Codechange: Convert some more FIO functions to take std::string. | Michael Lutz | |
2020-12-27 | Codechange: Replace assert_compile macro with static_assert | Charles Pigott | |
2020-12-27 | Cleanup: Remove unused ChunkType flag CH_AUTO_LENGTH | cirdan | |
CH_AUTO_LENGTH is no longer used anywhere, so remove all code that depends on it. | |||
2020-12-22 | Fix: next 67 savegame versions are used in PatchPacks; skip them (#8411) | Patric Stout | |
Various of PatchPacks (Spring 2013, Joker, ChillPP) used versions slightly higher than ours. Of course, as time went by, this caught up with us, and we are now almost pushing a new version that would conflict with them. To avoid users creating unneeded issues about "why can I not load my savegame", lets be ahead of the curve and flat-out refuse to load them. Version-wise, this is totally fine. We have ~32k versions to go before we run out (0x8000 is masked by JGRPP; we should avoid using that). At the rate we bump savegames, this is not going to happen in any sane reality. | |||
2020-12-15 | Add: support for emscripten (play-OpenTTD-in-the-browser) | Patric Stout | |
Emscripten compiles to WASM, which can be loaded via HTML / JavaScript. This allows you to play OpenTTD inside a browser. Co-authored-by: milek7 <me@milek7.pl> | |||
2020-12-06 | Codechange: don't do work GetVariableAddress() is already doing | Patric Stout | |
2020-06-28 | Codechange: Move SlSkipBytes to saveload.h | Jonathan G Rennison | |
2020-05-21 | Codechange: Use std::string for most of the user-settable custom names. | Michael Lutz | |
2020-05-21 | Codechange: Store GS lang texts in std::strings. | Michael Lutz | |
2020-05-10 | Fix: Stop any gamelog action when recovering from SlError() | glx | |
2020-01-12 | Fix #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-21 | Codechange: Replace FOR_ALL_COMPANIES with range-based for loops | glx | |
2019-11-10 | Cleanup: Removed SVN headers | S. D. Cloudt | |
2019-09-29 | Fix: Some typos found using codespell | JMcKiern | |
2019-04-29 | Cleanup: Delete GetSavegameType function since it's been commented out since ↵ | Charles Pigott | |
2005 | |||
2019-04-13 | Cleanup: Fix alignment after NULL -> nullptr change. | peter1138 | |
2019-04-10 | Codechange: Use null pointer literal instead of the NULL macro | Henry Wilson | |
2019-04-09 | Remove: AutoFreeSmallVector. | Michael Lutz | |
The last use was for storing a list of memory blocks. As the way these lists are accessed is very specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour. | |||
2019-04-06 | Codechange: Use atomic variables for thread synchronization where useful. | Michael Lutz | |
2019-04-06 | Codechange: Replace custom thread code with C++11 thread objects. | Michael Lutz | |
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully. | |||
2019-03-26 | Cleanup: Remove unused size template parameters from SmallMap and ↵ | Henry Wilson | |
Auto[Free|Delete]SmallVector | |||
2019-03-26 | Codechange: Replaced SmallVector::Append() with ↵ | Henry Wilson | |
std::vector::[push|emplace]_back() | |||
2019-03-26 | Codechange: Replace SmallVector::Length() with std::vector::size() | Henry Wilson | |
2019-03-24 | Codechange: Use override specifer for overriding member declarations | Henry Wilson | |
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template. | |||
2019-03-11 | Codechange: liblzma is called liblzma, how ever strange that might be | Patric Stout | |
It is the only library we use that calls itself with 'lib' in the name. This might be confusing, but with the arrival of cmake a lot of these things are automated. And detection will find 'liblzma', not 'lzma', like with 'lzo', 'zlib', .. | |||
2019-02-13 | Change: Use SlErrorCorrupt() on pool index error when loading a savegame, ↵ | PeterN | |
instead of terminating. (#7219) | |||
2019-02-02 | Codechange: Additional type safety for saveload version variables. | Peter Nelson | |