const auto* stationObj

This commit is contained in:
Gymnasiast 2021-12-18 23:19:46 +01:00
parent db3048ac67
commit 86df2b0ea7
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
8 changed files with 11 additions and 11 deletions

View File

@ -5399,7 +5399,7 @@ bool ride_has_adjacent_station(Ride* ride)
bool ride_has_station_shelter(Ride* ride) bool ride_has_station_shelter(Ride* ride)
{ {
const auto stationObj = ride->GetStationObject(); const auto* stationObj = ride->GetStationObject();
return stationObj != nullptr && (stationObj->Flags & STATION_OBJECT_FLAGS::HAS_SHELTER); return stationObj != nullptr && (stationObj->Flags & STATION_OBJECT_FLAGS::HAS_SHELTER);
} }

View File

@ -361,7 +361,7 @@ static void track_paint_util_draw_station_impl(
const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB) const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB)
{ {
CoordsXY position = session->MapPosition; CoordsXY position = session->MapPosition;
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
const bool hasGreenLight = trackElement.HasGreenLight(); const bool hasGreenLight = trackElement.HasGreenLight();
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
@ -568,7 +568,7 @@ void track_paint_util_draw_station_inverted(
uint8_t stationVariant) uint8_t stationVariant)
{ {
CoordsXY position = session->MapPosition; CoordsXY position = session->MapPosition;
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
const bool hasGreenLight = trackElement.HasGreenLight(); const bool hasGreenLight = trackElement.HasGreenLight();
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
@ -850,7 +850,7 @@ void track_paint_util_draw_narrow_station_platform(
const TrackElement& trackElement) const TrackElement& trackElement)
{ {
CoordsXY position = session->MapPosition; CoordsXY position = session->MapPosition;
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
return; return;

View File

@ -145,7 +145,7 @@ static void multi_dimension_rc_track_station(
} }
track_paint_util_draw_station_metal_supports_2(session, direction, height, session->TrackColours[SCHEME_SUPPORTS], 11); track_paint_util_draw_station_metal_supports_2(session, direction, height, session->TrackColours[SCHEME_SUPPORTS], 11);
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
bool hasFence; bool hasFence;
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {

View File

@ -675,7 +675,7 @@ static void paint_mini_golf_station(
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement) const TrackElement& trackElement)
{ {
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
uint32_t imageId; uint32_t imageId;
bool hasFence; bool hasFence;

View File

@ -348,7 +348,7 @@ static void paint_go_karts_station(
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement) const TrackElement& trackElement)
{ {
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
bool hasFence; bool hasFence;
uint32_t imageId; uint32_t imageId;

View File

@ -186,7 +186,7 @@ static void chairlift_paint_station_ne_sw(
bool isStart = chairlift_paint_util_is_first_track(ride, trackElement, pos, trackType); bool isStart = chairlift_paint_util_is_first_track(ride, trackElement, pos, trackType);
bool isEnd = chairlift_paint_util_is_last_track(ride, trackElement, pos, trackType); bool isEnd = chairlift_paint_util_is_last_track(ride, trackElement, pos, trackType);
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
wooden_a_supports_paint_setup(session, 0, 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, 0, 0, height, session->TrackColours[SCHEME_MISC]);
@ -276,7 +276,7 @@ static void chairlift_paint_station_se_nw(
bool isStart = chairlift_paint_util_is_first_track(ride, trackElement, pos, trackType); bool isStart = chairlift_paint_util_is_first_track(ride, trackElement, pos, trackType);
bool isEnd = chairlift_paint_util_is_last_track(ride, trackElement, pos, trackType); bool isEnd = chairlift_paint_util_is_last_track(ride, trackElement, pos, trackType);
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
wooden_a_supports_paint_setup(session, 1, 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, 1, 0, height, session->TrackColours[SCHEME_MISC]);

View File

@ -65,7 +65,7 @@ static void paint_boat_hire_station(
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement) const TrackElement& trackElement)
{ {
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
if (direction & 1) if (direction & 1)
{ {

View File

@ -79,7 +79,7 @@ static void submarine_ride_paint_track_station(
paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, paint_session* session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement) const TrackElement& trackElement)
{ {
const auto stationObj = ride.GetStationObject(); const auto* stationObj = ride.GetStationObject();
int32_t heightLower = height - 16; int32_t heightLower = height - 16;
uint32_t imageId; uint32_t imageId;