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

Method Load

src/saveload/map_sl.cpp:72–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 MAPTChunkHandler() : ChunkHandler('MAPT', CH_RIFF) {}
71
72 void Load() const override
73 {
74 std::array<uint8_t, MAP_SL_BUF_SIZE> buf;
75 uint size = Map::Size();
76
77 for (TileIndex i{}; i != size;) {
78 SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8);
79 for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) Tile(i++).type() = buf[j];
80 }
81 }
82
83 void Save() const override
84 {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected