mirror of https://github.com/OpenRCT2/OpenRCT2.git
Manually replace more Z occurrences
This commit is contained in:
parent
7d11858dbe
commit
85ecb52e7c
|
@ -149,7 +149,7 @@ rct_window* window_banner_open(rct_windownumber number)
|
|||
tile_element++;
|
||||
}
|
||||
|
||||
int32_t view_z = tile_element->base_height << 3;
|
||||
int32_t view_z = tile_element->GetBaseHeight();
|
||||
w->frame_no = view_z;
|
||||
|
||||
view_x += 16;
|
||||
|
|
|
@ -2432,8 +2432,8 @@ static void sub_6CBCE2(
|
|||
CoordsXY offsets = { trackBlock->x, trackBlock->y };
|
||||
CoordsXY coords = originCoords + offsets.Rotate(trackDirection);
|
||||
|
||||
int32_t baseZ = (originZ + trackBlock->z) >> 3;
|
||||
int32_t clearanceZ = ((trackBlock->var_07 + RideData5[ride->type].clearance_height) >> 3) + baseZ + 4;
|
||||
int32_t baseZ = originZ + trackBlock->z;
|
||||
int32_t clearanceZ = trackBlock->var_07 + RideData5[ride->type].clearance_height + baseZ + (4 * 8);
|
||||
|
||||
auto centreTileCoords = TileCoordsXY{ coords };
|
||||
auto eastTileCoords = centreTileCoords + TileDirectionDelta[TILE_ELEMENT_DIRECTION_EAST];
|
||||
|
@ -2459,8 +2459,8 @@ static void sub_6CBCE2(
|
|||
_tempTrackTileElement.AsTrack()->SetHasChain((liftHillAndInvertedState & CONSTRUCTION_LIFT_HILL_SELECTED) != 0);
|
||||
_tempTrackTileElement.SetOccupiedQuadrants(quarterTile.GetBaseQuarterOccupied());
|
||||
_tempTrackTileElement.SetLastForTile(true);
|
||||
_tempTrackTileElement.base_height = baseZ;
|
||||
_tempTrackTileElement.clearance_height = clearanceZ;
|
||||
_tempTrackTileElement.base_height = baseZ / 8;
|
||||
_tempTrackTileElement.clearance_height = clearanceZ / 8;
|
||||
_tempTrackTileElement.AsTrack()->SetTrackType(trackType);
|
||||
_tempTrackTileElement.AsTrack()->SetSequenceIndex(trackBlock->index);
|
||||
_tempTrackTileElement.AsTrack()->SetHasCableLift(false);
|
||||
|
|
|
@ -179,7 +179,7 @@ rct_window* window_sign_open(rct_windownumber number)
|
|||
tile_element++;
|
||||
}
|
||||
|
||||
int32_t view_z = tile_element->base_height << 3;
|
||||
int32_t view_z = tile_element->GetBaseHeight();
|
||||
w->frame_no = view_z;
|
||||
|
||||
w->list_information_type = tile_element->AsLargeScenery()->GetPrimaryColour();
|
||||
|
@ -426,7 +426,7 @@ rct_window* window_sign_small_open(rct_windownumber number)
|
|||
tile_element++;
|
||||
}
|
||||
|
||||
int32_t view_z = tile_element->base_height << 3;
|
||||
int32_t view_z = tile_element->GetBaseHeight();
|
||||
w->frame_no = view_z;
|
||||
|
||||
w->list_information_type = tile_element->AsWall()->GetPrimaryColour();
|
||||
|
|
|
@ -6003,7 +6003,7 @@ void Guest::UpdateUsingBin()
|
|||
additionStatus |= space_left_in_bin << selected_bin;
|
||||
tileElement->AsPath()->SetAdditionStatus(additionStatus);
|
||||
|
||||
map_invalidate_tile_zoom0(next_x, next_y, tileElement->base_height << 3, tileElement->clearance_height << 3);
|
||||
map_invalidate_tile_zoom0(next_x, next_y, tileElement->GetBaseHeight(), tileElement->GetClearanceHeight());
|
||||
StateReset();
|
||||
break;
|
||||
}
|
||||
|
@ -6320,7 +6320,7 @@ static void peep_update_walking_break_scenery(Peep* peep)
|
|||
|
||||
tileElement->AsPath()->SetIsBroken(true);
|
||||
|
||||
map_invalidate_tile_zoom1(peep->next_x, peep->next_y, (tileElement->base_height << 3) + 32, tileElement->base_height << 3);
|
||||
map_invalidate_tile_zoom1(peep->next_x, peep->next_y, (tileElement->GetBaseHeight()) + 32, tileElement->GetBaseHeight());
|
||||
|
||||
peep->angriness = 16;
|
||||
}
|
||||
|
|
|
@ -1622,7 +1622,7 @@ void ride_select_next_section()
|
|||
if (!scenery_tool_is_active())
|
||||
{
|
||||
// Set next element's height.
|
||||
virtual_floor_set_height(tileElement->base_height << 3);
|
||||
virtual_floor_set_height(tileElement->GetBaseHeight());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1696,7 +1696,7 @@ void ride_select_previous_section()
|
|||
if (!scenery_tool_is_active())
|
||||
{
|
||||
// Set previous element's height.
|
||||
virtual_floor_set_height(trackBeginEnd.begin_element->base_height << 3);
|
||||
virtual_floor_set_height(trackBeginEnd.begin_element->GetBaseHeight());
|
||||
}
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
|
|
@ -5151,10 +5151,10 @@ static TileElement* vehicle_check_collision(int16_t x, int16_t y, int16_t z)
|
|||
|
||||
do
|
||||
{
|
||||
if (z / 8 < tileElement->base_height)
|
||||
if (z < tileElement->GetBaseHeight())
|
||||
continue;
|
||||
|
||||
if (z / 8 >= tileElement->clearance_height)
|
||||
if (z >= tileElement->GetClearanceHeight())
|
||||
continue;
|
||||
|
||||
if (tileElement->GetOccupiedQuadrants() & quadrant)
|
||||
|
|
|
@ -168,7 +168,7 @@ static void paint_observation_tower_section(
|
|||
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
|
||||
const TileElement* nextTileElement = tileElement + 1;
|
||||
if (tileElement->IsLastForTile() || tileElement->clearance_height != nextTileElement->base_height)
|
||||
if (tileElement->IsLastForTile() || tileElement->GetClearanceHeight() != nextTileElement->GetBaseHeight())
|
||||
{
|
||||
imageId = SPR_OBSERVATION_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
|
||||
sub_98199C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
|
|
|
@ -176,7 +176,7 @@ static void paint_launched_freefall_tower_section(
|
|||
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
|
||||
const TileElement* nextTileElement = tileElement + 1;
|
||||
if (tileElement->IsLastForTile() || tileElement->clearance_height != nextTileElement->base_height)
|
||||
if (tileElement->IsLastForTile() || tileElement->GetClearanceHeight() != nextTileElement->GetBaseHeight())
|
||||
{
|
||||
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
|
||||
sub_98199C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
|
|
|
@ -190,7 +190,7 @@ static void paint_roto_drop_tower_section(
|
|||
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
|
||||
const TileElement* nextTileElement = tileElement + 1;
|
||||
if (tileElement->IsLastForTile() || tileElement->clearance_height != nextTileElement->base_height)
|
||||
if (tileElement->IsLastForTile() || tileElement->GetClearanceHeight() != nextTileElement->GetBaseHeight())
|
||||
{
|
||||
imageId = SPR_ROTO_DROP_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
|
||||
sub_98199C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
|
||||
|
|
|
@ -416,7 +416,7 @@ int16_t tile_element_height(const CoordsXY& loc)
|
|||
return 16;
|
||||
}
|
||||
|
||||
uint16_t height = (surfaceElement->base_height << 3);
|
||||
uint16_t height = surfaceElement->GetBaseHeight();
|
||||
|
||||
uint32_t slope = surfaceElement->GetSlope();
|
||||
uint8_t extra_height = (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) >> 4; // 0x10 is the 5th bit - sets slope to double height
|
||||
|
|
Loading…
Reference in New Issue