mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 15:24:30 +01:00
Part of #21421: Refactor VEHICLE_SEAT_PAIR_FLAG
This commit is contained in:
@@ -714,7 +714,7 @@ CarEntry RideObject::ReadJsonCar([[maybe_unused]] IReadObjectContext* context, j
|
||||
car.num_seats = Json::GetNumber<uint8_t>(jCar["numSeats"]);
|
||||
if (Json::GetBoolean(jCar["seatsInPairs"], true) && car.num_seats > 1)
|
||||
{
|
||||
car.num_seats |= VEHICLE_SEAT_PAIR_FLAG;
|
||||
car.num_seats |= kVehicleSeatPairFlag;
|
||||
}
|
||||
|
||||
car.sprite_width = Json::GetNumber<uint8_t>(jCar["spriteWidth"]);
|
||||
|
||||
@@ -5115,7 +5115,7 @@ Vehicle* Vehicle::TrainTail() const
|
||||
|
||||
int32_t Vehicle::IsUsedInPairs() const
|
||||
{
|
||||
return num_seats & VEHICLE_SEAT_PAIR_FLAG;
|
||||
return num_seats & kVehicleSeatPairFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -516,7 +516,7 @@ enum
|
||||
SOUND_RANGE_NONE = 255
|
||||
};
|
||||
|
||||
#define VEHICLE_SEAT_PAIR_FLAG 0x80
|
||||
constexpr uint8_t kVehicleSeatPairFlag{ 0x80 };
|
||||
#define VEHICLE_SEAT_NUM_MASK 0x7F
|
||||
|
||||
Vehicle* TryGetVehicle(EntityId spriteIndex);
|
||||
|
||||
Reference in New Issue
Block a user