1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

Refactor slope flags

This commit is contained in:
Gymnasiast
2024-05-02 23:31:01 +02:00
parent 9e2463ff52
commit 4cdaaa9810
35 changed files with 757 additions and 790 deletions

View File

@@ -26,6 +26,7 @@
#include "../object/TerrainSurfaceObject.h"
#include "../platform/Platform.h"
#include "../util/Util.h"
#include "../world/tile_element/Slope.h"
#include "Map.h"
#include "MapHelpers.h"
#include "Scenery.h"
@@ -496,13 +497,13 @@ static void MapGenSetHeight(MapGenSettings* settings)
uint8_t currentSlope = surfaceElement->GetSlope();
if (q00 > baseHeight)
currentSlope |= TILE_ELEMENT_SLOPE_S_CORNER_UP;
currentSlope |= kTileSlopeSCornerUp;
if (q01 > baseHeight)
currentSlope |= TILE_ELEMENT_SLOPE_W_CORNER_UP;
currentSlope |= kTileSlopeWCornerUp;
if (q10 > baseHeight)
currentSlope |= TILE_ELEMENT_SLOPE_E_CORNER_UP;
currentSlope |= kTileSlopeECornerUp;
if (q11 > baseHeight)
currentSlope |= TILE_ELEMENT_SLOPE_N_CORNER_UP;
currentSlope |= kTileSlopeNCornerUp;
surfaceElement->SetSlope(currentSlope);
}