1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Remove Ride::ride_get_rotated_coords()

This commit is contained in:
Tulio Leao
2019-12-09 16:52:47 -03:00
parent aca4d39107
commit 01c62437b2
3 changed files with 4 additions and 12 deletions

View File

@@ -2385,7 +2385,7 @@ static void window_ride_construction_draw_track_piece(
: TrackDefinitions[trackType].preview_z_offset;
mapCoords.z -= previewZOffset;
const ScreenCoordsXY rotatedScreenCoords = ride_get_rotated_coords(mapCoords);
const ScreenCoordsXY rotatedScreenCoords = translate_3d_to_2d_with_z(get_current_rotation(), mapCoords);
dpi->x += rotatedScreenCoords.x - width / 2;
dpi->y += rotatedScreenCoords.y - height / 2 - 16;

View File

@@ -2899,8 +2899,8 @@ static void ride_music_update(Ride* ride)
return;
}
TileCoordsXYZ rideTileCoords{ ride->stations[0].Start.x, ride->stations[0].Start.y, ride->stations[0].Height };
CoordsXYZ rideCoords{rideTileCoords.ToCoordsXYZ()};
TileCoordsXYZ stationTileCoords{ ride->stations[0].Start.x, ride->stations[0].Start.y, ride->stations[0].Height };
CoordsXYZ rideCoords{ stationTileCoords.ToCoordsXYZ() };
rideCoords = { rideCoords.ToTileCentre(), rideCoords.z };
int32_t sampleRate = 22050;
@@ -3567,7 +3567,7 @@ int32_t ride_music_params_update(CoordsXYZ rideCoords, Ride* ride, uint16_t samp
{
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gGameSoundsOff && g_music_tracking_viewport != nullptr)
{
const ScreenCoordsXY rotatedCoords = ride_get_rotated_coords(rideCoords);
const ScreenCoordsXY rotatedCoords = translate_3d_to_2d_with_z(get_current_rotation(), rideCoords);
rct_viewport* viewport = g_music_tracking_viewport;
int16_t view_width = viewport->view_width;
int16_t view_width2 = view_width * 2;
@@ -7657,12 +7657,6 @@ StationObject* ride_get_station_object(const Ride* ride)
return static_cast<StationObject*>(objManager.GetLoadedObject(OBJECT_TYPE_STATION, ride->entrance_style));
}
ScreenCoordsXY ride_get_rotated_coords(CoordsXYZ coords3d)
{
auto screenCoords = translate_3d_to_2d_with_z(get_current_rotation(), coords3d);
return screenCoords;
}
// Normally, a station has at most one entrance and one exit, which are at the same height
// as the station. But in hacked parks, neither can be taken for granted. This code ensures
// that the ride->entrances and ride->exits arrays will point to one of them. There is

View File

@@ -1278,8 +1278,6 @@ StationObject* ride_get_station_object(const Ride* ride);
void ride_action_modify(Ride* ride, int32_t modifyType, int32_t flags);
ScreenCoordsXY ride_get_rotated_coords(CoordsXYZ coords);
void determine_ride_entrance_and_exit_locations();
void ride_clear_leftover_entrances(Ride* ride);