MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / generateWater

Function generateWater

src/OpenLoco/src/Map/MapGenerator/MapGenerator.cpp:214–228  ·  view source on GitHub ↗

0x004C4BD7

Source from the content-addressed store, hash-verified

212
213 // 0x004C4BD7
214 static void generateWater([[maybe_unused]] HeightMap& heightMap)
215 {
216 auto seaLevel = getGameState().seaLevel;
217
218 for (auto& pos : World::getDrawableTileRange())
219 {
220 auto tile = TileManager::get(pos);
221 auto* surface = tile.surface();
222
223 if (surface != nullptr && surface->baseZ() < (seaLevel << 2))
224 {
225 surface->setWater(seaLevel);
226 }
227 }
228 }
229
230 static std::optional<uint8_t> getEverywhereSurfaceStyle()
231 {

Callers 1

generateFunction · 0.85

Calls 5

getDrawableTileRangeFunction · 0.85
surfaceMethod · 0.80
baseZMethod · 0.80
setWaterMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected