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

Method Load

src/saveload/map_sl.cpp:99–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 MAPHChunkHandler() : ChunkHandler('MAPH', CH_RIFF) {}
98
99 void Load() const override
100 {
101 std::array<uint8_t, MAP_SL_BUF_SIZE> buf;
102 uint size = Map::Size();
103
104 for (TileIndex i{}; i != size;) {
105 SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8);
106 for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) Tile(i++).height() = buf[j];
107 }
108 }
109
110 void Save() const override
111 {

Callers

nothing calls this directly

Calls 3

SlCopyFunction · 0.85
TileClass · 0.85
dataMethod · 0.45

Tested by

no test coverage detected