From d3da8634d806a01043dd48137f7d9b37c89eaccc Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Wed, 3 Oct 2018 14:11:30 +0200 Subject: [PATCH] Use ClearAs in two places --- src/openrct2/rct1/S4Importer.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index c6a98b4fa3..69b12232d6 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2402,11 +2402,8 @@ private: // Fill the rest of the row with blank tiles for (int32_t y = 0; y < RCT1_MAX_MAP_SIZE; y++) { - memset(nextFreeTileElement, 0, sizeof(rct_tile_element)); - nextFreeTileElement->SetType(TILE_ELEMENT_TYPE_SURFACE); + nextFreeTileElement->ClearAs(TILE_ELEMENT_TYPE_SURFACE); nextFreeTileElement->flags = TILE_ELEMENT_FLAG_LAST_TILE; - nextFreeTileElement->base_height = 2; - nextFreeTileElement->clearance_height = 2; nextFreeTileElement->AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); nextFreeTileElement->AsSurface()->SetSurfaceStyle(TERRAIN_GRASS); nextFreeTileElement->AsSurface()->SetEdgeStyle(TERRAIN_EDGE_ROCK); @@ -2419,11 +2416,8 @@ private: // 128 extra rows left to fill with blank tiles for (int32_t y = 0; y < 128 * 256; y++) { - memset(nextFreeTileElement, 0, sizeof(rct_tile_element)); - nextFreeTileElement->SetType(TILE_ELEMENT_TYPE_SURFACE); + nextFreeTileElement->ClearAs(TILE_ELEMENT_TYPE_SURFACE); nextFreeTileElement->flags = TILE_ELEMENT_FLAG_LAST_TILE; - nextFreeTileElement->base_height = 2; - nextFreeTileElement->clearance_height = 2; nextFreeTileElement->AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); nextFreeTileElement->AsSurface()->SetSurfaceStyle(TERRAIN_GRASS); nextFreeTileElement->AsSurface()->SetEdgeStyle(TERRAIN_EDGE_ROCK);