MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / MapExtendBoundarySurfaceShiftY

Function MapExtendBoundarySurfaceShiftY

src/openrct2/world/Map.cpp:1369–1384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1367 }
1368
1369 static void MapExtendBoundarySurfaceShiftY(const int32_t amount, const int32_t mapSizeX)
1370 {
1371 for (int32_t x = 1; x < mapSizeX - 1; x++)
1372 {
1373 for (int32_t y = amount; y > 0; y--)
1374 {
1375 const auto* const existingTileElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y + 1 });
1376 auto* const newTileElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y });
1377 if (existingTileElement != nullptr && newTileElement != nullptr)
1378 {
1379 MapExtendBoundarySurfaceExtendTile(*existingTileElement, *newTileElement, 2);
1380 }
1381 Park::UpdateFences(TileCoordsXY{ x, y }.ToCoordsXY());
1382 }
1383 }
1384 }
1385
1386 /**
1387 * Clears the provided element properly from a certain tile, and updates

Callers 1

ShiftMapFunction · 0.85

Calls 4

MapGetSurfaceElementAtFunction · 0.85
UpdateFencesFunction · 0.85
ToCoordsXYMethod · 0.80

Tested by

no test coverage detected