From 88717604723fd5b56f0563d044005612ecfb4374 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 11 Jul 2022 17:49:36 +0200 Subject: [PATCH] Rename car entry animation flags --- src/openrct2/object/RideObject.cpp | 2 +- src/openrct2/ride/Vehicle.cpp | 24 ++++++++++++------------ src/openrct2/ride/Vehicle.h | 22 +++++++++++----------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 751d1e2d3a..4450e358e8 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -387,7 +387,7 @@ uint8_t RideObject::CalculateNumVerticalFrames(const CarEntry* carEntry) if (!(carEntry->flags & CAR_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES)) { if (carEntry->flags & CAR_ENTRY_FLAG_VEHICLE_ANIMATION - && carEntry->animation != VEHICLE_ENTRY_ANIMATION_OBSERVATION_TOWER) + && carEntry->animation != CAR_ENTRY_ANIMATION_OBSERVATION_TOWER) { if (!(carEntry->flags & CAR_ENTRY_FLAG_DODGEM_INUSE_LIGHTS)) { diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index a141b41a1f..1fd4102991 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -1353,7 +1353,7 @@ bool Vehicle::OpenRestraints() continue; } } - if (carEntry->animation == VEHICLE_ENTRY_ANIMATION_OBSERVATION_TOWER && vehicle->animation_frame != 0) + if (carEntry->animation == CAR_ENTRY_ANIMATION_OBSERVATION_TOWER && vehicle->animation_frame != 0) { if (vehicle->animationState <= 0xCCCC) { @@ -1369,7 +1369,7 @@ bool Vehicle::OpenRestraints() restraintsOpen = false; continue; } - if (carEntry->animation == VEHICLE_ENTRY_ANIMATION_ANIMAL_FLYING + if (carEntry->animation == CAR_ENTRY_ANIMATION_ANIMAL_FLYING && (vehicle->animation_frame != 0 || vehicle->animationState > 0)) { vehicle->UpdateAnimationAnimalFlying(); @@ -6646,7 +6646,7 @@ void Vehicle::UpdateAdditionalAnimation() } switch (carEntry->animation) { - case VEHICLE_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE: // loc_6D652B + case CAR_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE: // loc_6D652B animationState += _vehicleVelocityF64E08; targetFrame = (animationState >> 20) & 3; if (animation_frame != targetFrame) @@ -6685,7 +6685,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_SWAN: // loc_6D6424 + case CAR_ENTRY_ANIMATION_SWAN: // loc_6D6424 animationState += _vehicleVelocityF64E08; targetFrame = (animationState >> 18) & 2; if (animation_frame != targetFrame) @@ -6694,7 +6694,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_CANOES: // loc_6D6482 + case CAR_ENTRY_ANIMATION_CANOES: // loc_6D6482 animationState += _vehicleVelocityF64E08; eax = ((animationState >> 13) & 0xFF) * 6; targetFrame = (eax >> 8) & 0xFF; @@ -6704,7 +6704,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_ROW_BOATS: // loc_6D64F7 + case CAR_ENTRY_ANIMATION_ROW_BOATS: // loc_6D64F7 animationState += _vehicleVelocityF64E08; eax = ((animationState >> 13) & 0xFF) * 7; targetFrame = (eax >> 8) & 0xFF; @@ -6714,7 +6714,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_WATER_TRICYCLES: // loc_6D6453 + case CAR_ENTRY_ANIMATION_WATER_TRICYCLES: // loc_6D6453 animationState += _vehicleVelocityF64E08; targetFrame = (animationState >> 19) & 1; if (animation_frame != targetFrame) @@ -6723,7 +6723,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_OBSERVATION_TOWER: // loc_6D65C3 + case CAR_ENTRY_ANIMATION_OBSERVATION_TOWER: // loc_6D65C3 if (animationState <= 0xCCCC) { animationState += 0x3333; @@ -6736,7 +6736,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_HELICARS: // loc_6D63F5 + case CAR_ENTRY_ANIMATION_HELICARS: // loc_6D63F5 animationState += _vehicleVelocityF64E08; targetFrame = (animationState >> 18) & 3; if (animation_frame != targetFrame) @@ -6745,7 +6745,7 @@ void Vehicle::UpdateAdditionalAnimation() Invalidate(); } break; - case VEHICLE_ENTRY_ANIMATION_MONORAIL_CYCLES: // loc_6D64B6 + case CAR_ENTRY_ANIMATION_MONORAIL_CYCLES: // loc_6D64B6 if (num_peeps != 0) { animationState += _vehicleVelocityF64E08; @@ -6758,7 +6758,7 @@ void Vehicle::UpdateAdditionalAnimation() } } break; - case VEHICLE_ENTRY_ANIMATION_MULTI_DIM_COASTER: // loc_6D65E1 + case CAR_ENTRY_ANIMATION_MULTI_DIM_COASTER: // loc_6D65E1 if (seat_rotation != target_seat_rotation) { if (animationState <= 0xCCCC) @@ -6780,7 +6780,7 @@ void Vehicle::UpdateAdditionalAnimation() } } break; - case VEHICLE_ENTRY_ANIMATION_ANIMAL_FLYING: + case CAR_ENTRY_ANIMATION_ANIMAL_FLYING: UpdateAnimationAnimalFlying(); // makes animation play faster with vehicle speed targetFrame = abs(_vehicleVelocityF64E08) >> 24; diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index d3b4cee888..f6036906e5 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -416,17 +416,17 @@ enum class MiniGolfAnimation : uint8_t enum { - VEHICLE_ENTRY_ANIMATION_NONE, - VEHICLE_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE, - VEHICLE_ENTRY_ANIMATION_SWAN, - VEHICLE_ENTRY_ANIMATION_CANOES, - VEHICLE_ENTRY_ANIMATION_ROW_BOATS, - VEHICLE_ENTRY_ANIMATION_WATER_TRICYCLES, - VEHICLE_ENTRY_ANIMATION_OBSERVATION_TOWER, - VEHICLE_ENTRY_ANIMATION_HELICARS, - VEHICLE_ENTRY_ANIMATION_MONORAIL_CYCLES, - VEHICLE_ENTRY_ANIMATION_MULTI_DIM_COASTER, - VEHICLE_ENTRY_ANIMATION_ANIMAL_FLYING // OpenRCT2-specific feature + CAR_ENTRY_ANIMATION_NONE, + CAR_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE, + CAR_ENTRY_ANIMATION_SWAN, + CAR_ENTRY_ANIMATION_CANOES, + CAR_ENTRY_ANIMATION_ROW_BOATS, + CAR_ENTRY_ANIMATION_WATER_TRICYCLES, + CAR_ENTRY_ANIMATION_OBSERVATION_TOWER, + CAR_ENTRY_ANIMATION_HELICARS, + CAR_ENTRY_ANIMATION_MONORAIL_CYCLES, + CAR_ENTRY_ANIMATION_MULTI_DIM_COASTER, + CAR_ENTRY_ANIMATION_ANIMAL_FLYING // OpenRCT2-specific feature }; enum : uint32_t