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

Method LoadCheck

src/saveload/map_sl.cpp:54–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 void LoadCheck(size_t) const override
55 {
56 const std::vector<SaveLoad> slt = SlCompatTableHeader(_map_desc, _map_sl_compat);
57
58 if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() == -1) return;
59 SlGlobList(slt);
60 if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() != -1) SlErrorCorrupt("Too many MAPS entries");
61
62 _load_check_data.map_size_x = _map_dim_x;
63 _load_check_data.map_size_y = _map_dim_y;
64 }
65};
66
67static const uint MAP_SL_BUF_SIZE = 4096;

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