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

Method Load

src/saveload/engine_sl.cpp:186–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 }
185
186 void Load() const override
187 {
188 const std::vector<SaveLoad> slt = SlCompatTableHeader(_engine_id_mapping_desc, _engine_id_mapping_sl_compat);
189
190 _engine_mngr.mappings = {};
191
192 int index;
193 while ((index = SlIterateArray()) != -1) {
194 EngineIDMapping eid;
195 SlObject(&eid, slt);
196 _engine_mngr.SetID(eid.type, eid.internal_id, eid.grfid, eid.substitute_id, static_cast<EngineID>(index));
197 }
198 }
199};
200
201static const EIDSChunkHandler EIDS;

Callers

nothing calls this directly

Calls 4

SlCompatTableHeaderFunction · 0.85
SlIterateArrayFunction · 0.85
SlObjectFunction · 0.85
SetIDMethod · 0.80

Tested by

no test coverage detected