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

Change MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT_MASK to MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT

This commit is contained in:
Gymnasiast
2017-07-26 10:23:33 +02:00
committed by Michael Steenbeek
parent 894d010439
commit e9e8068dff
4 changed files with 6 additions and 7 deletions

View File

@@ -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;

View File

@@ -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:

View File

@@ -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;

View File

@@ -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