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

Method Load

src/saveload/linkgraph_sl.cpp:119–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118
119 void Load(LinkGraph *lg) const override
120 {
121 _linkgraph = lg;
122
123 uint16_t length = IsSavegameVersionBefore(SLV_SAVELOAD_LIST_LENGTH) ? _num_nodes : (uint16_t)SlGetStructListLength(UINT16_MAX);
124 lg->Init(length);
125 for (NodeID from = 0; from < length; ++from) {
126 _linkgraph_from = from;
127 SlObject(&lg->nodes[from], this->GetLoadDescription());
128 }
129 }
130};
131
132/**

Callers

nothing calls this directly

Calls 5

IsSavegameVersionBeforeFunction · 0.85
SlGetStructListLengthFunction · 0.85
SlObjectFunction · 0.85
GetLoadDescriptionMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected