1
0
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:
Claudio Tiecher
2024-03-17 14:20:38 +01:00
parent 13e9ff84c2
commit 2c4c2da319
3 changed files with 3 additions and 3 deletions

View File

@@ -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"]);

View File

@@ -5115,7 +5115,7 @@ Vehicle* Vehicle::TrainTail() const
int32_t Vehicle::IsUsedInPairs() const
{
return num_seats & VEHICLE_SEAT_PAIR_FLAG;
return num_seats & kVehicleSeatPairFlag;
}
/**

View File

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