From e9e8068dffce6047290683704570a9e1b8015877 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 26 Jul 2017 10:23:33 +0200 Subject: [PATCH] Change MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK to MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT --- src/openrct2/ride/station.c | 6 +++--- src/openrct2/ride/thrill/go_karts.c | 2 +- src/openrct2/ride/track_paint.c | 4 ++-- src/openrct2/world/map.h | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/openrct2/ride/station.c b/src/openrct2/ride/station.c index e87b7f2200..c277e284bb 100644 --- a/src/openrct2/ride/station.c +++ b/src/openrct2/ride/station.c @@ -65,13 +65,13 @@ static void ride_update_station_blocksection(rct_ride *ride, sint32 stationIndex if ((ride->status == RIDE_STATUS_CLOSED && ride->num_riders == 0) || (mapElement != NULL && mapElement->flags & 0x20)) { ride->station_depart[stationIndex] &= ~STATION_DEPART_FLAG; - if ((ride->station_depart[stationIndex] & STATION_DEPART_FLAG) || (mapElement != NULL && (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK))) + if ((ride->station_depart[stationIndex] & STATION_DEPART_FLAG) || (mapElement != NULL && (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT))) ride_invalidate_station_start(ride, stationIndex, false); } else { if (!(ride->station_depart[stationIndex] & STATION_DEPART_FLAG)) { ride->station_depart[stationIndex] |= STATION_DEPART_FLAG; ride_invalidate_station_start(ride, stationIndex, true); - } else if (mapElement != NULL && mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK) { + } else if (mapElement != NULL && mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) { ride_invalidate_station_start(ride, stationIndex, true); } } @@ -281,7 +281,7 @@ static void ride_invalidate_station_start(rct_ride *ride, sint32 stationIndex, b if (mapElement == NULL) return; - mapElement->properties.track.sequence &= ~MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK; + mapElement->properties.track.sequence &= ~MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT; if (greenLight) { mapElement->properties.track.sequence |= MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT; diff --git a/src/openrct2/ride/thrill/go_karts.c b/src/openrct2/ride/thrill/go_karts.c index 8d453f4c8c..6f25c3fb46 100644 --- a/src/openrct2/ride/thrill/go_karts.c +++ b/src/openrct2/ride/thrill/go_karts.c @@ -361,7 +361,7 @@ static void paint_go_karts_station(uint8 rideIndex, uint8 trackSequence, uint8 d } if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) { - const bool hasGreenLight = (bool)(mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK); + const bool hasGreenLight = (bool)(mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT); switch (direction) { case 0: diff --git a/src/openrct2/ride/track_paint.c b/src/openrct2/ride/track_paint.c index 6a9eb3c0ac..1ac2cde8fb 100644 --- a/src/openrct2/ride/track_paint.c +++ b/src/openrct2/ride/track_paint.c @@ -307,7 +307,7 @@ void track_paint_util_draw_station_impl(uint8 rideIndex, uint8 trackSequence, ui rct_xy16 position = {gPaintMapPosition.x, gPaintMapPosition.y}; rct_ride * ride = get_ride(rideIndex); const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; - const bool hasGreenLight = (bool) (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK); + const bool hasGreenLight = (bool) (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT); bool hasFence; uint32 imageId; @@ -441,7 +441,7 @@ void track_paint_util_draw_station_inverted(uint8 rideIndex, uint8 trackSequence rct_xy16 position = {gPaintMapPosition.x, gPaintMapPosition.y}; rct_ride * ride = get_ride(rideIndex); const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; - const bool hasGreenLight = (bool) (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK); + const bool hasGreenLight = (bool) (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT); bool hasFence; uint32 imageId; diff --git a/src/openrct2/world/map.h b/src/openrct2/world/map.h index 0b8f7e386a..d5c9e0e29b 100644 --- a/src/openrct2/world/map.h +++ b/src/openrct2/world/map.h @@ -253,7 +253,6 @@ enum #define MAP_ELEMENT_WATER_HEIGHT_MASK 0x1F #define MAP_ELEMENT_SURFACE_TERRAIN_MASK 0xE0 -#define MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK 0x80 #define MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK 0x70 #define MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK 0x0F