mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 06:23:04 +01:00
Refactor slope flags
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user