MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SlLoadChunks

Function SlLoadChunks

src/saveload/saveload.cpp:2311–2323  ·  view source on GitHub ↗

Load all chunks */

Source from the content-addressed store, hash-verified

2309
2310/** Load all chunks */
2311static void SlLoadChunks()
2312{
2313 uint32_t id;
2314 const ChunkHandler *ch;
2315
2316 for (id = SlReadUint32(); id != 0; id = SlReadUint32()) {
2317 Debug(sl, 2, "Loading chunk {:c}{:c}{:c}{:c}", id >> 24, id >> 16, id >> 8, id);
2318
2319 ch = SlFindChunkHandler(id);
2320 if (ch == nullptr) SlErrorCorrupt("Unknown chunk type");
2321 SlLoadChunk(*ch);
2322 }
2323}
2324
2325/** Load all chunks for savegame checking */
2326static void SlLoadCheckChunks()

Callers 1

DoLoadFunction · 0.85

Calls 4

SlReadUint32Function · 0.85
SlFindChunkHandlerFunction · 0.85
SlErrorCorruptFunction · 0.85
SlLoadChunkFunction · 0.85

Tested by

no test coverage detected