1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Fix TestPaint

This commit is contained in:
Gymnasiast
2018-09-23 12:01:58 +02:00
parent eecf465e3b
commit 5d22166fc3
3 changed files with 12 additions and 0 deletions

View File

@@ -384,6 +384,12 @@ TileCoordsXYZD ride_get_exit_location(const Ride* ride, const int32_t stationInd
return ride->exits[stationIndex];
}
void TileElementBase::SetType(uint8_t newType)
{
this->type &= ~TILE_ELEMENT_TYPE_MASK;
this->type |= (newType & TILE_ELEMENT_TYPE_MASK);
}
uint8_t TileElementBase::GetDirection() const
{
return this->type & TILE_ELEMENT_DIRECTION_MASK;

View File

@@ -270,6 +270,7 @@ static uint8_t TestTrackElementPaintCalls(uint8_t rideType, uint8_t trackType, u
uint16_t height = 3 * 16;
rct_tile_element tileElement = {};
tileElement.SetType(TILE_ELEMENT_TYPE_TRACK);
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
tileElement.AsTrack()->SetTrackType(trackType);
tileElement.base_height = height / 16;
@@ -432,6 +433,7 @@ static uint8_t TestTrackElementSegmentSupportHeight(
uint16_t height = 3 * 16;
rct_tile_element tileElement = {};
tileElement.SetType(TILE_ELEMENT_TYPE_TRACK);
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
tileElement.AsTrack()->SetTrackType(trackType);
tileElement.base_height = height / 16;
@@ -518,6 +520,7 @@ static uint8_t TestTrackElementGeneralSupportHeight(
uint16_t height = 3 * 16;
rct_tile_element tileElement = {};
tileElement.SetType(TILE_ELEMENT_TYPE_TRACK);
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
tileElement.AsTrack()->SetTrackType(trackType);
tileElement.base_height = height / 16;
@@ -618,6 +621,7 @@ static uint8_t TestTrackElementSideTunnels(uint8_t rideType, uint8_t trackType,
uint16_t height = 3 * 16;
rct_tile_element tileElement = {};
tileElement.SetType(TILE_ELEMENT_TYPE_TRACK);
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
tileElement.AsTrack()->SetTrackType(trackType);
tileElement.base_height = height / 16;
@@ -745,6 +749,7 @@ static uint8_t TestTrackElementVerticalTunnels(uint8_t rideType, uint8_t trackTy
uint16_t height = 3 * 16;
rct_tile_element tileElement = {};
tileElement.SetType(TILE_ELEMENT_TYPE_TRACK);
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
tileElement.AsTrack()->SetTrackType(trackType);
tileElement.base_height = height / 16;

View File

@@ -445,6 +445,7 @@ private:
for (int direction = 0; direction < 4; direction++)
{
rct_tile_element tileElement = {};
tileElement.SetType(TILE_ELEMENT_TYPE_TRACK);
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
tileElement.AsTrack()->SetTrackType(trackType);
tileElement.base_height = 3;