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

Method Save

src/saveload/map_sl.cpp:137–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 }
136
137 void Save() const override
138 {
139 std::array<uint8_t, MAP_SL_BUF_SIZE> buf;
140 uint size = Map::Size();
141
142 SlSetLength(size);
143 for (TileIndex i{}; i != size;) {
144 for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = Tile(i++).m1();
145 SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8);
146 }
147 }
148};
149
150struct MAP2ChunkHandler : 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