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

Function InitializeLandscape

src/landscape.cpp:838–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838void InitializeLandscape()
839{
840 for (uint y = _settings_game.construction.freeform_edges ? 1 : 0; y < Map::MaxY(); y++) {
841 for (uint x = _settings_game.construction.freeform_edges ? 1 : 0; x < Map::MaxX(); x++) {
842 MakeClear(TileXY(x, y), CLEAR_GRASS, 3);
843 SetTileHeight(TileXY(x, y), 0);
844 SetTropicZone(TileXY(x, y), TROPICZONE_NORMAL);
845 ClearBridgeMiddle(TileXY(x, y));
846 }
847 }
848
849 for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, Map::MaxY()));
850 for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(Map::MaxX(), y));
851}
852
853static const uint8_t _genterrain_tbl_1[5] = { 10, 22, 33, 37, 4 };
854static const uint8_t _genterrain_tbl_2[5] = { 0, 0, 0, 0, 33 };

Callers 1

InitializeGameFunction · 0.85

Calls 6

MakeClearFunction · 0.85
TileXYFunction · 0.85
SetTileHeightFunction · 0.85
SetTropicZoneFunction · 0.85
ClearBridgeMiddleFunction · 0.85
MakeVoidFunction · 0.85

Tested by

no test coverage detected