1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +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

@@ -31,6 +31,7 @@
#include <openrct2/windows/Intent.h>
#include <openrct2/world/Park.h>
#include <openrct2/world/Surface.h>
#include <openrct2/world/tile_element/Slope.h>
#include <vector>
using namespace OpenRCT2::TrackMetaData;
@@ -416,12 +417,12 @@ static Widget _trackPlaceWidgets[] = {
auto z = surfaceElement->GetBaseZ();
// Increase Z above slope
if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP)
if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask)
{
z += 16;
// Increase Z above double slope
if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)
if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag)
z += 16;
}