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

Method Save

src/saveload/map_sl.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 }
109
110 void Save() const override
111 {
112 std::array<uint8_t, MAP_SL_BUF_SIZE> buf;
113 uint size = Map::Size();
114
115 SlSetLength(size);
116 for (TileIndex i{}; i != size;) {
117 for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = Tile(i++).height();
118 SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8);
119 }
120 }
121};
122
123struct MAPOChunkHandler : 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