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

Method Save

src/saveload/map_sl.cpp:167–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 }
166
167 void Save() const override
168 {
169 std::array<uint16_t, MAP_SL_BUF_SIZE> buf;
170 uint size = Map::Size();
171
172 SlSetLength(static_cast<uint32_t>(size) * sizeof(uint16_t));
173 for (TileIndex i{}; i != size;) {
174 for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = Tile(i++).m2();
175 SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT16);
176 }
177 }
178};
179
180struct M3LOChunkHandler : ChunkHandler {

Callers

nothing calls this directly

Calls 4

SlSetLengthFunction · 0.85
TileClass · 0.85
SlCopyFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected