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

Method Load

src/saveload/station_sl.cpp:707–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705
706
707 void Load() const override
708 {
709 const std::vector<SaveLoad> slt = SlCompatTableHeader(_station_desc, _station_sl_compat);
710
711 _old_num_flows = 0;
712
713 int index;
714 while ((index = SlIterateArray()) != -1) {
715 bool waypoint = static_cast<StationFacilities>(SlReadByte()).Test(StationFacility::Waypoint);
716
717 BaseStation *bst = waypoint ? (BaseStation *)new (StationID(index)) Waypoint() : new (StationID(index)) Station();
718 SlObject(bst, slt);
719 }
720 }
721
722 void FixPointers() const override
723 {

Callers

nothing calls this directly

Calls 5

SlCompatTableHeaderFunction · 0.85
SlIterateArrayFunction · 0.85
SlReadByteFunction · 0.85
SlObjectFunction · 0.85
TestMethod · 0.80

Tested by

no test coverage detected