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

Function MapExtendBoundarySurfaceShiftX

src/openrct2/world/Map.cpp:1352–1367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350 }
1351
1352 static void MapExtendBoundarySurfaceShiftX(const int32_t amount, const int32_t mapSizeY)
1353 {
1354 for (int32_t y = 1; y < mapSizeY - 1; y++)
1355 {
1356 for (int32_t x = amount; x > 0; x--)
1357 {
1358 const auto* const existingTileElement = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y });
1359 auto* const newTileElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y });
1360 if (existingTileElement != nullptr && newTileElement != nullptr)
1361 {
1362 MapExtendBoundarySurfaceExtendTile(*existingTileElement, *newTileElement, 1);
1363 }
1364 Park::UpdateFences(TileCoordsXY{ x, y }.ToCoordsXY());
1365 }
1366 }
1367 }
1368
1369 static void MapExtendBoundarySurfaceShiftY(const int32_t amount, const int32_t mapSizeX)
1370 {

Callers 1

ShiftMapFunction · 0.85

Calls 4

MapGetSurfaceElementAtFunction · 0.85
UpdateFencesFunction · 0.85
ToCoordsXYMethod · 0.80

Tested by

no test coverage detected