mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Replace more flag checking
This commit is contained in:
parent
f118b2ede4
commit
62f8796677
4 changed files with 10 additions and 10 deletions
|
@ -92,7 +92,7 @@ static void setup_track_designer_objects()
|
|||
{
|
||||
if (rideType != RIDE_TYPE_NULL)
|
||||
{
|
||||
if (RideTypeDescriptors[rideType].Flags & RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER)
|
||||
if (RideTypeDescriptors[rideType].HasFlag(RIDE_TYPE_FLAG_SHOW_IN_TRACK_DESIGNER))
|
||||
{
|
||||
*selectionFlags &= ~OBJECT_SELECTION_FLAG_6;
|
||||
break;
|
||||
|
|
|
@ -877,7 +877,7 @@ int32_t ride_get_total_time(Ride* ride)
|
|||
|
||||
bool Ride::CanHaveMultipleCircuits() const
|
||||
{
|
||||
if (!(RideTypeDescriptors[type].Flags & RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS))
|
||||
if (!(RideTypeDescriptors[type].HasFlag(RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS)))
|
||||
return false;
|
||||
|
||||
// Only allow circuit or launch modes
|
||||
|
@ -5076,7 +5076,7 @@ bool Ride::Open(bool isApplying)
|
|||
}
|
||||
}
|
||||
|
||||
if ((RideTypeDescriptors[type].Flags & RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL)
|
||||
if ((RideTypeDescriptors[type].HasFlag(RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL))
|
||||
&& (lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) && !(lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT))
|
||||
{
|
||||
if (!ride_create_cable_lift(id, isApplying))
|
||||
|
@ -6428,7 +6428,7 @@ void Ride::UpdateMaxVehicles()
|
|||
} while (totalLength <= stationLength);
|
||||
|
||||
if ((mode != RideMode::StationToStation && mode != RideMode::ContinuousCircuit)
|
||||
|| !(RideTypeDescriptors[type].Flags & RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS))
|
||||
|| !(RideTypeDescriptors[type].HasFlag(RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS)))
|
||||
{
|
||||
maxNumTrains = std::min(maxNumTrains, 31);
|
||||
}
|
||||
|
|
|
@ -853,7 +853,7 @@ roll_type_t track_get_actual_bank(TileElement* tileElement, roll_type_t bank)
|
|||
|
||||
roll_type_t track_get_actual_bank_2(int32_t rideType, bool isInverted, roll_type_t bank)
|
||||
{
|
||||
if (RideTypeDescriptors[rideType].Flags & RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)
|
||||
if (RideTypeDescriptors[rideType].HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE))
|
||||
{
|
||||
if (isInverted)
|
||||
{
|
||||
|
|
|
@ -4019,7 +4019,7 @@ void Vehicle::UpdateArriving()
|
|||
goto loc_6D8E36;
|
||||
}
|
||||
|
||||
if (RideTypeDescriptors[curRide->type].Flags & RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS
|
||||
if (RideTypeDescriptors[curRide->type].HasFlag(RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS)
|
||||
&& curRide->mode != RideMode::Shuttle && curRide->mode != RideMode::PoweredLaunch)
|
||||
{
|
||||
SetUpdateFlag(VEHICLE_UPDATE_FLAG_12);
|
||||
|
@ -8095,7 +8095,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur
|
|||
ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES);
|
||||
{
|
||||
int32_t rideType = get_ride(tileElement->AsTrack()->GetRideIndex())->type;
|
||||
if (RideTypeDescriptors[rideType].Flags & RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)
|
||||
if (RideTypeDescriptors[rideType].HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE))
|
||||
{
|
||||
if (tileElement->AsTrack()->IsInverted())
|
||||
{
|
||||
|
@ -8470,7 +8470,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu
|
|||
|
||||
// Update VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES
|
||||
ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES);
|
||||
if (RideTypeDescriptors[curRide->type].Flags & RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)
|
||||
if (RideTypeDescriptors[curRide->type].HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE))
|
||||
{
|
||||
if (tileElement->AsTrack()->IsInverted())
|
||||
{
|
||||
|
@ -8855,7 +8855,7 @@ loc_6DC476:
|
|||
{
|
||||
int32_t rideType = get_ride(tileElement->AsTrack()->GetRideIndex())->type;
|
||||
ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES);
|
||||
if (RideTypeDescriptors[rideType].Flags & RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)
|
||||
if (RideTypeDescriptors[rideType].HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE))
|
||||
{
|
||||
if (tileElement->AsTrack()->IsInverted())
|
||||
{
|
||||
|
@ -9066,7 +9066,7 @@ loc_6DCA9A:
|
|||
{
|
||||
int32_t rideType = get_ride(tileElement->AsTrack()->GetRideIndex())->type;
|
||||
ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES);
|
||||
if (RideTypeDescriptors[rideType].Flags & RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)
|
||||
if (RideTypeDescriptors[rideType].HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE))
|
||||
{
|
||||
if (tileElement->AsTrack()->IsInverted())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue