Commit Graph

8 Commits

Author SHA1 Message Date
Rubidium e3f49ee7a0 Codechange: coding style fixes 2024-01-04 16:23:54 +01:00
Rubidium c9276c2959 Codechange: replace x.size() == 0 with x.empty() 2023-10-20 23:05:43 +02:00
Rubidium 2aa48bfcb3 Add: subspan function to span 2023-06-21 05:46:11 +02:00
Michael Lutz fe27db3dfd Codechange: [Linkgraph] Store edges in each node and not in a global matrix. 2023-02-26 21:41:24 +01:00
Michael Lutz a05fd7aa50 Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
2021-12-16 22:28:32 +01:00
Michael Lutz 39e8783f4b Fix: Template syntax error when using 'span' with a container type. 2021-12-16 22:28:32 +01:00
Patric Stout 7dd5fd6ed4 Feature: framework to make savegames self-descriptive
We won't be able to make it fully self-descriptive (looking at you
MAP-chunks), but anything else can. With this framework, we can
add headers for each chunk explaining how each chunk looks like
in detail.

They also will all be tables, making it a lot easier to read in
external tooling, and opening the way to consider a database
(like SQLite) to use as savegame format.

Lastly, with the headers in the savegame, you can freely add
fields without needing a savegame version bump; older versions
of OpenTTD will simply ignore the new field. This also means
we can remove all the SLE_CONDNULL, as they are irrelevant.

The next few commits will start using this framework.
2021-07-02 22:21:58 +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