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

Method Load

src/saveload/map_sl.cpp:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 void Load() const override
44 {
45 const std::vector<SaveLoad> slt = SlCompatTableHeader(_map_desc, _map_sl_compat);
46
47 if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() == -1) return;
48 SlGlobList(slt);
49 if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() != -1) SlErrorCorrupt("Too many MAPS entries");
50
51 Map::Allocate(_map_dim_x, _map_dim_y);
52 }
53
54 void LoadCheck(size_t) const override
55 {

Callers

nothing calls this directly

Calls 5

SlCompatTableHeaderFunction · 0.85
IsSavegameVersionBeforeFunction · 0.85
SlIterateArrayFunction · 0.85
SlGlobListFunction · 0.85
SlErrorCorruptFunction · 0.85

Tested by

no test coverage detected