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

Method Save

src/saveload/map_sl.cpp:83–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 void Save() const override
84 {
85 std::array<uint8_t, MAP_SL_BUF_SIZE> buf;
86 uint size = Map::Size();
87
88 SlSetLength(size);
89 for (TileIndex i{}; i != size;) {
90 for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = Tile(i++).type();
91 SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8);
92 }
93 }
94};
95
96struct MAPHChunkHandler : ChunkHandler {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected