From c0f145a09995827e7236dc65f6a3ce5b51349b15 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 15:45:51 +0200 Subject: [PATCH 01/12] Name _backupActionSpriteImageOffset (unk_F1AEF0) --- src/openrct2/entity/Peep.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index fa2244ab54..e5be42746f 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -70,7 +70,7 @@ using namespace OpenRCT2; using namespace OpenRCT2::Audio; -static uint8_t _unk_F1AEF0; +static uint8_t _backupActionSpriteImageOffset; static TileElement* _peepRideEntranceExitElement; static std::shared_ptr _crowdSoundChannel = nullptr; @@ -411,7 +411,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) { PROFILED_FUNCTION(); - _unk_F1AEF0 = ActionSpriteImageOffset; + _backupActionSpriteImageOffset = ActionSpriteImageOffset; if (Action == PeepActionType::Idle) { Action = PeepActionType::Walking; @@ -1790,7 +1790,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ { // Guest is in the ride queue. guest->RideSubState = PeepRideSubState::AtQueueFront; - guest->ActionSpriteImageOffset = _unk_F1AEF0; + guest->ActionSpriteImageOffset = _backupActionSpriteImageOffset; return true; } @@ -1820,7 +1820,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ } // Guest has decided to go on the ride. - guest->ActionSpriteImageOffset = _unk_F1AEF0; + guest->ActionSpriteImageOffset = _backupActionSpriteImageOffset; guest->InteractionRideIndex = rideIndex; auto& station = ride->GetStation(stationNum); @@ -2399,7 +2399,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) { if (guest->GuestHeadingToRideId == rideIndex) guest->GuestHeadingToRideId = RideId::GetNull(); - guest->ActionSpriteImageOffset = _unk_F1AEF0; + guest->ActionSpriteImageOffset = _backupActionSpriteImageOffset; guest->SetState(PeepState::Buying); guest->CurrentRide = rideIndex; guest->SubState = 0; From 435cf14d49e6a8ce10bc79916b73a5cfd3b3ad9d Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:07:35 +0200 Subject: [PATCH 02/12] Rename PeepActionSpriteType to PeepAnimationType --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/actions/StaffHireNewAction.cpp | 2 +- src/openrct2/entity/Guest.cpp | 18 +- src/openrct2/entity/Peep.cpp | 88 +-- src/openrct2/entity/Peep.h | 8 +- src/openrct2/entity/Staff.cpp | 2 +- src/openrct2/peep/PeepAnimationData.cpp | 524 +++++++++--------- src/openrct2/peep/PeepAnimationData.h | 8 +- src/openrct2/rct1/S4Importer.cpp | 4 +- src/openrct2/rct2/S6Importer.cpp | 4 +- .../scripting/bindings/entity/ScGuest.cpp | 60 +- .../scripting/bindings/entity/ScGuest.hpp | 2 +- .../scripting/bindings/entity/ScStaff.cpp | 74 +-- .../scripting/bindings/entity/ScStaff.hpp | 4 +- 15 files changed, 401 insertions(+), 401 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index b7289daf79..9ce23a7c28 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -957,7 +957,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(peep->SpriteType, PeepActionSpriteType::Ui).base_image; + auto baseImageId = GetPeepAnimation(peep->SpriteType, PeepAnimationType::Ui).base_image; baseImageId += picked_peep_frame >> 2; gPickupPeepImage = ImageId(baseImageId, peep->TshirtColour, peep->TrousersColour); } diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index c875dfc0f8..cd52407ad1 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -681,7 +681,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(staff->SpriteType, PeepActionSpriteType::Ui).base_image; + auto baseImageId = GetPeepAnimation(staff->SpriteType, PeepAnimationType::Ui).base_image; baseImageId += picked_peep_frame >> 2; gPickupPeepImage = ImageId(baseImageId, staff->TshirtColour, staff->TrousersColour); } diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 4cda594119..6153f639e3 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -134,7 +134,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->SpecialSprite = 0; newPeep->ActionSpriteImageOffset = 0; newPeep->WalkingFrameNum = 0; - newPeep->ActionSpriteType = PeepActionSpriteType::None; + newPeep->ActionSpriteType = PeepAnimationType::None; newPeep->PathCheckOptimisation = 0; newPeep->PeepFlags = 0; newPeep->StaffLawnsMown = 0; diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 9a2a58cc24..d5b28231a6 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1276,7 +1276,7 @@ void Guest::UpdateSitting() Orientation = ((Var37 + 2) & 3) * 8; Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::SittingIdle; + NextActionSpriteType = PeepAnimationType::SittingIdle; SwitchNextActionSpriteType(); SittingSubState = PeepSittingSubState::SatDown; @@ -5553,7 +5553,7 @@ void Guest::UpdateWaitingAtCrossing() } Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; + NextActionSpriteType = PeepAnimationType::WatchRide; SwitchNextActionSpriteType(); if (HasFoodOrDrink()) @@ -5650,7 +5650,7 @@ void Guest::UpdateQueuing() } else { - if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextActionSpriteType == PeepActionSpriteType::WatchRide) + if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextActionSpriteType == PeepAnimationType::WatchRide) { switch (SpriteType) { @@ -5788,7 +5788,7 @@ void Guest::UpdateWatching() Orientation = (Var37 & 3) * 8; Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; + NextActionSpriteType = PeepAnimationType::WatchRide; SwitchNextActionSpriteType(); @@ -6751,19 +6751,19 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type) PeepFlags |= PEEP_FLAGS_SLOW_WALK; } - ActionSpriteType = PeepActionSpriteType::Invalid; + ActionSpriteType = PeepAnimationType::Invalid; UpdateCurrentActionSpriteType(); if (State == PeepState::Sitting) { Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::SittingIdle; + NextActionSpriteType = PeepAnimationType::SittingIdle; SwitchNextActionSpriteType(); } if (State == PeepState::Watching) { Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; + NextActionSpriteType = PeepAnimationType::WatchRide; SwitchNextActionSpriteType(); } } @@ -7126,7 +7126,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->SpecialSprite = 0; peep->ActionSpriteImageOffset = 0; peep->WalkingFrameNum = 0; - peep->ActionSpriteType = PeepActionSpriteType::None; + peep->ActionSpriteType = PeepAnimationType::None; peep->PeepFlags = 0; peep->FavouriteRide = RideId::GetNull(); peep->FavouriteRideRating = 0; @@ -7467,7 +7467,7 @@ bool Guest::UpdateQueuePosition(PeepActionType previous_action) return true; Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; + NextActionSpriteType = PeepAnimationType::WatchRide; if (previous_action != PeepActionType::Idle) Invalidate(); return true; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index e5be42746f..03617269f7 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -77,44 +77,44 @@ static std::shared_ptr _crowdSoundChannel = nullptr; static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height); -static PeepActionSpriteType PeepSpecialSpriteToSpriteTypeMap[] = { - PeepActionSpriteType::None, - PeepActionSpriteType::HoldMat, - PeepActionSpriteType::StaffMower, +static PeepAnimationType PeepSpecialSpriteToSpriteTypeMap[] = { + PeepAnimationType::None, + PeepAnimationType::HoldMat, + PeepAnimationType::StaffMower, }; -static PeepActionSpriteType PeepActionToSpriteTypeMap[] = { - PeepActionSpriteType::CheckTime, - PeepActionSpriteType::EatFood, - PeepActionSpriteType::ShakeHead, - PeepActionSpriteType::EmptyPockets, - PeepActionSpriteType::SittingEatFood, - PeepActionSpriteType::SittingLookAroundLeft, - PeepActionSpriteType::SittingLookAroundRight, - PeepActionSpriteType::Wow, - PeepActionSpriteType::ThrowUp, - PeepActionSpriteType::Jump, - PeepActionSpriteType::StaffSweep, - PeepActionSpriteType::Drowning, - PeepActionSpriteType::StaffAnswerCall, - PeepActionSpriteType::StaffAnswerCall2, - PeepActionSpriteType::StaffCheckboard, - PeepActionSpriteType::StaffFix, - PeepActionSpriteType::StaffFix2, - PeepActionSpriteType::StaffFixGround, - PeepActionSpriteType::StaffFix3, - PeepActionSpriteType::StaffWatering, - PeepActionSpriteType::Joy, - PeepActionSpriteType::ReadMap, - PeepActionSpriteType::Wave, - PeepActionSpriteType::StaffEmptyBin, - PeepActionSpriteType::Wave2, - PeepActionSpriteType::TakePhoto, - PeepActionSpriteType::Clap, - PeepActionSpriteType::Disgust, - PeepActionSpriteType::DrawPicture, - PeepActionSpriteType::BeingWatched, - PeepActionSpriteType::WithdrawMoney, +static PeepAnimationType PeepActionToSpriteTypeMap[] = { + PeepAnimationType::CheckTime, + PeepAnimationType::EatFood, + PeepAnimationType::ShakeHead, + PeepAnimationType::EmptyPockets, + PeepAnimationType::SittingEatFood, + PeepAnimationType::SittingLookAroundLeft, + PeepAnimationType::SittingLookAroundRight, + PeepAnimationType::Wow, + PeepAnimationType::ThrowUp, + PeepAnimationType::Jump, + PeepAnimationType::StaffSweep, + PeepAnimationType::Drowning, + PeepAnimationType::StaffAnswerCall, + PeepAnimationType::StaffAnswerCall2, + PeepAnimationType::StaffCheckboard, + PeepAnimationType::StaffFix, + PeepAnimationType::StaffFix2, + PeepAnimationType::StaffFixGround, + PeepAnimationType::StaffFix3, + PeepAnimationType::StaffWatering, + PeepAnimationType::Joy, + PeepAnimationType::ReadMap, + PeepAnimationType::Wave, + PeepAnimationType::StaffEmptyBin, + PeepAnimationType::Wave2, + PeepAnimationType::TakePhoto, + PeepAnimationType::Clap, + PeepAnimationType::Disgust, + PeepAnimationType::DrawPicture, + PeepAnimationType::BeingWatched, + PeepAnimationType::WithdrawMoney, }; const bool gSpriteTypeToSlowWalkMap[] = { @@ -314,7 +314,7 @@ bool Peep::IsOnPathBlockedByVehicle() return FootpathIsBlockedByVehicle(curPos); } -PeepActionSpriteType Peep::GetActionSpriteType() +PeepAnimationType Peep::GetActionSpriteType() { if (IsActionInterruptable()) { // PeepActionType::None1 or PeepActionType::None2 @@ -329,7 +329,7 @@ PeepActionSpriteType Peep::GetActionSpriteType() Guard::Assert( EnumValue(Action) >= std::size(PeepActionToSpriteTypeMap) && Action < PeepActionType::Idle, "Invalid peep action %u", EnumValue(Action)); - return PeepActionSpriteType::None; + return PeepAnimationType::None; } /* @@ -341,7 +341,7 @@ void Peep::UpdateCurrentActionSpriteType() { return; } - PeepActionSpriteType newActionSpriteType = GetActionSpriteType(); + PeepAnimationType newActionSpriteType = GetActionSpriteType(); if (ActionSpriteType == newActionSpriteType) { return; @@ -622,7 +622,7 @@ void Peep::PickupAbort(int32_t old_x) Action = PeepActionType::Walking; SpecialSprite = 0; ActionSpriteImageOffset = 0; - ActionSpriteType = PeepActionSpriteType::None; + ActionSpriteType = PeepAnimationType::None; PathCheckOptimisation = 0; } @@ -671,13 +671,13 @@ GameActions::Result Peep::Place(const TileCoordsXYZ& location, bool apply) Action = PeepActionType::Walking; SpecialSprite = 0; ActionSpriteImageOffset = 0; - ActionSpriteType = PeepActionSpriteType::None; + ActionSpriteType = PeepAnimationType::None; PathCheckOptimisation = 0; EntityTweener::Get().Reset(); auto* guest = As(); if (guest != nullptr) { - ActionSpriteType = PeepActionSpriteType::Invalid; + ActionSpriteType = PeepAnimationType::Invalid; guest->HappinessTarget = std::max(guest->HappinessTarget - 10, 0); UpdateCurrentActionSpriteType(); } @@ -2859,7 +2859,7 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const return; } - PeepActionSpriteType actionSpriteType = ActionSpriteType; + PeepAnimationType actionSpriteType = ActionSpriteType; uint8_t imageOffset = ActionSpriteImageOffset; if (Action == PeepActionType::Idle) @@ -2873,7 +2873,7 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const uint32_t baseImageId = GetPeepAnimation(SpriteType, actionSpriteType).base_image; // Offset frame onto the base image, using rotation except for the 'picked up' state - if (actionSpriteType != PeepActionSpriteType::Ui) + if (actionSpriteType != PeepAnimationType::Ui) baseImageId += (imageDirection >> 3) + imageOffset * 4; else baseImageId += imageOffset; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 4d3eeb91e2..8f0fa64738 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -151,7 +151,7 @@ enum class PeepActionType : uint8_t Walking = 255, }; -enum class PeepActionSpriteType : uint8_t +enum class PeepAnimationType : uint8_t { None = 0, CheckTime = 1, @@ -352,10 +352,10 @@ struct Peep : EntityBase }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower uint8_t SpecialSprite; - PeepActionSpriteType ActionSpriteType; + PeepAnimationType ActionSpriteType; // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which // reads this again - PeepActionSpriteType NextActionSpriteType; + PeepAnimationType NextActionSpriteType; uint8_t ActionSpriteImageOffset; PeepActionType Action; uint8_t ActionFrame; @@ -425,7 +425,7 @@ public: // Peep void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result); [[nodiscard]] int32_t GetZOnSlope(int32_t tile_x, int32_t tile_y); void SwitchNextActionSpriteType(); - [[nodiscard]] PeepActionSpriteType GetActionSpriteType(); + [[nodiscard]] PeepAnimationType GetActionSpriteType(); private: void UpdateFalling(); diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index af50f93483..2aff369b16 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -1710,7 +1710,7 @@ void Staff::Tick128UpdateStaff() PeepFlags |= PEEP_FLAGS_SLOW_WALK; } - ActionSpriteType = PeepActionSpriteType::Invalid; + ActionSpriteType = PeepAnimationType::Invalid; UpdateCurrentActionSpriteType(); } diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index f6c8beceff..0657ac9517 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -48,32 +48,32 @@ namespace OpenRCT2 // Define animation group for Normal sequences static constexpr PeepAnimationGroup kPeepAnimationGroupNormal = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kPeepSpriteNormalStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNormalNone }; - pag[PeepActionSpriteType::CheckTime] = { kPeepSpriteNormalStateCheckTimeId, { 8, 16, 5 }, kPeepAnimationSequenceNormalCheckTime }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteNormalStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNormalWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteNormalStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceNormalEatFood }; - pag[PeepActionSpriteType::ShakeHead] = { kPeepSpriteNormalStateShakeHeadId, { 8, 16, 5 }, kPeepAnimationSequenceNormalShakeHead }; - pag[PeepActionSpriteType::EmptyPockets] = { kPeepSpriteNormalStateEmptyPocketsId, { 8, 16, 5 }, kPeepAnimationSequenceNormalEmptyPockets }; - pag[PeepActionSpriteType::HoldMat] = { kPeepSpriteNormalStateHoldMatId, { 9, 16, 5 }, kPeepAnimationSequenceNormalHoldMat }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteNormalStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteNormalStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingEatFood }; - pag[PeepActionSpriteType::SittingLookAroundLeft] = { kPeepSpriteNormalStateSittingLookAroundLeftId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingLookAroundLeft }; - pag[PeepActionSpriteType::SittingLookAroundRight] = { kPeepSpriteNormalStateSittingLookAroundRightId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingLookAroundRight }; - pag[PeepActionSpriteType::Ui] = { kPeepSpriteNormalStateUiId, { 8, 16, 5 }, kPeepAnimationSequenceNormalUi }; - pag[PeepActionSpriteType::Wow] = { kPeepSpriteNormalStateWowId, { 12, 22, 5 }, kPeepAnimationSequenceNormalWow }; - pag[PeepActionSpriteType::ThrowUp] = { kPeepSpriteNormalStateThrowUpId, { 9, 16, 7 }, kPeepAnimationSequenceNormalThrowUp }; - pag[PeepActionSpriteType::Jump] = { kPeepSpriteNormalStateJumpId, { 10, 22, 5 }, kPeepAnimationSequenceNormalJump }; - pag[PeepActionSpriteType::Drowning] = { kPeepSpriteNormalStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceNormalDrowning }; - pag[PeepActionSpriteType::Joy] = { kPeepSpriteNormalStateJoyId, { 11, 24, 6 }, kPeepAnimationSequenceNormalJoy }; - pag[PeepActionSpriteType::ReadMap] = { kPeepSpriteNormalStateReadMapId, { 11, 16, 5 }, kPeepAnimationSequenceNormalReadMap }; - pag[PeepActionSpriteType::Wave] = { kPeepSpriteNormalStateWaveId, { 11, 16, 5 }, kPeepAnimationSequenceNormalWave }; - pag[PeepActionSpriteType::Wave2] = { kPeepSpriteNormalStateWave2Id, { 11, 16, 5 }, kPeepAnimationSequenceNormalWave2 }; - pag[PeepActionSpriteType::TakePhoto] = { kPeepSpriteNormalStateTakePhotoId, { 8, 16, 5 }, kPeepAnimationSequenceNormalTakePhoto }; - pag[PeepActionSpriteType::Clap] = { kPeepSpriteNormalStateClapId, { 9, 17, 6 }, kPeepAnimationSequenceNormalClap }; - pag[PeepActionSpriteType::Disgust] = { kPeepSpriteNormalStateDisgustId, { 9, 16, 5 }, kPeepAnimationSequenceNormalDisgust }; - pag[PeepActionSpriteType::DrawPicture] = { kPeepSpriteNormalStateDrawPictureId, { 9, 22, 7 }, kPeepAnimationSequenceNormalDrawPicture }; - pag[PeepActionSpriteType::BeingWatched] = { kPeepSpriteNormalStateBeingWatchedId, { 9, 22, 7 }, kPeepAnimationSequenceNormalBeingWatched }; - pag[PeepActionSpriteType::WithdrawMoney] = { kPeepSpriteNormalStateWithdrawMoneyId, { 9, 22, 7 }, kPeepAnimationSequenceNormalWithdrawMoney }; + pag[PeepAnimationType::None] = { kPeepSpriteNormalStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNormalNone }; + pag[PeepAnimationType::CheckTime] = { kPeepSpriteNormalStateCheckTimeId, { 8, 16, 5 }, kPeepAnimationSequenceNormalCheckTime }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteNormalStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNormalWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteNormalStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceNormalEatFood }; + pag[PeepAnimationType::ShakeHead] = { kPeepSpriteNormalStateShakeHeadId, { 8, 16, 5 }, kPeepAnimationSequenceNormalShakeHead }; + pag[PeepAnimationType::EmptyPockets] = { kPeepSpriteNormalStateEmptyPocketsId, { 8, 16, 5 }, kPeepAnimationSequenceNormalEmptyPockets }; + pag[PeepAnimationType::HoldMat] = { kPeepSpriteNormalStateHoldMatId, { 9, 16, 5 }, kPeepAnimationSequenceNormalHoldMat }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteNormalStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteNormalStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingEatFood }; + pag[PeepAnimationType::SittingLookAroundLeft] = { kPeepSpriteNormalStateSittingLookAroundLeftId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingLookAroundLeft }; + pag[PeepAnimationType::SittingLookAroundRight] = { kPeepSpriteNormalStateSittingLookAroundRightId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingLookAroundRight }; + pag[PeepAnimationType::Ui] = { kPeepSpriteNormalStateUiId, { 8, 16, 5 }, kPeepAnimationSequenceNormalUi }; + pag[PeepAnimationType::Wow] = { kPeepSpriteNormalStateWowId, { 12, 22, 5 }, kPeepAnimationSequenceNormalWow }; + pag[PeepAnimationType::ThrowUp] = { kPeepSpriteNormalStateThrowUpId, { 9, 16, 7 }, kPeepAnimationSequenceNormalThrowUp }; + pag[PeepAnimationType::Jump] = { kPeepSpriteNormalStateJumpId, { 10, 22, 5 }, kPeepAnimationSequenceNormalJump }; + pag[PeepAnimationType::Drowning] = { kPeepSpriteNormalStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceNormalDrowning }; + pag[PeepAnimationType::Joy] = { kPeepSpriteNormalStateJoyId, { 11, 24, 6 }, kPeepAnimationSequenceNormalJoy }; + pag[PeepAnimationType::ReadMap] = { kPeepSpriteNormalStateReadMapId, { 11, 16, 5 }, kPeepAnimationSequenceNormalReadMap }; + pag[PeepAnimationType::Wave] = { kPeepSpriteNormalStateWaveId, { 11, 16, 5 }, kPeepAnimationSequenceNormalWave }; + pag[PeepAnimationType::Wave2] = { kPeepSpriteNormalStateWave2Id, { 11, 16, 5 }, kPeepAnimationSequenceNormalWave2 }; + pag[PeepAnimationType::TakePhoto] = { kPeepSpriteNormalStateTakePhotoId, { 8, 16, 5 }, kPeepAnimationSequenceNormalTakePhoto }; + pag[PeepAnimationType::Clap] = { kPeepSpriteNormalStateClapId, { 9, 17, 6 }, kPeepAnimationSequenceNormalClap }; + pag[PeepAnimationType::Disgust] = { kPeepSpriteNormalStateDisgustId, { 9, 16, 5 }, kPeepAnimationSequenceNormalDisgust }; + pag[PeepAnimationType::DrawPicture] = { kPeepSpriteNormalStateDrawPictureId, { 9, 22, 7 }, kPeepAnimationSequenceNormalDrawPicture }; + pag[PeepAnimationType::BeingWatched] = { kPeepSpriteNormalStateBeingWatchedId, { 9, 22, 7 }, kPeepAnimationSequenceNormalBeingWatched }; + pag[PeepAnimationType::WithdrawMoney] = { kPeepSpriteNormalStateWithdrawMoneyId, { 9, 22, 7 }, kPeepAnimationSequenceNormalWithdrawMoney }; return pag; }(); @@ -90,14 +90,14 @@ namespace OpenRCT2 // Define animation group for Handyman sequences static constexpr PeepAnimationGroup kPeepAnimationGroupHandyman = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kHandymanSpriteStateNoneId, { 12, 16, 6 }, kPeepAnimationSequenceHandymanNone }; - pag[PeepActionSpriteType::WatchRide] = { kHandymanSpriteStateWatchRideId, { 9, 16, 6 }, kPeepAnimationSequenceHandymanWatchRide }; - pag[PeepActionSpriteType::Ui] = { kHandymanSpriteStateUiId, { 15, 16, 5 }, kPeepAnimationSequenceHandymanUi }; - pag[PeepActionSpriteType::StaffMower] = { kHandymanSpriteStateStaffMowerId, { 18, 16, 11 }, kPeepAnimationSequenceHandymanStaffMower }; - pag[PeepActionSpriteType::StaffSweep] = { kHandymanSpriteStateStaffSweepId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffSweep }; - pag[PeepActionSpriteType::Drowning] = { kHandymanSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceHandymanDrowning }; - pag[PeepActionSpriteType::StaffWatering] = { kHandymanSpriteStateStaffWateringId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffWatering }; - pag[PeepActionSpriteType::StaffEmptyBin] = { kHandymanSpriteStateStaffEmptyBinId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffEmptyBin }; + pag[PeepAnimationType::None] = { kHandymanSpriteStateNoneId, { 12, 16, 6 }, kPeepAnimationSequenceHandymanNone }; + pag[PeepAnimationType::WatchRide] = { kHandymanSpriteStateWatchRideId, { 9, 16, 6 }, kPeepAnimationSequenceHandymanWatchRide }; + pag[PeepAnimationType::Ui] = { kHandymanSpriteStateUiId, { 15, 16, 5 }, kPeepAnimationSequenceHandymanUi }; + pag[PeepAnimationType::StaffMower] = { kHandymanSpriteStateStaffMowerId, { 18, 16, 11 }, kPeepAnimationSequenceHandymanStaffMower }; + pag[PeepAnimationType::StaffSweep] = { kHandymanSpriteStateStaffSweepId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffSweep }; + pag[PeepAnimationType::Drowning] = { kHandymanSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceHandymanDrowning }; + pag[PeepAnimationType::StaffWatering] = { kHandymanSpriteStateStaffWateringId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffWatering }; + pag[PeepAnimationType::StaffEmptyBin] = { kHandymanSpriteStateStaffEmptyBinId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffEmptyBin }; return pag; }(); @@ -117,17 +117,17 @@ namespace OpenRCT2 // Define animation group for Mechanic sequences static constexpr PeepAnimationGroup kPeepAnimationGroupMechanic = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kMechanicSpriteStateNoneId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicNone }; - pag[PeepActionSpriteType::WatchRide] = { kMechanicSpriteStateWatchRideId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicWatchRide }; - pag[PeepActionSpriteType::Ui] = { kMechanicSpriteStateUiId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicUi }; - pag[PeepActionSpriteType::Drowning] = { kMechanicSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceMechanicDrowning }; - pag[PeepActionSpriteType::StaffAnswerCall] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall }; - pag[PeepActionSpriteType::StaffAnswerCall2] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall2 }; - pag[PeepActionSpriteType::StaffCheckboard] = { kMechanicSpriteStateStaffCheckboardId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffCheckboard }; - pag[PeepActionSpriteType::StaffFix] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix }; - pag[PeepActionSpriteType::StaffFix2] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix2 }; - pag[PeepActionSpriteType::StaffFixGround] = { kMechanicSpriteStateStaffFixGroundId, { 19, 16, 16 }, kPeepAnimationSequenceMechanicStaffFixGround }; - pag[PeepActionSpriteType::StaffFix3] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix3 }; + pag[PeepAnimationType::None] = { kMechanicSpriteStateNoneId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicNone }; + pag[PeepAnimationType::WatchRide] = { kMechanicSpriteStateWatchRideId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicWatchRide }; + pag[PeepAnimationType::Ui] = { kMechanicSpriteStateUiId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicUi }; + pag[PeepAnimationType::Drowning] = { kMechanicSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceMechanicDrowning }; + pag[PeepAnimationType::StaffAnswerCall] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall }; + pag[PeepAnimationType::StaffAnswerCall2] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall2 }; + pag[PeepAnimationType::StaffCheckboard] = { kMechanicSpriteStateStaffCheckboardId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffCheckboard }; + pag[PeepAnimationType::StaffFix] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix }; + pag[PeepAnimationType::StaffFix2] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix2 }; + pag[PeepAnimationType::StaffFixGround] = { kMechanicSpriteStateStaffFixGroundId, { 19, 16, 16 }, kPeepAnimationSequenceMechanicStaffFixGround }; + pag[PeepAnimationType::StaffFix3] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix3 }; return pag; }(); @@ -140,10 +140,10 @@ namespace OpenRCT2 // Define animation group for Security sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSecurity = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kSecuritySpriteStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityNone }; - pag[PeepActionSpriteType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityWatchRide }; - pag[PeepActionSpriteType::Ui] = { kSecuritySpriteStateUiId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityUi }; - pag[PeepActionSpriteType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityDrowning }; + pag[PeepAnimationType::None] = { kSecuritySpriteStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityNone }; + pag[PeepAnimationType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityWatchRide }; + pag[PeepAnimationType::Ui] = { kSecuritySpriteStateUiId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityUi }; + pag[PeepAnimationType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityDrowning }; return pag; }(); @@ -159,13 +159,13 @@ namespace OpenRCT2 // Define animation group for EntertainerPanda sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerPanda = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpritePandaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerPandaNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpritePandaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPandaWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpritePandaStateUiId, { 19, 30, 8 }, kPeepAnimationSequenceEntertainerPandaUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpritePandaStateDrowningId, { 13, 15, 6 }, kPeepAnimationSequenceEntertainerPandaDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpritePandaStateJoyId, { 14, 25, 8 }, kPeepAnimationSequenceEntertainerPandaJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpritePandaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerPandaNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpritePandaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPandaWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpritePandaStateUiId, { 19, 30, 8 }, kPeepAnimationSequenceEntertainerPandaUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpritePandaStateDrowningId, { 13, 15, 6 }, kPeepAnimationSequenceEntertainerPandaDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpritePandaStateJoyId, { 14, 25, 8 }, kPeepAnimationSequenceEntertainerPandaJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaWave2 }; return pag; }(); @@ -181,13 +181,13 @@ namespace OpenRCT2 // Define animation group for EntertainerTiger sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerTiger = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteTigerStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerTigerNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteTigerStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerTigerWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteTigerStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerTigerUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteTigerStateDrowningId, { 13, 15, 6 }, kPeepAnimationSequenceEntertainerTigerDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteTigerStateJoyId, { 16, 28, 9 }, kPeepAnimationSequenceEntertainerTigerJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteTigerStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerTigerNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteTigerStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerTigerWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteTigerStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerTigerUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteTigerStateDrowningId, { 13, 15, 6 }, kPeepAnimationSequenceEntertainerTigerDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteTigerStateJoyId, { 16, 28, 9 }, kPeepAnimationSequenceEntertainerTigerJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerWave2 }; return pag; }(); @@ -203,13 +203,13 @@ namespace OpenRCT2 // Define animation group for EntertainerElephant sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerElephant = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteElephantStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerElephantNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteElephantStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerElephantWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteElephantStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerElephantUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteElephantStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerElephantDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteElephantStateJoyId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerElephantJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteElephantStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerElephantNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteElephantStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerElephantWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteElephantStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerElephantUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteElephantStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerElephantDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteElephantStateJoyId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerElephantJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantWave2 }; return pag; }(); @@ -225,13 +225,13 @@ namespace OpenRCT2 // Define animation group for EntertainerRoman sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerRoman = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteRomanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerRomanNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteRomanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerRomanWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteRomanStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerRomanUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteRomanStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerRomanDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteRomanStateJoyId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerRomanJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteRomanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerRomanNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteRomanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerRomanWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteRomanStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerRomanUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteRomanStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerRomanDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteRomanStateJoyId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerRomanJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanWave2 }; return pag; }(); @@ -247,13 +247,13 @@ namespace OpenRCT2 // Define animation group for EntertainerGorilla sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerGorilla = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteGorillaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteGorillaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerGorillaWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteGorillaStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerGorillaUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteGorillaStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerGorillaDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteGorillaStateWaveId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerGorillaJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteGorillaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteGorillaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerGorillaWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteGorillaStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerGorillaUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteGorillaStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerGorillaDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteGorillaStateWaveId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerGorillaJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaWave2 }; return pag; }(); @@ -269,13 +269,13 @@ namespace OpenRCT2 // Define animation group for EntertainerSnowman sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerSnowman = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteSnowmanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerSnowmanNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteSnowmanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSnowmanWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteSnowmanStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSnowmanUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteSnowmanStateDrowningId, { 17, 15, 9 }, kPeepAnimationSequenceEntertainerSnowmanDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteSnowmanStateWaveId, { 18, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteSnowmanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerSnowmanNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteSnowmanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSnowmanWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteSnowmanStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSnowmanUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteSnowmanStateDrowningId, { 17, 15, 9 }, kPeepAnimationSequenceEntertainerSnowmanDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteSnowmanStateWaveId, { 18, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanWave2 }; return pag; }(); @@ -291,13 +291,13 @@ namespace OpenRCT2 // Define animation group for EntertainerKnight sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerKnight = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteKnightStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerKnightNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteKnightStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerKnightWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteKnightStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerKnightUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteKnightStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerKnightDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteKnightStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerKnightNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteKnightStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerKnightWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteKnightStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerKnightUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteKnightStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerKnightDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightWave2 }; return pag; }(); @@ -313,13 +313,13 @@ namespace OpenRCT2 // Define animation group for EntertainerAstronaut sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerAstronaut = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteAstronautStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerAstronautNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteAstronautStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerAstronautWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteAstronautStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerAstronautUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteAstronautStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerAstronautDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteAstronautStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerAstronautNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteAstronautStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerAstronautWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteAstronautStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerAstronautUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteAstronautStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerAstronautDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautWave2 }; return pag; }(); @@ -335,13 +335,13 @@ namespace OpenRCT2 // Define animation group for EntertainerBandit sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerBandit = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteBanditStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerBanditNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteBanditStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerBanditWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteBanditStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerBanditUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteBanditStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerBanditDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteBanditStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerBanditNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteBanditStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerBanditWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteBanditStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerBanditUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteBanditStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerBanditDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditWave2 }; return pag; }(); @@ -357,13 +357,13 @@ namespace OpenRCT2 // Define animation group for EntertainerSheriff sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerSheriff = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpriteSheriffStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerSheriffNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpriteSheriffStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSheriffWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpriteSheriffStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSheriffUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpriteSheriffStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerSheriffDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpriteSheriffStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerSheriffNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteSheriffStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSheriffWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpriteSheriffStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSheriffUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpriteSheriffStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerSheriffDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffWave2 }; return pag; }(); @@ -379,13 +379,13 @@ namespace OpenRCT2 // Define animation group for EntertainerPirate sequences static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerPirate = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kEntertainerSpritePirateStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerPirateNone }; - pag[PeepActionSpriteType::WatchRide] = { kEntertainerSpritePirateStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPirateWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateEatFood }; - pag[PeepActionSpriteType::Ui] = { kEntertainerSpritePirateStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerPirateUi }; - pag[PeepActionSpriteType::Drowning] = { kEntertainerSpritePirateStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerPirateDrowning }; - pag[PeepActionSpriteType::Joy] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateJoy }; - pag[PeepActionSpriteType::Wave2] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateWave2 }; + pag[PeepAnimationType::None] = { kEntertainerSpritePirateStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerPirateNone }; + pag[PeepAnimationType::WatchRide] = { kEntertainerSpritePirateStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPirateWatchRide }; + pag[PeepAnimationType::EatFood] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateEatFood }; + pag[PeepAnimationType::Ui] = { kEntertainerSpritePirateStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerPirateUi }; + pag[PeepAnimationType::Drowning] = { kEntertainerSpritePirateStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerPirateDrowning }; + pag[PeepAnimationType::Joy] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateJoy }; + pag[PeepAnimationType::Wave2] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateWave2 }; return pag; }(); @@ -399,11 +399,11 @@ namespace OpenRCT2 // Define animation group for IceCream sequences static constexpr PeepAnimationGroup kPeepAnimationGroupIceCream = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteIceCreamStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteIceCreamStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteIceCreamStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteIceCreamStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceIceCreamSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteIceCreamStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceIceCreamSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteIceCreamStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteIceCreamStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteIceCreamStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteIceCreamStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceIceCreamSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteIceCreamStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceIceCreamSittingEatFood }; return pag; }(); @@ -417,11 +417,11 @@ namespace OpenRCT2 // Define animation group for Chips sequences static constexpr PeepAnimationGroup kPeepAnimationGroupChips = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteChipsStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceChipsNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteChipsStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChipsWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteChipsStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceChipsEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteChipsStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChipsSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteChipsStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceChipsSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteChipsStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceChipsNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteChipsStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChipsWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteChipsStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceChipsEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteChipsStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChipsSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteChipsStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceChipsSittingEatFood }; return pag; }(); @@ -435,11 +435,11 @@ namespace OpenRCT2 // Define animation group for Burger sequences static constexpr PeepAnimationGroup kPeepAnimationGroupBurger = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteBurgerStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteBurgerStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteBurgerStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteBurgerStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceBurgerSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteBurgerStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceBurgerSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteBurgerStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteBurgerStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteBurgerStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteBurgerStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceBurgerSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteBurgerStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceBurgerSittingEatFood }; return pag; }(); @@ -453,11 +453,11 @@ namespace OpenRCT2 // Define animation group for Drink sequences static constexpr PeepAnimationGroup kPeepAnimationGroupDrink = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteDrinkStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteDrinkStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteDrinkStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteDrinkStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceDrinkSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteDrinkStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceDrinkSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteDrinkStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteDrinkStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteDrinkStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteDrinkStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceDrinkSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteDrinkStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceDrinkSittingEatFood }; return pag; }(); @@ -469,9 +469,9 @@ namespace OpenRCT2 // Define animation group for Balloon sequences static constexpr PeepAnimationGroup kPeepAnimationGroupBalloon = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteBalloonStateNoneId, { 11, 28, 5 }, kPeepAnimationSequenceBalloonNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteBalloonStateWatchRideId, { 11, 28, 5 }, kPeepAnimationSequenceBalloonWatchRide }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteBalloonStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceBalloonSittingIdle }; + pag[PeepAnimationType::None] = { kPeepSpriteBalloonStateNoneId, { 11, 28, 5 }, kPeepAnimationSequenceBalloonNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteBalloonStateWatchRideId, { 11, 28, 5 }, kPeepAnimationSequenceBalloonWatchRide }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteBalloonStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceBalloonSittingIdle }; return pag; }(); @@ -485,11 +485,11 @@ namespace OpenRCT2 // Define animation group for Candyfloss sequences static constexpr PeepAnimationGroup kPeepAnimationGroupCandyfloss = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteCandyflossStateNoneId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteCandyflossStateWatchRideId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteCandyflossStateEatFoodId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteCandyflossStateSittingIdleId, { 13, 16, 6 }, kPeepAnimationSequenceCandyflossSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteCandyflossStateSittingEatFoodId, { 13, 16, 6 }, kPeepAnimationSequenceCandyflossSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteCandyflossStateNoneId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteCandyflossStateWatchRideId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteCandyflossStateEatFoodId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteCandyflossStateSittingIdleId, { 13, 16, 6 }, kPeepAnimationSequenceCandyflossSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteCandyflossStateSittingEatFoodId, { 13, 16, 6 }, kPeepAnimationSequenceCandyflossSittingEatFood }; return pag; }(); @@ -501,9 +501,9 @@ namespace OpenRCT2 // Define animation group for Umbrella sequences static constexpr PeepAnimationGroup kPeepAnimationGroupUmbrella = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteUmbrellaStateNoneId, { 14, 21, 5 }, kPeepAnimationSequenceUmbrellaNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteUmbrellaStateWatchRideId, { 14, 21, 5 }, kPeepAnimationSequenceUmbrellaWatchRide }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteUmbrellaStateSittingIdleId, { 14, 19, 6 }, kPeepAnimationSequenceUmbrellaSittingIdle }; + pag[PeepAnimationType::None] = { kPeepSpriteUmbrellaStateNoneId, { 14, 21, 5 }, kPeepAnimationSequenceUmbrellaNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteUmbrellaStateWatchRideId, { 14, 21, 5 }, kPeepAnimationSequenceUmbrellaWatchRide }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteUmbrellaStateSittingIdleId, { 14, 19, 6 }, kPeepAnimationSequenceUmbrellaSittingIdle }; return pag; }(); @@ -517,11 +517,11 @@ namespace OpenRCT2 // Define animation group for Pizza sequences static constexpr PeepAnimationGroup kPeepAnimationGroupPizza = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpritePizzaStateNoneId, { 8, 16, 5 }, kPeepAnimationSequencePizzaNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpritePizzaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePizzaWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpritePizzaStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequencePizzaEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpritePizzaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePizzaSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpritePizzaStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequencePizzaSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpritePizzaStateNoneId, { 8, 16, 5 }, kPeepAnimationSequencePizzaNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpritePizzaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePizzaWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpritePizzaStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequencePizzaEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpritePizzaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePizzaSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpritePizzaStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequencePizzaSittingEatFood }; return pag; }(); @@ -534,10 +534,10 @@ namespace OpenRCT2 // Define animation group for SecurityAlt sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSecurityAlt = []() { PeepAnimationGroup pag; - pag[PeepActionSpriteType::None] = { kSecurityStaffSpriteAltStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityAltNone }; - pag[PeepActionSpriteType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityAltWatchRide }; - pag[PeepActionSpriteType::Ui] = { kSecuritySpriteStateUiId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityAltUi }; - pag[PeepActionSpriteType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityAltDrowning }; + pag[PeepAnimationType::None] = { kSecurityStaffSpriteAltStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityAltNone }; + pag[PeepAnimationType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityAltWatchRide }; + pag[PeepAnimationType::Ui] = { kSecuritySpriteStateUiId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityAltUi }; + pag[PeepAnimationType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityAltDrowning }; return pag; }(); @@ -551,11 +551,11 @@ namespace OpenRCT2 // Define animation group for Popcorn sequences static constexpr PeepAnimationGroup kPeepAnimationGroupPopcorn = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpritePopcornStateNoneId, { 11, 19, 5 }, kPeepAnimationSequencePopcornNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpritePopcornStateWatchRideId, { 11, 19, 5 }, kPeepAnimationSequencePopcornWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpritePopcornStateEatFoodId, { 11, 19, 5 }, kPeepAnimationSequencePopcornEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpritePopcornStateSittingIdleId, { 13, 16, 6 }, kPeepAnimationSequencePopcornSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpritePopcornStateSittingEatFoodId, { 13, 16, 6 }, kPeepAnimationSequencePopcornSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpritePopcornStateNoneId, { 11, 19, 5 }, kPeepAnimationSequencePopcornNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpritePopcornStateWatchRideId, { 11, 19, 5 }, kPeepAnimationSequencePopcornWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpritePopcornStateEatFoodId, { 11, 19, 5 }, kPeepAnimationSequencePopcornEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpritePopcornStateSittingIdleId, { 13, 16, 6 }, kPeepAnimationSequencePopcornSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpritePopcornStateSittingEatFoodId, { 13, 16, 6 }, kPeepAnimationSequencePopcornSittingEatFood }; return pag; }(); @@ -565,7 +565,7 @@ namespace OpenRCT2 // Define animation group for ArmsCrossed sequences static constexpr PeepAnimationGroup kPeepAnimationGroupArmsCrossed = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteArmsCrossedStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceArmsCrossedNone }; + pag[PeepAnimationType::None] = { kPeepSpriteArmsCrossedStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceArmsCrossedNone }; return pag; }(); @@ -575,7 +575,7 @@ namespace OpenRCT2 // Define animation group for HeadDown sequences static constexpr PeepAnimationGroup kPeepAnimationGroupHeadDown = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteHeadDownStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHeadDownNone }; + pag[PeepAnimationType::None] = { kPeepSpriteHeadDownStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHeadDownNone }; return pag; }(); @@ -585,7 +585,7 @@ namespace OpenRCT2 // Define animation group for Nauseous sequences static constexpr PeepAnimationGroup kPeepAnimationGroupNauseous = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNauseousNone }; + pag[PeepAnimationType::None] = { kPeepSpriteNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNauseousNone }; return pag; }(); @@ -597,9 +597,9 @@ namespace OpenRCT2 // Define animation group for VeryNauseous sequences static constexpr PeepAnimationGroup kPeepAnimationGroupVeryNauseous = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteVeryNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceVeryNauseousNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteVeryNauseousStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceVeryNauseousWatchRide }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteVeryNauseousStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceVeryNauseousSittingIdle }; + pag[PeepAnimationType::None] = { kPeepSpriteVeryNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceVeryNauseousNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteVeryNauseousStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceVeryNauseousWatchRide }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteVeryNauseousStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceVeryNauseousSittingIdle }; return pag; }(); @@ -609,7 +609,7 @@ namespace OpenRCT2 // Define animation group for RequireToilet sequences static constexpr PeepAnimationGroup kPeepAnimationGroupRequireToilet = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteRequireToiletStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceRequireToiletNone }; + pag[PeepAnimationType::None] = { kPeepSpriteRequireToiletStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceRequireToiletNone }; return pag; }(); @@ -621,9 +621,9 @@ namespace OpenRCT2 // Define animation group for Hat sequences static constexpr PeepAnimationGroup kPeepAnimationGroupHat = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteHatStateNoneId, { 12, 32, 5 }, kPeepAnimationSequenceHatNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteHatStateWatchRideId, { 12, 32, 5 }, kPeepAnimationSequenceHatWatchRide }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteHatStateSittingIdleId, { 10, 20, 6 }, kPeepAnimationSequenceHatSittingIdle }; + pag[PeepAnimationType::None] = { kPeepSpriteHatStateNoneId, { 12, 32, 5 }, kPeepAnimationSequenceHatNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteHatStateWatchRideId, { 12, 32, 5 }, kPeepAnimationSequenceHatWatchRide }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteHatStateSittingIdleId, { 10, 20, 6 }, kPeepAnimationSequenceHatSittingIdle }; return pag; }(); @@ -637,11 +637,11 @@ namespace OpenRCT2 // Define animation group for HotDog sequences static constexpr PeepAnimationGroup kPeepAnimationGroupHotDog = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteHotDogStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteHotDogStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteHotDogStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteHotDogStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceHotDogSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteHotDogStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceHotDogSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteHotDogStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteHotDogStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteHotDogStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteHotDogStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceHotDogSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteHotDogStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceHotDogSittingEatFood }; return pag; }(); @@ -655,11 +655,11 @@ namespace OpenRCT2 // Define animation group for Tentacle sequences static constexpr PeepAnimationGroup kPeepAnimationGroupTentacle = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteTentacleStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteTentacleStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteTentacleStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteTentacleStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceTentacleSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteTentacleStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceTentacleSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteTentacleStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteTentacleStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteTentacleStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteTentacleStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceTentacleSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteTentacleStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceTentacleSittingEatFood }; return pag; }(); @@ -673,11 +673,11 @@ namespace OpenRCT2 // Define animation group for ToffeeApple sequences static constexpr PeepAnimationGroup kPeepAnimationGroupToffeeApple = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteToffeeAppleStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteToffeeAppleStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteToffeeAppleStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteToffeeAppleStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceToffeeAppleSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteToffeeAppleStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceToffeeAppleSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteToffeeAppleStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteToffeeAppleStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteToffeeAppleStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteToffeeAppleStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceToffeeAppleSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteToffeeAppleStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceToffeeAppleSittingEatFood }; return pag; }(); @@ -691,11 +691,11 @@ namespace OpenRCT2 // Define animation group for Donut sequences static constexpr PeepAnimationGroup kPeepAnimationGroupDonut = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteDonutStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceDonutNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteDonutStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceDonutWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteDonutStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceDonutEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteDonutStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceDonutSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteDonutStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceDonutSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteDonutStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceDonutNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteDonutStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceDonutWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteDonutStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceDonutEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteDonutStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceDonutSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteDonutStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceDonutSittingEatFood }; return pag; }(); @@ -709,11 +709,11 @@ namespace OpenRCT2 // Define animation group for Coffee sequences static constexpr PeepAnimationGroup kPeepAnimationGroupCoffee = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteCoffeeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteCoffeeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteCoffeeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteCoffeeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceCoffeeSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteCoffeeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceCoffeeSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteCoffeeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteCoffeeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteCoffeeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteCoffeeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceCoffeeSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteCoffeeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceCoffeeSittingEatFood }; return pag; }(); @@ -727,11 +727,11 @@ namespace OpenRCT2 // Define animation group for Chicken sequences static constexpr PeepAnimationGroup kPeepAnimationGroupChicken = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteChickenStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceChickenNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteChickenStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChickenWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteChickenStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChickenEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteChickenStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChickenSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteChickenStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChickenSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteChickenStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceChickenNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteChickenStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChickenWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteChickenStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChickenEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteChickenStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChickenSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteChickenStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChickenSittingEatFood }; return pag; }(); @@ -745,11 +745,11 @@ namespace OpenRCT2 // Define animation group for Lemonade sequences static constexpr PeepAnimationGroup kPeepAnimationGroupLemonade = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteLemonadeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteLemonadeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteLemonadeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteLemonadeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceLemonadeSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteLemonadeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceLemonadeSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteLemonadeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteLemonadeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteLemonadeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteLemonadeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceLemonadeSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteLemonadeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceLemonadeSittingEatFood }; return pag; }(); @@ -759,7 +759,7 @@ namespace OpenRCT2 // Define animation group for Watching sequences static constexpr PeepAnimationGroup kPeepAnimationGroupWatching = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteWatchingStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceWatchingWatchRide }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteWatchingStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceWatchingWatchRide }; return pag; }(); @@ -773,11 +773,11 @@ namespace OpenRCT2 // Define animation group for Pretzel sequences static constexpr PeepAnimationGroup kPeepAnimationGroupPretzel = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpritePretzelStateNoneId, { 8, 16, 5 }, kPeepAnimationSequencePretzelNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpritePretzelStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePretzelWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpritePretzelStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePretzelEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpritePretzelStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePretzelSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpritePretzelStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePretzelSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpritePretzelStateNoneId, { 8, 16, 5 }, kPeepAnimationSequencePretzelNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpritePretzelStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePretzelWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpritePretzelStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePretzelEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpritePretzelStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePretzelSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpritePretzelStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePretzelSittingEatFood }; return pag; }(); @@ -789,9 +789,9 @@ namespace OpenRCT2 // Define animation group for Sunglasses sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSunglasses = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteSunglassesStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSunglassesNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteSunglassesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSunglassesWatchRide }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteSunglassesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSunglassesSittingIdle }; + pag[PeepAnimationType::None] = { kPeepSpriteSunglassesStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSunglassesNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteSunglassesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSunglassesWatchRide }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSunglassesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSunglassesSittingIdle }; return pag; }(); @@ -805,11 +805,11 @@ namespace OpenRCT2 // Define animation group for SuJongkwa sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSuJongkwa = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteSuJongkwaStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteSuJongkwaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteSuJongkwaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteSuJongkwaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSuJongkwaSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteSuJongkwaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSuJongkwaSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteSuJongkwaStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteSuJongkwaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteSuJongkwaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSuJongkwaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSuJongkwaSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSuJongkwaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSuJongkwaSittingEatFood }; return pag; }(); @@ -823,11 +823,11 @@ namespace OpenRCT2 // Define animation group for Juice sequences static constexpr PeepAnimationGroup kPeepAnimationGroupJuice = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteJuiceStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteJuiceStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteJuiceStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteJuiceStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceJuiceSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteJuiceStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceJuiceSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteJuiceStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteJuiceStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteJuiceStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteJuiceStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceJuiceSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteJuiceStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceJuiceSittingEatFood }; return pag; }(); @@ -841,11 +841,11 @@ namespace OpenRCT2 // Define animation group for FunnelCake sequences static constexpr PeepAnimationGroup kPeepAnimationGroupFunnelCake = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteFunnelCakeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteFunnelCakeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteFunnelCakeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteFunnelCakeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceFunnelCakeSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteFunnelCakeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceFunnelCakeSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteFunnelCakeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteFunnelCakeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteFunnelCakeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteFunnelCakeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceFunnelCakeSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteFunnelCakeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceFunnelCakeSittingEatFood }; return pag; }(); @@ -859,11 +859,11 @@ namespace OpenRCT2 // Define animation group for Noodles sequences static constexpr PeepAnimationGroup kPeepAnimationGroupNoodles = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteNoodlesStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteNoodlesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteNoodlesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteNoodlesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNoodlesSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteNoodlesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNoodlesSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteNoodlesStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteNoodlesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteNoodlesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteNoodlesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNoodlesSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteNoodlesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNoodlesSittingEatFood }; return pag; }(); @@ -877,11 +877,11 @@ namespace OpenRCT2 // Define animation group for Sausage sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSausage = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteSausageStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSausageNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteSausageStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSausageWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteSausageStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSausageEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteSausageStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSausageSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteSausageStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSausageSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteSausageStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSausageNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteSausageStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSausageWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteSausageStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSausageEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSausageStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSausageSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSausageStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSausageSittingEatFood }; return pag; }(); @@ -895,11 +895,11 @@ namespace OpenRCT2 // Define animation group for Soup sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSoup = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteSoupStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSoupNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteSoupStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSoupWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteSoupStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSoupEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteSoupStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSoupSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteSoupStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSoupSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteSoupStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSoupNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteSoupStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSoupWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteSoupStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSoupEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSoupStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSoupSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSoupStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSoupSittingEatFood }; return pag; }(); @@ -913,11 +913,11 @@ namespace OpenRCT2 // Define animation group for Sandwich sequences static constexpr PeepAnimationGroup kPeepAnimationGroupSandwich = []() { PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::None] = { kPeepSpriteSandwichStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichNone }; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteSandwichStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichWatchRide }; - pag[PeepActionSpriteType::EatFood] = { kPeepSpriteSandwichStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichEatFood }; - pag[PeepActionSpriteType::SittingIdle] = { kPeepSpriteSandwichStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSandwichSittingIdle }; - pag[PeepActionSpriteType::SittingEatFood] = { kPeepSpriteSandwichStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSandwichSittingEatFood }; + pag[PeepAnimationType::None] = { kPeepSpriteSandwichStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichNone }; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteSandwichStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichWatchRide }; + pag[PeepAnimationType::EatFood] = { kPeepSpriteSandwichStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichEatFood }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSandwichStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSandwichSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSandwichStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSandwichSittingEatFood }; return pag; }(); @@ -974,12 +974,12 @@ namespace OpenRCT2 kPeepAnimationGroupSandwich, }; - const PeepAnimation& GetPeepAnimation(PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType) + const PeepAnimation& GetPeepAnimation(PeepSpriteType spriteType, PeepAnimationType actionSpriteType) { return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType]; } - const SpriteBounds& GetSpriteBounds(PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType) + const SpriteBounds& GetSpriteBounds(PeepSpriteType spriteType, PeepAnimationType actionSpriteType) { return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType].bounds; } diff --git a/src/openrct2/peep/PeepAnimationData.h b/src/openrct2/peep/PeepAnimationData.h index bc814722df..6a17db1788 100644 --- a/src/openrct2/peep/PeepAnimationData.h +++ b/src/openrct2/peep/PeepAnimationData.h @@ -23,11 +23,11 @@ namespace OpenRCT2 struct PeepAnimationGroup { public: - constexpr PeepAnimation& operator[](PeepActionSpriteType n) + constexpr PeepAnimation& operator[](PeepAnimationType n) { return animations[EnumValue(n)]; } - constexpr const PeepAnimation& operator[](PeepActionSpriteType n) const + constexpr const PeepAnimation& operator[](PeepAnimationType n) const { return animations[EnumValue(n)]; } @@ -37,7 +37,7 @@ namespace OpenRCT2 }; const PeepAnimation& GetPeepAnimation( - PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType = PeepActionSpriteType::None); + PeepSpriteType spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); const SpriteBounds& GetSpriteBounds( - PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType = PeepActionSpriteType::None); + PeepSpriteType spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); } // namespace OpenRCT2 diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index fa02a19652..5f848ded2a 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1301,10 +1301,10 @@ namespace OpenRCT2::RCT1 dst->SpriteType = RCT1::GetPeepSpriteType(src->SpriteType); dst->Action = static_cast(src->Action); dst->SpecialSprite = src->SpecialSprite; - dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); + dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; dst->WalkingFrameNum = src->NoActionFrameNum; - dst->ActionSpriteType = static_cast(src->ActionSpriteType); + dst->ActionSpriteType = static_cast(src->ActionSpriteType); dst->ActionFrame = src->ActionFrame; const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->ActionSpriteType); diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 4c5b2eef5a..81b1b29738 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1629,8 +1629,8 @@ namespace OpenRCT2::RCT2 dst->CurrentTrain = src->CurrentTrain; dst->TimeToSitdown = src->TimeToSitdown; dst->SpecialSprite = src->SpecialSprite; - dst->ActionSpriteType = static_cast(src->ActionSpriteType); - dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); + dst->ActionSpriteType = static_cast(src->ActionSpriteType); + dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; dst->Action = static_cast(src->Action); dst->ActionFrame = src->ActionFrame; diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index c144ff394a..70a2b8805d 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -147,33 +147,33 @@ namespace OpenRCT2::Scripting { "here_we_are", PeepThoughtType::HereWeAre }, }); - static const DukEnumMap availableGuestAnimations({ - { "walking", PeepActionSpriteType::None }, - { "checkTime", PeepActionSpriteType::CheckTime }, - { "watchRide", PeepActionSpriteType::WatchRide }, - { "eatFood", PeepActionSpriteType::EatFood }, - { "shakeHead", PeepActionSpriteType::ShakeHead }, - { "emptyPockets", PeepActionSpriteType::EmptyPockets }, - { "holdMat", PeepActionSpriteType::HoldMat }, - { "sittingIdle", PeepActionSpriteType::SittingIdle }, - { "sittingEatFood", PeepActionSpriteType::SittingEatFood }, - { "sittingLookAroundLeft", PeepActionSpriteType::SittingLookAroundLeft }, - { "sittingLookAroundRight", PeepActionSpriteType::SittingLookAroundRight }, - { "hanging", PeepActionSpriteType::Ui }, - { "wow", PeepActionSpriteType::Wow }, - { "throwUp", PeepActionSpriteType::ThrowUp }, - { "jump", PeepActionSpriteType::Jump }, - { "drowning", PeepActionSpriteType::Drowning }, - { "joy", PeepActionSpriteType::Joy }, - { "readMap", PeepActionSpriteType::ReadMap }, - { "wave", PeepActionSpriteType::Wave }, - { "wave2", PeepActionSpriteType::Wave2 }, - { "takePhoto", PeepActionSpriteType::TakePhoto }, - { "clap", PeepActionSpriteType::Clap }, - { "disgust", PeepActionSpriteType::Disgust }, - { "drawPicture", PeepActionSpriteType::DrawPicture }, - { "beingWatched", PeepActionSpriteType::BeingWatched }, - { "withdrawMoney", PeepActionSpriteType::WithdrawMoney }, + static const DukEnumMap availableGuestAnimations({ + { "walking", PeepAnimationType::None }, + { "checkTime", PeepAnimationType::CheckTime }, + { "watchRide", PeepAnimationType::WatchRide }, + { "eatFood", PeepAnimationType::EatFood }, + { "shakeHead", PeepAnimationType::ShakeHead }, + { "emptyPockets", PeepAnimationType::EmptyPockets }, + { "holdMat", PeepAnimationType::HoldMat }, + { "sittingIdle", PeepAnimationType::SittingIdle }, + { "sittingEatFood", PeepAnimationType::SittingEatFood }, + { "sittingLookAroundLeft", PeepAnimationType::SittingLookAroundLeft }, + { "sittingLookAroundRight", PeepAnimationType::SittingLookAroundRight }, + { "hanging", PeepAnimationType::Ui }, + { "wow", PeepAnimationType::Wow }, + { "throwUp", PeepAnimationType::ThrowUp }, + { "jump", PeepAnimationType::Jump }, + { "drowning", PeepAnimationType::Drowning }, + { "joy", PeepAnimationType::Joy }, + { "readMap", PeepAnimationType::ReadMap }, + { "wave", PeepAnimationType::Wave }, + { "wave2", PeepAnimationType::Wave2 }, + { "takePhoto", PeepAnimationType::TakePhoto }, + { "clap", PeepAnimationType::Clap }, + { "disgust", PeepAnimationType::Disgust }, + { "drawPicture", PeepAnimationType::DrawPicture }, + { "beingWatched", PeepAnimationType::BeingWatched }, + { "withdrawMoney", PeepAnimationType::WithdrawMoney }, }); ScGuest::ScGuest(EntityId id) @@ -898,7 +898,7 @@ namespace OpenRCT2::Scripting for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; - if (animationType != PeepActionSpriteType::Ui) + if (animationType != PeepAnimationType::Ui) imageId += rotation + frameOffset * 4; else imageId += frameOffset; @@ -921,8 +921,8 @@ namespace OpenRCT2::Scripting // Special consideration for sitting peeps // TODO: something funky going on in the state machine - if (peep->ActionSpriteType == PeepActionSpriteType::None && peep->State == PeepState::Sitting) - action = availableGuestAnimations[PeepActionSpriteType::SittingIdle]; + if (peep->ActionSpriteType == PeepAnimationType::None && peep->State == PeepState::Sitting) + action = availableGuestAnimations[PeepAnimationType::SittingIdle]; return std::string(action); } diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.hpp b/src/openrct2/scripting/bindings/entity/ScGuest.hpp index 593d30de74..02947955b1 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.hpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.hpp @@ -15,7 +15,7 @@ # include "../../../management/Marketing.h" # include "ScPeep.hpp" -enum class PeepActionSpriteType : uint8_t; +enum class PeepAnimationType : uint8_t; namespace OpenRCT2::Scripting { diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 271b88dd72..8d294e3a8b 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -17,46 +17,46 @@ namespace OpenRCT2::Scripting { - static const DukEnumMap availableHandymanAnimations({ - { "walking", PeepActionSpriteType::None }, - { "watchRide", PeepActionSpriteType::WatchRide }, - { "hanging", PeepActionSpriteType::Ui }, - { "staffMower", PeepActionSpriteType::StaffMower }, - { "staffSweep", PeepActionSpriteType::StaffSweep }, - { "drowning", PeepActionSpriteType::Drowning }, - { "staffWatering", PeepActionSpriteType::StaffWatering }, - { "staffEmptyBin", PeepActionSpriteType::StaffEmptyBin }, + static const DukEnumMap availableHandymanAnimations({ + { "walking", PeepAnimationType::None }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Ui }, + { "staffMower", PeepAnimationType::StaffMower }, + { "staffSweep", PeepAnimationType::StaffSweep }, + { "drowning", PeepAnimationType::Drowning }, + { "staffWatering", PeepAnimationType::StaffWatering }, + { "staffEmptyBin", PeepAnimationType::StaffEmptyBin }, }); - static const DukEnumMap availableMechanicAnimations({ - { "walking", PeepActionSpriteType::None }, - { "watchRide", PeepActionSpriteType::WatchRide }, - { "hanging", PeepActionSpriteType::Ui }, - { "drowning", PeepActionSpriteType::Drowning }, - { "staffAnswerCall", PeepActionSpriteType::StaffAnswerCall }, - { "staffAnswerCall2", PeepActionSpriteType::StaffAnswerCall2 }, - { "staffCheckBoard", PeepActionSpriteType::StaffCheckboard }, - { "staffFix", PeepActionSpriteType::StaffFix }, - { "staffFix2", PeepActionSpriteType::StaffFix2 }, - { "staffFixGround", PeepActionSpriteType::StaffFixGround }, - { "staffFix3", PeepActionSpriteType::StaffFix3 }, + static const DukEnumMap availableMechanicAnimations({ + { "walking", PeepAnimationType::None }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Ui }, + { "drowning", PeepAnimationType::Drowning }, + { "staffAnswerCall", PeepAnimationType::StaffAnswerCall }, + { "staffAnswerCall2", PeepAnimationType::StaffAnswerCall2 }, + { "staffCheckBoard", PeepAnimationType::StaffCheckboard }, + { "staffFix", PeepAnimationType::StaffFix }, + { "staffFix2", PeepAnimationType::StaffFix2 }, + { "staffFixGround", PeepAnimationType::StaffFixGround }, + { "staffFix3", PeepAnimationType::StaffFix3 }, }); - static const DukEnumMap availableSecurityAnimations({ - { "walking", PeepActionSpriteType::None }, - { "watchRide", PeepActionSpriteType::WatchRide }, - { "hanging", PeepActionSpriteType::Ui }, - { "drowning", PeepActionSpriteType::Drowning }, + static const DukEnumMap availableSecurityAnimations({ + { "walking", PeepAnimationType::None }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Ui }, + { "drowning", PeepAnimationType::Drowning }, }); - static const DukEnumMap availableEntertainerAnimations({ - { "walking", PeepActionSpriteType::None }, - { "watchRide", PeepActionSpriteType::WatchRide }, - { "wave", PeepActionSpriteType::EatFood }, // NB: this not a typo - { "hanging", PeepActionSpriteType::Ui }, - { "drowning", PeepActionSpriteType::Drowning }, - { "joy", PeepActionSpriteType::Joy }, - { "wave2", PeepActionSpriteType::Wave2 }, + static const DukEnumMap availableEntertainerAnimations({ + { "walking", PeepAnimationType::None }, + { "watchRide", PeepAnimationType::WatchRide }, + { "wave", PeepAnimationType::EatFood }, // NB: this not a typo + { "hanging", PeepAnimationType::Ui }, + { "drowning", PeepAnimationType::Drowning }, + { "joy", PeepAnimationType::Joy }, + { "wave2", PeepAnimationType::Wave2 }, }); ScStaff::ScStaff(EntityId Id) @@ -136,7 +136,7 @@ namespace OpenRCT2::Scripting // Reset state to walking to prevent invalid actions from carrying over peep->Action = PeepActionType::Walking; - peep->ActionSpriteType = peep->NextActionSpriteType = PeepActionSpriteType::None; + peep->ActionSpriteType = peep->NextActionSpriteType = PeepAnimationType::None; } } @@ -291,7 +291,7 @@ namespace OpenRCT2::Scripting } } - const DukEnumMap& ScStaff::animationsByStaffType(StaffType staffType) const + const DukEnumMap& ScStaff::animationsByStaffType(StaffType staffType) const { switch (staffType) { @@ -344,7 +344,7 @@ namespace OpenRCT2::Scripting for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; - if (animationType != PeepActionSpriteType::Ui) + if (animationType != PeepAnimationType::Ui) imageId += rotation + frameOffset * 4; else imageId += frameOffset; diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.hpp b/src/openrct2/scripting/bindings/entity/ScStaff.hpp index 9b06565f7f..112431e4a0 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.hpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.hpp @@ -15,7 +15,7 @@ # include -enum class PeepActionSpriteType : uint8_t; +enum class PeepAnimationType : uint8_t; enum class StaffType : uint8_t; namespace OpenRCT2::Scripting @@ -68,7 +68,7 @@ namespace OpenRCT2::Scripting uint8_t orders_get() const; void orders_set(uint8_t value); - const DukEnumMap& animationsByStaffType(StaffType staffType) const; + const DukEnumMap& animationsByStaffType(StaffType staffType) const; std::vector getAnimationSpriteIds(std::string groupKey, uint8_t rotation) const; std::vector availableAnimations_get() const; std::string animation_get() const; From 2edf8b472ab9d91dea32400db11a923fab23ac09 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:08:58 +0200 Subject: [PATCH 03/12] Rename (Next)ActionSpriteType to (Next)AnimationType --- src/openrct2/GameStateSnapshots.cpp | 4 +- src/openrct2/actions/StaffHireNewAction.cpp | 2 +- .../actions/StaffSetCostumeAction.cpp | 2 +- src/openrct2/entity/Guest.cpp | 78 +++++++++---------- src/openrct2/entity/Peep.cpp | 50 ++++++------ src/openrct2/entity/Peep.h | 12 +-- src/openrct2/entity/Staff.cpp | 26 +++---- src/openrct2/park/ParkFile.cpp | 4 +- src/openrct2/rct1/RCT1.h | 8 +- src/openrct2/rct1/S4Importer.cpp | 6 +- src/openrct2/rct2/RCT2.h | 4 +- src/openrct2/rct2/S6Importer.cpp | 4 +- .../scripting/bindings/entity/ScGuest.cpp | 12 +-- .../scripting/bindings/entity/ScStaff.cpp | 12 +-- src/openrct2/world/Footpath.cpp | 2 +- src/openrct2/world/MapAnimation.cpp | 2 +- 16 files changed, 114 insertions(+), 114 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 39cd67d45f..cff6e0a1fc 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -281,8 +281,8 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, CurrentTrain); COMPARE_FIELD(Peep, TimeToSitdown); COMPARE_FIELD(Peep, SpecialSprite); - COMPARE_FIELD(Peep, ActionSpriteType); - COMPARE_FIELD(Peep, NextActionSpriteType); + COMPARE_FIELD(Peep, AnimationType); + COMPARE_FIELD(Peep, NextAnimationType); COMPARE_FIELD(Peep, ActionSpriteImageOffset); COMPARE_FIELD(Peep, Action); COMPARE_FIELD(Peep, ActionFrame); diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 6153f639e3..8892840f4d 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -134,7 +134,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->SpecialSprite = 0; newPeep->ActionSpriteImageOffset = 0; newPeep->WalkingFrameNum = 0; - newPeep->ActionSpriteType = PeepAnimationType::None; + newPeep->AnimationType = PeepAnimationType::None; newPeep->PathCheckOptimisation = 0; newPeep->PeepFlags = 0; newPeep->StaffLawnsMown = 0; diff --git a/src/openrct2/actions/StaffSetCostumeAction.cpp b/src/openrct2/actions/StaffSetCostumeAction.cpp index e057fca248..ae3e80e4bb 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.cpp +++ b/src/openrct2/actions/StaffSetCostumeAction.cpp @@ -105,7 +105,7 @@ GameActions::Result StaffSetCostumeAction::Execute() const staff->PeepFlags |= PEEP_FLAGS_SLOW_WALK; } staff->ActionFrame = 0; - staff->UpdateCurrentActionSpriteType(); + staff->UpdateCurrentAnimationType(); staff->Invalidate(); WindowInvalidateByNumber(WindowClass::Peep, _spriteIndex); diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index d5b28231a6..8cd4a2bbf0 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -514,7 +514,7 @@ void Guest::GivePassingPeepsPizza(Guest* passingPeep) passingPeep->Action = PeepActionType::Wave2; passingPeep->ActionFrame = 0; passingPeep->ActionSpriteImageOffset = 0; - passingPeep->UpdateCurrentActionSpriteType(); + passingPeep->UpdateCurrentAnimationType(); } } } @@ -529,7 +529,7 @@ void Guest::MakePassingPeepsSick(Guest* passingPeep) passingPeep->Action = PeepActionType::ThrowUp; passingPeep->ActionFrame = 0; passingPeep->ActionSpriteImageOffset = 0; - passingPeep->UpdateCurrentActionSpriteType(); + passingPeep->UpdateCurrentAnimationType(); } } @@ -577,7 +577,7 @@ void Guest::UpdateEasterEggInteractions() Action = PeepActionType::Joy; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } } @@ -782,7 +782,7 @@ void Guest::UpdateMotivesIdle() Action = PeepActionType::ThrowUp; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } } @@ -1250,7 +1250,7 @@ void Guest::TryGetUpFromSitting() // Set destination to the centre of the tile. auto destination = GetLocation().ToTileCentre(); SetDestination(destination, 5); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } /** @@ -1276,8 +1276,8 @@ void Guest::UpdateSitting() Orientation = ((Var37 + 2) & 3) * 8; Action = PeepActionType::Idle; - NextActionSpriteType = PeepAnimationType::SittingIdle; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::SittingIdle; + SwitchNextAnimationType(); SittingSubState = PeepSittingSubState::SatDown; @@ -1304,7 +1304,7 @@ void Guest::UpdateSitting() // Set destination to the centre of the tile auto destination = GetLocation().ToTileCentre(); SetDestination(destination, 5); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } @@ -1324,7 +1324,7 @@ void Guest::UpdateSitting() Action = PeepActionType::SittingEatFood; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } @@ -1352,7 +1352,7 @@ void Guest::UpdateSitting() } ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } } @@ -2400,7 +2400,7 @@ void Guest::ReadMap() Action = PeepActionType::ReadMap; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -3394,7 +3394,7 @@ void Guest::UpdateBuying() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); ride->no_primary_items_sold++; } @@ -4913,7 +4913,7 @@ void Guest::UpdateRideMazePathfinding() Action = PeepActionType::Jump; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -5314,7 +5314,7 @@ void Guest::UpdateWalking() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (PeepFlags & PEEP_FLAGS_PHOTO && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) @@ -5323,7 +5323,7 @@ void Guest::UpdateWalking() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (PeepFlags & PEEP_FLAGS_PAINTING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) @@ -5332,7 +5332,7 @@ void Guest::UpdateWalking() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -5553,8 +5553,8 @@ void Guest::UpdateWaitingAtCrossing() } Action = PeepActionType::Idle; - NextActionSpriteType = PeepAnimationType::WatchRide; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::WatchRide; + SwitchNextAnimationType(); if (HasFoodOrDrink()) { @@ -5565,7 +5565,7 @@ void Guest::UpdateWaitingAtCrossing() ActionSpriteImageOffset = 0; } - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } @@ -5577,7 +5577,7 @@ void Guest::UpdateWaitingAtCrossing() ActionSpriteImageOffset = 0; } - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } /** @@ -5640,7 +5640,7 @@ void Guest::UpdateQueuing() Action = PeepActionType::EatFood; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (TimeInQueue >= 3500 && (0xFFFF & ScenarioRand()) <= 93) { @@ -5650,7 +5650,7 @@ void Guest::UpdateQueuing() } else { - if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextActionSpriteType == PeepAnimationType::WatchRide) + if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextAnimationType == PeepAnimationType::WatchRide) { switch (SpriteType) { @@ -5680,7 +5680,7 @@ void Guest::UpdateQueuing() Action = PeepActionType::EatFood; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); break; default: break; @@ -5788,9 +5788,9 @@ void Guest::UpdateWatching() Orientation = (Var37 & 3) * 8; Action = PeepActionType::Idle; - NextActionSpriteType = PeepAnimationType::WatchRide; + NextAnimationType = PeepAnimationType::WatchRide; - SwitchNextActionSpriteType(); + SwitchNextAnimationType(); SubState++; @@ -5817,7 +5817,7 @@ void Guest::UpdateWatching() Action = PeepActionType::EatFood; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } } @@ -5827,7 +5827,7 @@ void Guest::UpdateWatching() Action = PeepActionType::TakePhoto; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } @@ -5838,7 +5838,7 @@ void Guest::UpdateWatching() Action = PeepActionType::Wave; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } } @@ -5858,7 +5858,7 @@ void Guest::UpdateWatching() auto destination = GetLocation().ToTileCentre(); SetDestination(destination, 5); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -6751,20 +6751,20 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type) PeepFlags |= PEEP_FLAGS_SLOW_WALK; } - ActionSpriteType = PeepAnimationType::Invalid; - UpdateCurrentActionSpriteType(); + AnimationType = PeepAnimationType::Invalid; + UpdateCurrentAnimationType(); if (State == PeepState::Sitting) { Action = PeepActionType::Idle; - NextActionSpriteType = PeepAnimationType::SittingIdle; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::SittingIdle; + SwitchNextAnimationType(); } if (State == PeepState::Watching) { Action = PeepActionType::Idle; - NextActionSpriteType = PeepAnimationType::WatchRide; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::WatchRide; + SwitchNextAnimationType(); } } @@ -6972,7 +6972,7 @@ void Guest::InsertNewThought(PeepThoughtType thoughtType, uint16_t thoughtArgume Action = newAction; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } for (int32_t i = 0; i < kPeepMaxThoughts; ++i) @@ -7126,12 +7126,12 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->SpecialSprite = 0; peep->ActionSpriteImageOffset = 0; peep->WalkingFrameNum = 0; - peep->ActionSpriteType = PeepAnimationType::None; + peep->AnimationType = PeepAnimationType::None; peep->PeepFlags = 0; peep->FavouriteRide = RideId::GetNull(); peep->FavouriteRideRating = 0; - const SpriteBounds* spriteBounds = &GetSpriteBounds(peep->SpriteType, peep->ActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(peep->SpriteType, peep->AnimationType); peep->SpriteData.Width = spriteBounds->sprite_width; peep->SpriteData.HeightMin = spriteBounds->sprite_height_negative; peep->SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -7467,7 +7467,7 @@ bool Guest::UpdateQueuePosition(PeepActionType previous_action) return true; Action = PeepActionType::Idle; - NextActionSpriteType = PeepAnimationType::WatchRide; + NextAnimationType = PeepAnimationType::WatchRide; if (previous_action != PeepActionType::Idle) Invalidate(); return true; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 03617269f7..6c7cef1437 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -314,7 +314,7 @@ bool Peep::IsOnPathBlockedByVehicle() return FootpathIsBlockedByVehicle(curPos); } -PeepAnimationType Peep::GetActionSpriteType() +PeepAnimationType Peep::GetAnimationType() { if (IsActionInterruptable()) { // PeepActionType::None1 or PeepActionType::None2 @@ -335,19 +335,19 @@ PeepAnimationType Peep::GetActionSpriteType() /* * rct2: 0x00693B58 */ -void Peep::UpdateCurrentActionSpriteType() +void Peep::UpdateCurrentAnimationType() { if (EnumValue(SpriteType) >= EnumValue(PeepSpriteType::Count)) { return; } - PeepAnimationType newActionSpriteType = GetActionSpriteType(); - if (ActionSpriteType == newActionSpriteType) + PeepAnimationType newAnimationType = GetAnimationType(); + if (AnimationType == newAnimationType) { return; } - ActionSpriteType = newActionSpriteType; + AnimationType = newAnimationType; UpdateSpriteBoundingBox(); } @@ -356,7 +356,7 @@ void Peep::UpdateSpriteBoundingBox() { Invalidate(); - const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, ActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, AnimationType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -376,7 +376,7 @@ void Peep::SwitchToSpecialSprite(uint8_t special_sprite_id) { ActionSpriteImageOffset = 0; } - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } void Peep::StateReset() @@ -435,7 +435,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) { ActionSpriteImageOffset = 0; Action = PeepActionType::Walking; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return { { x, y } }; } @@ -451,7 +451,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) bool Peep::UpdateActionAnimation() { - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); + const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType); ActionFrame++; // If last frame of action @@ -510,7 +510,7 @@ std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, void Peep::UpdateWalkingAnimation() { WalkingFrameNum++; - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); + const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType); if (WalkingFrameNum >= peepAnimation.frame_offsets.size()) { WalkingFrameNum = 0; @@ -622,7 +622,7 @@ void Peep::PickupAbort(int32_t old_x) Action = PeepActionType::Walking; SpecialSprite = 0; ActionSpriteImageOffset = 0; - ActionSpriteType = PeepAnimationType::None; + AnimationType = PeepAnimationType::None; PathCheckOptimisation = 0; } @@ -671,15 +671,15 @@ GameActions::Result Peep::Place(const TileCoordsXYZ& location, bool apply) Action = PeepActionType::Walking; SpecialSprite = 0; ActionSpriteImageOffset = 0; - ActionSpriteType = PeepAnimationType::None; + AnimationType = PeepAnimationType::None; PathCheckOptimisation = 0; EntityTweener::Get().Reset(); auto* guest = As(); if (guest != nullptr) { - ActionSpriteType = PeepAnimationType::Invalid; + AnimationType = PeepAnimationType::Invalid; guest->HappinessTarget = std::max(guest->HappinessTarget - 10, 0); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -819,7 +819,7 @@ void Peep::UpdateFalling() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); PeepWindowStateUpdate(this); return; } @@ -1383,7 +1383,7 @@ void PeepApplause() peep->Action = PeepActionType::Clap; peep->ActionFrame = 0; peep->ActionSpriteImageOffset = 0; - peep->UpdateCurrentActionSpriteType(); + peep->UpdateCurrentAnimationType(); } } @@ -1702,14 +1702,14 @@ void PeepSetMapTooltip(Peep* peep) /** * rct2: 0x00693BAB */ -void Peep::SwitchNextActionSpriteType() +void Peep::SwitchNextAnimationType() { - // TBD: Add nextActionSpriteType as function parameter and make peep->NextActionSpriteType obsolete? - if (NextActionSpriteType != ActionSpriteType) + // TBD: Add nextAnimationType as function parameter and make peep->NextAnimationType obsolete? + if (NextAnimationType != AnimationType) { Invalidate(); - ActionSpriteType = NextActionSpriteType; - const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, NextActionSpriteType); + AnimationType = NextAnimationType; + const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, NextAnimationType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -2807,8 +2807,8 @@ void Peep::Serialise(DataSerialiser& stream) stream << CurrentCar; stream << CurrentSeat; stream << SpecialSprite; - stream << ActionSpriteType; - stream << NextActionSpriteType; + stream << AnimationType; + stream << NextAnimationType; stream << ActionSpriteImageOffset; stream << Action; stream << ActionFrame; @@ -2859,12 +2859,12 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const return; } - PeepAnimationType actionSpriteType = ActionSpriteType; + PeepAnimationType actionSpriteType = AnimationType; uint8_t imageOffset = ActionSpriteImageOffset; if (Action == PeepActionType::Idle) { - actionSpriteType = NextActionSpriteType; + actionSpriteType = NextAnimationType; imageOffset = 0; } diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 8f0fa64738..c891624da3 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -352,10 +352,10 @@ struct Peep : EntityBase }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower uint8_t SpecialSprite; - PeepAnimationType ActionSpriteType; - // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which + PeepAnimationType AnimationType; + // Seems to be used like a local variable, as it's always set before calling SwitchNextAnimationType, which // reads this again - PeepAnimationType NextActionSpriteType; + PeepAnimationType NextAnimationType; uint8_t ActionSpriteImageOffset; PeepActionType Action; uint8_t ActionFrame; @@ -383,7 +383,7 @@ public: // Peep void ThrowUp(); void SetState(PeepState new_state); void Remove(); - void UpdateCurrentActionSpriteType(); + void UpdateCurrentAnimationType(); void UpdateSpriteBoundingBox(); void SwitchToSpecialSprite(uint8_t special_sprite_id); void StateReset(); @@ -424,8 +424,8 @@ public: // Peep void PerformNextAction(uint8_t& pathing_result); void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result); [[nodiscard]] int32_t GetZOnSlope(int32_t tile_x, int32_t tile_y); - void SwitchNextActionSpriteType(); - [[nodiscard]] PeepAnimationType GetActionSpriteType(); + void SwitchNextAnimationType(); + [[nodiscard]] PeepAnimationType GetAnimationType(); private: void UpdateFalling(); diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index 2aff369b16..f62372805d 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -918,7 +918,7 @@ bool Staff::DoEntertainerPathFinding() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); EntertainerUpdateNearbyPeeps(); } @@ -1115,7 +1115,7 @@ void Staff::UpdateWatering() Action = PeepActionType::StaffWatering; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); SubState = 1; } @@ -1179,7 +1179,7 @@ void Staff::UpdateEmptyingBin() Action = PeepActionType::StaffEmptyBin; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); SubState = 1; } @@ -1268,7 +1268,7 @@ void Staff::UpdateSweeping() Action = PeepActionType::StaffSweep; ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } StateReset(); @@ -1397,7 +1397,7 @@ void Staff::UpdateAnswering() ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); SubState = 1; PeepWindowStateUpdate(this); @@ -1710,8 +1710,8 @@ void Staff::Tick128UpdateStaff() PeepFlags |= PEEP_FLAGS_SLOW_WALK; } - ActionSpriteType = PeepAnimationType::Invalid; - UpdateCurrentActionSpriteType(); + AnimationType = PeepAnimationType::Invalid; + UpdateCurrentAnimationType(); } bool Staff::IsMechanic() const @@ -2094,7 +2094,7 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride& ride) Action = (ScenarioRand() & 1) ? PeepActionType::StaffFix2 : PeepActionType::StaffFix; ActionSpriteImageOffset = 0; ActionFrame = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2136,7 +2136,7 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) ActionSpriteImageOffset = 0; ActionFrame = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2242,7 +2242,7 @@ bool Staff::UpdateFixingFixStationEnd(bool firstRun) ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2357,7 +2357,7 @@ bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride& ride) ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2385,7 +2385,7 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2475,7 +2475,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& r ActionFrame = 0; ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (!IsActionWalking()) diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 68c1ea1269..66fb34bfd0 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1787,8 +1787,8 @@ namespace OpenRCT2 cs.ReadWrite(entity.CurrentTrain); cs.ReadWrite(entity.TimeToSitdown); cs.ReadWrite(entity.SpecialSprite); - cs.ReadWrite(entity.ActionSpriteType); - cs.ReadWrite(entity.NextActionSpriteType); + cs.ReadWrite(entity.AnimationType); + cs.ReadWrite(entity.NextAnimationType); cs.ReadWrite(entity.ActionSpriteImageOffset); cs.ReadWrite(entity.Action); cs.ReadWrite(entity.ActionFrame); diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 6ad1917aa6..e74e852943 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -600,11 +600,11 @@ namespace OpenRCT2::RCT1 }; }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower - uint8_t SpecialSprite; // 0x6D - uint8_t ActionSpriteType; // 0x6E - // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which reads + uint8_t SpecialSprite; // 0x6D + uint8_t AnimationType; // 0x6E + // Seems to be used like a local variable, as it's always set before calling SwitchNextAnimationType, which reads // this again - uint8_t NextActionSpriteType; // 0x6F + uint8_t NextAnimationType; // 0x6F uint8_t ActionSpriteImageOffset; // 0x70 uint8_t Action; // 0x71 uint8_t ActionFrame; // 0x72 diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 5f848ded2a..3326cb91bf 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1301,13 +1301,13 @@ namespace OpenRCT2::RCT1 dst->SpriteType = RCT1::GetPeepSpriteType(src->SpriteType); dst->Action = static_cast(src->Action); dst->SpecialSprite = src->SpecialSprite; - dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); + dst->NextAnimationType = static_cast(src->NextAnimationType); dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; dst->WalkingFrameNum = src->NoActionFrameNum; - dst->ActionSpriteType = static_cast(src->ActionSpriteType); + dst->AnimationType = static_cast(src->AnimationType); dst->ActionFrame = src->ActionFrame; - const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->ActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->AnimationType); dst->SpriteData.Width = spriteBounds->sprite_width; dst->SpriteData.HeightMin = spriteBounds->sprite_height_negative; dst->SpriteData.HeightMax = spriteBounds->sprite_height_positive; diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index 9660bb0ef3..88f56e3e21 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -593,8 +593,8 @@ namespace OpenRCT2::RCT2 }; }; uint8_t SpecialSprite; // 0x6D - uint8_t ActionSpriteType; // 0x6E - uint8_t NextActionSpriteType; // 0x6F + uint8_t AnimationType; // 0x6E + uint8_t NextAnimationType; // 0x6F uint8_t ActionSpriteImageOffset; // 0x70 uint8_t Action; // 0x71 uint8_t ActionFrame; // 0x72 diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 81b1b29738..ca32d8cf91 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1629,8 +1629,8 @@ namespace OpenRCT2::RCT2 dst->CurrentTrain = src->CurrentTrain; dst->TimeToSitdown = src->TimeToSitdown; dst->SpecialSprite = src->SpecialSprite; - dst->ActionSpriteType = static_cast(src->ActionSpriteType); - dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); + dst->AnimationType = static_cast(src->AnimationType); + dst->NextAnimationType = static_cast(src->NextAnimationType); dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; dst->Action = static_cast(src->Action); dst->ActionFrame = src->ActionFrame; diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 70a2b8805d..8322368da5 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -917,11 +917,11 @@ namespace OpenRCT2::Scripting return nullptr; } - std::string_view action = availableGuestAnimations[peep->ActionSpriteType]; + std::string_view action = availableGuestAnimations[peep->AnimationType]; // Special consideration for sitting peeps // TODO: something funky going on in the state machine - if (peep->ActionSpriteType == PeepAnimationType::None && peep->State == PeepState::Sitting) + if (peep->AnimationType == PeepAnimationType::None && peep->State == PeepState::Sitting) action = availableGuestAnimations[PeepAnimationType::SittingIdle]; return std::string(action); @@ -938,7 +938,7 @@ namespace OpenRCT2::Scripting } auto* peep = GetGuest(); - peep->ActionSpriteType = peep->NextActionSpriteType = *newType; + peep->AnimationType = peep->NextAnimationType = *newType; auto offset = 0; if (peep->IsActionWalking()) @@ -946,7 +946,7 @@ namespace OpenRCT2::Scripting else peep->ActionFrame = offset; - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -971,7 +971,7 @@ namespace OpenRCT2::Scripting auto* peep = GetGuest(); - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; @@ -992,7 +992,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); return static_cast(animationGroup.frame_offsets.size()); } diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 8d294e3a8b..9103edf56f 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -136,7 +136,7 @@ namespace OpenRCT2::Scripting // Reset state to walking to prevent invalid actions from carrying over peep->Action = PeepActionType::Walking; - peep->ActionSpriteType = peep->NextActionSpriteType = PeepAnimationType::None; + peep->AnimationType = peep->NextAnimationType = PeepAnimationType::None; } } @@ -364,7 +364,7 @@ namespace OpenRCT2::Scripting } auto& animationGroups = animationsByStaffType(peep->AssignedStaffType); - std::string_view action = animationGroups[peep->ActionSpriteType]; + std::string_view action = animationGroups[peep->AnimationType]; return std::string(action); } @@ -380,7 +380,7 @@ namespace OpenRCT2::Scripting throw DukException() << "Invalid animation for this staff member (" << groupKey << ")"; } - peep->ActionSpriteType = peep->NextActionSpriteType = *newType; + peep->AnimationType = peep->NextAnimationType = *newType; auto offset = 0; if (peep->IsActionWalking()) @@ -388,7 +388,7 @@ namespace OpenRCT2::Scripting else peep->ActionFrame = offset; - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -413,7 +413,7 @@ namespace OpenRCT2::Scripting auto* peep = GetStaff(); - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; @@ -434,7 +434,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); return static_cast(animationGroup.frame_offsets.size()); } diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index f9c1901708..1c40cc6328 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -159,7 +159,7 @@ void FootpathInterruptPeeps(const CoordsXYZ& footpathPos) auto destination = location.ToTileCentre(); peep->SetState(PeepState::Walking); peep->SetDestination(destination, 5); - peep->UpdateCurrentActionSpriteType(); + peep->UpdateCurrentAnimationType(); } } } diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index aa535e042f..14b01c643b 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -212,7 +212,7 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) peep->Action = PeepActionType::CheckTime; peep->ActionFrame = 0; peep->ActionSpriteImageOffset = 0; - peep->UpdateCurrentActionSpriteType(); + peep->UpdateCurrentAnimationType(); peep->Invalidate(); break; } From ee7bb61bb0a87d55d83dde6beae8e9e2325caf3b Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:10:04 +0200 Subject: [PATCH 04/12] Rename WalkingFrameNum to WalkingAnimationFrameNum --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/StaffHireNewAction.cpp | 2 +- src/openrct2/entity/Guest.cpp | 4 ++-- src/openrct2/entity/Peep.cpp | 10 +++++----- src/openrct2/entity/Peep.h | 2 +- src/openrct2/entity/Staff.cpp | 2 +- src/openrct2/park/ParkFile.cpp | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- src/openrct2/scripting/bindings/entity/ScGuest.cpp | 6 +++--- src/openrct2/scripting/bindings/entity/ScStaff.cpp | 6 +++--- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index cff6e0a1fc..43395e98ce 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -302,7 +302,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, PathfindHistory[i].z); COMPARE_FIELD(Peep, PathfindHistory[i].direction); } - COMPARE_FIELD(Peep, WalkingFrameNum); + COMPARE_FIELD(Peep, WalkingAnimationFrameNum); COMPARE_FIELD(Peep, PeepFlags); } diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 8892840f4d..c53e021486 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -133,7 +133,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->Action = PeepActionType::Walking; newPeep->SpecialSprite = 0; newPeep->ActionSpriteImageOffset = 0; - newPeep->WalkingFrameNum = 0; + newPeep->WalkingAnimationFrameNum = 0; newPeep->AnimationType = PeepAnimationType::None; newPeep->PathCheckOptimisation = 0; newPeep->PeepFlags = 0; diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 8cd4a2bbf0..cd87e6935c 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -6739,7 +6739,7 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type) SpriteType = new_sprite_type; ActionSpriteImageOffset = 0; - WalkingFrameNum = 0; + WalkingAnimationFrameNum = 0; if (IsActionInterruptable()) Action = PeepActionType::Walking; @@ -7125,7 +7125,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->Action = PeepActionType::Walking; peep->SpecialSprite = 0; peep->ActionSpriteImageOffset = 0; - peep->WalkingFrameNum = 0; + peep->WalkingAnimationFrameNum = 0; peep->AnimationType = PeepAnimationType::None; peep->PeepFlags = 0; peep->FavouriteRide = RideId::GetNull(); diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 6c7cef1437..7b85e48d87 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -509,13 +509,13 @@ std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, void Peep::UpdateWalkingAnimation() { - WalkingFrameNum++; + WalkingAnimationFrameNum++; const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType); - if (WalkingFrameNum >= peepAnimation.frame_offsets.size()) + if (WalkingAnimationFrameNum >= peepAnimation.frame_offsets.size()) { - WalkingFrameNum = 0; + WalkingAnimationFrameNum = 0; } - ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingFrameNum]; + ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingAnimationFrameNum]; } void Peep::ThrowUp() @@ -2819,7 +2819,7 @@ void Peep::Serialise(DataSerialiser& stream) stream << PathCheckOptimisation; stream << PathfindGoal; stream << PathfindHistory; - stream << WalkingFrameNum; + stream << WalkingAnimationFrameNum; stream << PeepFlags; } diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index c891624da3..9c437f14ae 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -370,7 +370,7 @@ struct Peep : EntityBase uint8_t PathCheckOptimisation; // see peep.checkForPath TileCoordsXYZD PathfindGoal; std::array PathfindHistory; - uint8_t WalkingFrameNum; + uint8_t WalkingAnimationFrameNum; uint32_t PeepFlags; public: // Peep diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index f62372805d..438440551a 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -1700,7 +1700,7 @@ void Staff::Tick128UpdateStaff() SpriteType = newSpriteType; ActionSpriteImageOffset = 0; - WalkingFrameNum = 0; + WalkingAnimationFrameNum = 0; if (Action < PeepActionType::Idle) Action = PeepActionType::Walking; diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 66fb34bfd0..0cbeff32df 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1919,7 +1919,7 @@ namespace OpenRCT2 cs.ReadWrite(entity.PathfindHistory[i].z); cs.ReadWrite(entity.PathfindHistory[i].direction); } - cs.ReadWrite(entity.WalkingFrameNum); + cs.ReadWrite(entity.WalkingAnimationFrameNum); if (version <= 1) { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 3326cb91bf..498f286949 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1303,7 +1303,7 @@ namespace OpenRCT2::RCT1 dst->SpecialSprite = src->SpecialSprite; dst->NextAnimationType = static_cast(src->NextAnimationType); dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; - dst->WalkingFrameNum = src->NoActionFrameNum; + dst->WalkingAnimationFrameNum = src->NoActionFrameNum; dst->AnimationType = static_cast(src->AnimationType); dst->ActionFrame = src->ActionFrame; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index ca32d8cf91..f12a98f708 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1663,7 +1663,7 @@ namespace OpenRCT2::RCT2 src->PathfindHistory[i].direction }; } } - dst->WalkingFrameNum = src->NoActionFrameNum; + dst->WalkingAnimationFrameNum = src->NoActionFrameNum; } constexpr EntityType GetEntityTypeFromRCT2Sprite(const RCT12EntityBase* src) diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 8322368da5..df80d4c859 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -942,7 +942,7 @@ namespace OpenRCT2::Scripting auto offset = 0; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else peep->ActionFrame = offset; @@ -960,7 +960,7 @@ namespace OpenRCT2::Scripting } if (peep->IsActionWalking()) - return peep->WalkingFrameNum; + return peep->WalkingAnimationFrameNum; else return peep->ActionFrame; } @@ -976,7 +976,7 @@ namespace OpenRCT2::Scripting offset %= length; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else peep->ActionFrame = offset; diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 9103edf56f..d18b1c923f 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -384,7 +384,7 @@ namespace OpenRCT2::Scripting auto offset = 0; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else peep->ActionFrame = offset; @@ -402,7 +402,7 @@ namespace OpenRCT2::Scripting } if (peep->IsActionWalking()) - return peep->WalkingFrameNum; + return peep->WalkingAnimationFrameNum; else return peep->ActionFrame; } @@ -418,7 +418,7 @@ namespace OpenRCT2::Scripting offset %= length; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else peep->ActionFrame = offset; From 24b36915efde627457d227668ddae06d08fa052a Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:12:04 +0200 Subject: [PATCH 05/12] Rename ActionFrame to AnimationFrameNum --- src/openrct2/GameStateSnapshots.cpp | 2 +- .../actions/StaffSetCostumeAction.cpp | 2 +- src/openrct2/entity/Guest.cpp | 40 +++++++++---------- src/openrct2/entity/Peep.cpp | 14 +++---- src/openrct2/entity/Peep.h | 2 +- src/openrct2/entity/Staff.cpp | 35 ++++++++-------- src/openrct2/park/ParkFile.cpp | 2 +- src/openrct2/rct1/RCT1.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/RCT2.h | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- .../scripting/bindings/entity/ScGuest.cpp | 6 +-- .../scripting/bindings/entity/ScStaff.cpp | 6 +-- src/openrct2/world/MapAnimation.cpp | 2 +- 14 files changed, 60 insertions(+), 59 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 43395e98ce..83a6df4d6d 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -285,7 +285,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, NextAnimationType); COMPARE_FIELD(Peep, ActionSpriteImageOffset); COMPARE_FIELD(Peep, Action); - COMPARE_FIELD(Peep, ActionFrame); + COMPARE_FIELD(Peep, AnimationFrameNum); COMPARE_FIELD(Peep, StepProgress); COMPARE_FIELD(Peep, MazeLastEdge); COMPARE_FIELD(Peep, InteractionRideIndex); diff --git a/src/openrct2/actions/StaffSetCostumeAction.cpp b/src/openrct2/actions/StaffSetCostumeAction.cpp index ae3e80e4bb..1856bdd5d9 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.cpp +++ b/src/openrct2/actions/StaffSetCostumeAction.cpp @@ -104,7 +104,7 @@ GameActions::Result StaffSetCostumeAction::Execute() const { staff->PeepFlags |= PEEP_FLAGS_SLOW_WALK; } - staff->ActionFrame = 0; + staff->AnimationFrameNum = 0; staff->UpdateCurrentAnimationType(); staff->Invalidate(); diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index cd87e6935c..bf5a459ad1 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -512,7 +512,7 @@ void Guest::GivePassingPeepsPizza(Guest* passingPeep) if (passingPeep->IsActionInterruptable()) { passingPeep->Action = PeepActionType::Wave2; - passingPeep->ActionFrame = 0; + passingPeep->AnimationFrameNum = 0; passingPeep->ActionSpriteImageOffset = 0; passingPeep->UpdateCurrentAnimationType(); } @@ -527,7 +527,7 @@ void Guest::MakePassingPeepsSick(Guest* passingPeep) if (passingPeep->IsActionInterruptable()) { passingPeep->Action = PeepActionType::ThrowUp; - passingPeep->ActionFrame = 0; + passingPeep->AnimationFrameNum = 0; passingPeep->ActionSpriteImageOffset = 0; passingPeep->UpdateCurrentAnimationType(); } @@ -575,7 +575,7 @@ void Guest::UpdateEasterEggInteractions() if (IsActionInterruptable()) { Action = PeepActionType::Joy; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); } @@ -780,7 +780,7 @@ void Guest::UpdateMotivesIdle() if (IsActionInterruptable()) { Action = PeepActionType::ThrowUp; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); } @@ -1322,7 +1322,7 @@ void Guest::UpdateSitting() return; } Action = PeepActionType::SittingEatFood; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); return; @@ -1350,7 +1350,7 @@ void Guest::UpdateSitting() { Action = PeepActionType::SittingCheckWatch; } - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); return; @@ -2398,7 +2398,7 @@ void Guest::ReadMap() if (IsActionInterruptable() && !IsOnLevelCrossing()) { Action = PeepActionType::ReadMap; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); } @@ -3391,7 +3391,7 @@ void Guest::UpdateBuying() else { Action = PeepActionType::WithdrawMoney; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -4911,7 +4911,7 @@ void Guest::UpdateRideMazePathfinding() if (Energy > 80 && !(PeepFlags & PEEP_FLAGS_SLOW_WALK) && !ClimateIsRaining() && (ScenarioRand() & 0xFFFF) <= 2427) { Action = PeepActionType::Jump; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); } @@ -5311,7 +5311,7 @@ void Guest::UpdateWalking() if (PeepFlags & PEEP_FLAGS_WAVING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::Wave2; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -5320,7 +5320,7 @@ void Guest::UpdateWalking() if (PeepFlags & PEEP_FLAGS_PHOTO && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::TakePhoto; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -5329,7 +5329,7 @@ void Guest::UpdateWalking() if (PeepFlags & PEEP_FLAGS_PAINTING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::DrawPicture; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -5561,7 +5561,7 @@ void Guest::UpdateWaitingAtCrossing() if ((ScenarioRand() & 0xFFFF) <= 1310) { Action = PeepActionType::EatFood; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; } @@ -5573,7 +5573,7 @@ void Guest::UpdateWaitingAtCrossing() if ((ScenarioRand() & 0xFFFF) <= 64) { Action = PeepActionType::Wave2; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; } @@ -5638,7 +5638,7 @@ void Guest::UpdateQueuing() { // Eat Food/Look at watch Action = PeepActionType::EatFood; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); } @@ -5678,7 +5678,7 @@ void Guest::UpdateQueuing() case PeepSpriteType::Sandwich: // Eat food Action = PeepActionType::EatFood; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); break; @@ -5815,7 +5815,7 @@ void Guest::UpdateWatching() if ((ScenarioRand() & 0xFFFF) <= 1310) { Action = PeepActionType::EatFood; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); return; @@ -5825,7 +5825,7 @@ void Guest::UpdateWatching() if ((ScenarioRand() & 0xFFFF) <= 655) { Action = PeepActionType::TakePhoto; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); return; @@ -5836,7 +5836,7 @@ void Guest::UpdateWatching() if ((ScenarioRand() & 0xFFFF) <= 655) { Action = PeepActionType::Wave; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); return; @@ -6970,7 +6970,7 @@ void Guest::InsertNewThought(PeepThoughtType thoughtType, uint16_t thoughtArgume if (newAction != PeepActionType::Walking && IsActionInterruptable()) { Action = newAction; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); } diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 7b85e48d87..77bfcb8748 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -441,7 +441,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) // Should we throw up, and are we at the frame where sick appears? auto* guest = As(); - if (Action == PeepActionType::ThrowUp && ActionFrame == 15 && guest != nullptr) + if (Action == PeepActionType::ThrowUp && AnimationFrameNum == 15 && guest != nullptr) { ThrowUp(); } @@ -452,15 +452,15 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) bool Peep::UpdateActionAnimation() { const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType); - ActionFrame++; + AnimationFrameNum++; // If last frame of action - if (ActionFrame >= peepAnimation.frame_offsets.size()) + if (AnimationFrameNum >= peepAnimation.frame_offsets.size()) { return false; } - ActionSpriteImageOffset = peepAnimation.frame_offsets[ActionFrame]; + ActionSpriteImageOffset = peepAnimation.frame_offsets[AnimationFrameNum]; return true; } @@ -816,7 +816,7 @@ void Peep::UpdateFalling() } Action = PeepActionType::Drowning; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -1381,7 +1381,7 @@ void PeepApplause() if ((peep->State == PeepState::Walking || peep->State == PeepState::Queuing) && peep->IsActionInterruptable()) { peep->Action = PeepActionType::Clap; - peep->ActionFrame = 0; + peep->AnimationFrameNum = 0; peep->ActionSpriteImageOffset = 0; peep->UpdateCurrentAnimationType(); } @@ -2811,7 +2811,7 @@ void Peep::Serialise(DataSerialiser& stream) stream << NextAnimationType; stream << ActionSpriteImageOffset; stream << Action; - stream << ActionFrame; + stream << AnimationFrameNum; stream << StepProgress; stream << PeepDirection; stream << InteractionRideIndex; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 9c437f14ae..9a3bbcd4b7 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -358,7 +358,7 @@ struct Peep : EntityBase PeepAnimationType NextAnimationType; uint8_t ActionSpriteImageOffset; PeepActionType Action; - uint8_t ActionFrame; + uint8_t AnimationFrameNum; uint8_t StepProgress; union { diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index 438440551a..0eb4c73fbd 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -915,7 +915,7 @@ bool Staff::DoEntertainerPathFinding() if (((ScenarioRand() & 0xFFFF) <= 0x4000) && IsActionInterruptable()) { Action = (ScenarioRand() & 1) ? PeepActionType::Wave2 : PeepActionType::Joy; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -1113,7 +1113,7 @@ void Staff::UpdateWatering() Orientation = (Var37 & 3) << 3; Action = PeepActionType::StaffWatering; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -1177,7 +1177,7 @@ void Staff::UpdateEmptyingBin() Orientation = (Var37 & 3) << 3; Action = PeepActionType::StaffEmptyBin; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -1194,7 +1194,7 @@ void Staff::UpdateEmptyingBin() UpdateAction(); Invalidate(); - if (ActionFrame != 11) + if (AnimationFrameNum != 11) return; TileElement* tile_element = MapGetFirstElementAt(NextLoc); @@ -1248,7 +1248,7 @@ void Staff::UpdateSweeping() if (!CheckForPath()) return; - if (Action == PeepActionType::StaffSweep && ActionFrame == 8) + if (Action == PeepActionType::StaffSweep && AnimationFrameNum == 8) { // Remove sick at this location Litter::RemoveAt(GetLocation()); @@ -1266,7 +1266,7 @@ void Staff::UpdateSweeping() if (Var37 != 2) { Action = PeepActionType::StaffSweep; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); return; @@ -1394,7 +1394,7 @@ void Staff::UpdateAnswering() if (SubState == 0) { Action = PeepActionType::StaffAnswerCall; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -2093,7 +2093,7 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride& ride) Action = (ScenarioRand() & 1) ? PeepActionType::StaffFix2 : PeepActionType::StaffFix; ActionSpriteImageOffset = 0; - ActionFrame = 0; + AnimationFrameNum = 0; UpdateCurrentAnimationType(); } @@ -2106,7 +2106,7 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride& ride) Invalidate(); uint8_t actionFrame = (Action == PeepActionType::StaffFix) ? 0x25 : 0x50; - if (ActionFrame != actionFrame) + if (AnimationFrameNum != actionFrame) { return false; } @@ -2134,7 +2134,7 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) Orientation = PeepDirection << 3; Action = PeepActionType::StaffFix3; ActionSpriteImageOffset = 0; - ActionFrame = 0; + AnimationFrameNum = 0; UpdateCurrentAnimationType(); } @@ -2147,7 +2147,7 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) UpdateAction(); Invalidate(); - if (ActionFrame != 0x65) + if (AnimationFrameNum != 0x65) { return false; } @@ -2239,7 +2239,7 @@ bool Staff::UpdateFixingFixStationEnd(bool firstRun) { Orientation = PeepDirection << 3; Action = PeepActionType::StaffCheckboard; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -2354,7 +2354,7 @@ bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride& ride) Orientation = PeepDirection << 3; Action = PeepActionType::StaffFix; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -2382,7 +2382,7 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) Orientation = PeepDirection << 3; Action = PeepActionType::StaffFixGround; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); @@ -2396,13 +2396,14 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) UpdateAction(); Invalidate(); - if (ActionFrame == 0x28) + if (AnimationFrameNum == 0x28) { ride.mechanic_status = RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES; ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; } - if (ActionFrame == 0x13 || ActionFrame == 0x19 || ActionFrame == 0x1F || ActionFrame == 0x25 || ActionFrame == 0x2B) + if (AnimationFrameNum == 0x13 || AnimationFrameNum == 0x19 || AnimationFrameNum == 0x1F || AnimationFrameNum == 0x25 + || AnimationFrameNum == 0x2B) { OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::MechanicFix, GetLocation()); } @@ -2472,7 +2473,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& r Orientation = PeepDirection << 3; Action = PeepActionType::StaffAnswerCall2; - ActionFrame = 0; + AnimationFrameNum = 0; ActionSpriteImageOffset = 0; UpdateCurrentAnimationType(); diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 0cbeff32df..d8b2027281 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1791,7 +1791,7 @@ namespace OpenRCT2 cs.ReadWrite(entity.NextAnimationType); cs.ReadWrite(entity.ActionSpriteImageOffset); cs.ReadWrite(entity.Action); - cs.ReadWrite(entity.ActionFrame); + cs.ReadWrite(entity.AnimationFrameNum); cs.ReadWrite(entity.StepProgress); if (version <= 1) diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index e74e852943..6eb63e72bc 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -607,7 +607,7 @@ namespace OpenRCT2::RCT1 uint8_t NextAnimationType; // 0x6F uint8_t ActionSpriteImageOffset; // 0x70 uint8_t Action; // 0x71 - uint8_t ActionFrame; // 0x72 + uint8_t AnimationFrameNum; // 0x72 uint8_t StepProgress; union { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 498f286949..1cec049db7 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1305,7 +1305,7 @@ namespace OpenRCT2::RCT1 dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; dst->WalkingAnimationFrameNum = src->NoActionFrameNum; dst->AnimationType = static_cast(src->AnimationType); - dst->ActionFrame = src->ActionFrame; + dst->AnimationFrameNum = src->AnimationFrameNum; const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->AnimationType); dst->SpriteData.Width = spriteBounds->sprite_width; diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index 88f56e3e21..fe03889bcf 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -597,7 +597,7 @@ namespace OpenRCT2::RCT2 uint8_t NextAnimationType; // 0x6F uint8_t ActionSpriteImageOffset; // 0x70 uint8_t Action; // 0x71 - uint8_t ActionFrame; // 0x72 + uint8_t AnimationFrameNum; // 0x72 uint8_t StepProgress; // 0x73 union { diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index f12a98f708..adc562b9cb 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1633,7 +1633,7 @@ namespace OpenRCT2::RCT2 dst->NextAnimationType = static_cast(src->NextAnimationType); dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; dst->Action = static_cast(src->Action); - dst->ActionFrame = src->ActionFrame; + dst->AnimationFrameNum = src->AnimationFrameNum; dst->StepProgress = src->StepProgress; dst->PeepDirection = src->Direction; dst->InteractionRideIndex = RCT12RideIdToOpenRCT2RideId(src->InteractionRideIndex); diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index df80d4c859..6108a0b5b1 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -944,7 +944,7 @@ namespace OpenRCT2::Scripting if (peep->IsActionWalking()) peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; @@ -962,7 +962,7 @@ namespace OpenRCT2::Scripting if (peep->IsActionWalking()) return peep->WalkingAnimationFrameNum; else - return peep->ActionFrame; + return peep->AnimationFrameNum; } void ScGuest::animationOffset_set(uint8_t offset) @@ -978,7 +978,7 @@ namespace OpenRCT2::Scripting if (peep->IsActionWalking()) peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index d18b1c923f..50dcd9488f 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -386,7 +386,7 @@ namespace OpenRCT2::Scripting if (peep->IsActionWalking()) peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; @@ -404,7 +404,7 @@ namespace OpenRCT2::Scripting if (peep->IsActionWalking()) return peep->WalkingAnimationFrameNum; else - return peep->ActionFrame; + return peep->AnimationFrameNum; } void ScStaff::animationOffset_set(uint8_t offset) @@ -420,7 +420,7 @@ namespace OpenRCT2::Scripting if (peep->IsActionWalking()) peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 14b01c643b..020c02e092 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -210,7 +210,7 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) continue; peep->Action = PeepActionType::CheckTime; - peep->ActionFrame = 0; + peep->AnimationFrameNum = 0; peep->ActionSpriteImageOffset = 0; peep->UpdateCurrentAnimationType(); peep->Invalidate(); From b70aaea31e208379e2d2e3e3fd6b369971aabc5b Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:13:49 +0200 Subject: [PATCH 06/12] Rename ActionSpriteImageOffset to AnimationImageIdOffset --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/StaffHireNewAction.cpp | 2 +- src/openrct2/entity/Guest.cpp | 50 +++++++++---------- src/openrct2/entity/Peep.cpp | 30 +++++------ src/openrct2/entity/Peep.h | 2 +- src/openrct2/entity/Staff.cpp | 24 ++++----- src/openrct2/park/ParkFile.cpp | 2 +- src/openrct2/rct1/RCT1.h | 8 +-- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/RCT2.h | 14 +++--- src/openrct2/rct2/S6Importer.cpp | 2 +- .../scripting/bindings/entity/ScGuest.cpp | 4 +- .../scripting/bindings/entity/ScStaff.cpp | 4 +- src/openrct2/world/MapAnimation.cpp | 2 +- 14 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 83a6df4d6d..aa597ec132 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -283,7 +283,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, SpecialSprite); COMPARE_FIELD(Peep, AnimationType); COMPARE_FIELD(Peep, NextAnimationType); - COMPARE_FIELD(Peep, ActionSpriteImageOffset); + COMPARE_FIELD(Peep, AnimationImageIdOffset); COMPARE_FIELD(Peep, Action); COMPARE_FIELD(Peep, AnimationFrameNum); COMPARE_FIELD(Peep, StepProgress); diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index c53e021486..e6352f9260 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -132,7 +132,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->WindowInvalidateFlags = 0; newPeep->Action = PeepActionType::Walking; newPeep->SpecialSprite = 0; - newPeep->ActionSpriteImageOffset = 0; + newPeep->AnimationImageIdOffset = 0; newPeep->WalkingAnimationFrameNum = 0; newPeep->AnimationType = PeepAnimationType::None; newPeep->PathCheckOptimisation = 0; diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index bf5a459ad1..dba57fd5f9 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -513,7 +513,7 @@ void Guest::GivePassingPeepsPizza(Guest* passingPeep) { passingPeep->Action = PeepActionType::Wave2; passingPeep->AnimationFrameNum = 0; - passingPeep->ActionSpriteImageOffset = 0; + passingPeep->AnimationImageIdOffset = 0; passingPeep->UpdateCurrentAnimationType(); } } @@ -528,7 +528,7 @@ void Guest::MakePassingPeepsSick(Guest* passingPeep) { passingPeep->Action = PeepActionType::ThrowUp; passingPeep->AnimationFrameNum = 0; - passingPeep->ActionSpriteImageOffset = 0; + passingPeep->AnimationImageIdOffset = 0; passingPeep->UpdateCurrentAnimationType(); } } @@ -576,7 +576,7 @@ void Guest::UpdateEasterEggInteractions() { Action = PeepActionType::Joy; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } } @@ -781,7 +781,7 @@ void Guest::UpdateMotivesIdle() { Action = PeepActionType::ThrowUp; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } } @@ -1323,7 +1323,7 @@ void Guest::UpdateSitting() } Action = PeepActionType::SittingEatFood; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); return; } @@ -1351,7 +1351,7 @@ void Guest::UpdateSitting() Action = PeepActionType::SittingCheckWatch; } AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); return; } @@ -2399,7 +2399,7 @@ void Guest::ReadMap() { Action = PeepActionType::ReadMap; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } } @@ -3392,7 +3392,7 @@ void Guest::UpdateBuying() { Action = PeepActionType::WithdrawMoney; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); @@ -4138,11 +4138,11 @@ void Guest::UpdateRideLeaveVehicle() return; } - ActionSpriteImageOffset++; - if (ActionSpriteImageOffset & 3) + AnimationImageIdOffset++; + if (AnimationImageIdOffset & 3) return; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; vehicle->num_peeps--; vehicle->ApplyMass(-Mass); @@ -4912,7 +4912,7 @@ void Guest::UpdateRideMazePathfinding() { Action = PeepActionType::Jump; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } } @@ -5312,7 +5312,7 @@ void Guest::UpdateWalking() { Action = PeepActionType::Wave2; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -5321,7 +5321,7 @@ void Guest::UpdateWalking() { Action = PeepActionType::TakePhoto; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -5330,7 +5330,7 @@ void Guest::UpdateWalking() { Action = PeepActionType::DrawPicture; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -5562,7 +5562,7 @@ void Guest::UpdateWaitingAtCrossing() { Action = PeepActionType::EatFood; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; } UpdateCurrentAnimationType(); @@ -5574,7 +5574,7 @@ void Guest::UpdateWaitingAtCrossing() { Action = PeepActionType::Wave2; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; } UpdateCurrentAnimationType(); @@ -5639,7 +5639,7 @@ void Guest::UpdateQueuing() // Eat Food/Look at watch Action = PeepActionType::EatFood; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } if (TimeInQueue >= 3500 && (0xFFFF & ScenarioRand()) <= 93) @@ -5679,7 +5679,7 @@ void Guest::UpdateQueuing() // Eat food Action = PeepActionType::EatFood; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); break; default: @@ -5816,7 +5816,7 @@ void Guest::UpdateWatching() { Action = PeepActionType::EatFood; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); return; } @@ -5826,7 +5826,7 @@ void Guest::UpdateWatching() { Action = PeepActionType::TakePhoto; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); return; } @@ -5837,7 +5837,7 @@ void Guest::UpdateWatching() { Action = PeepActionType::Wave; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); return; } @@ -6738,7 +6738,7 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type) return; SpriteType = new_sprite_type; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; WalkingAnimationFrameNum = 0; if (IsActionInterruptable()) @@ -6971,7 +6971,7 @@ void Guest::InsertNewThought(PeepThoughtType thoughtType, uint16_t thoughtArgume { Action = newAction; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -7124,7 +7124,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->State = PeepState::Falling; peep->Action = PeepActionType::Walking; peep->SpecialSprite = 0; - peep->ActionSpriteImageOffset = 0; + peep->AnimationImageIdOffset = 0; peep->WalkingAnimationFrameNum = 0; peep->AnimationType = PeepAnimationType::None; peep->PeepFlags = 0; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 77bfcb8748..81429285a6 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -70,7 +70,7 @@ using namespace OpenRCT2; using namespace OpenRCT2::Audio; -static uint8_t _backupActionSpriteImageOffset; +static uint8_t _backupAnimationImageIdOffset; static TileElement* _peepRideEntranceExitElement; static std::shared_ptr _crowdSoundChannel = nullptr; @@ -374,7 +374,7 @@ void Peep::SwitchToSpecialSprite(uint8_t special_sprite_id) if (IsActionInterruptable()) { - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; } UpdateCurrentAnimationType(); } @@ -411,7 +411,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) { PROFILED_FUNCTION(); - _backupActionSpriteImageOffset = ActionSpriteImageOffset; + _backupAnimationImageIdOffset = AnimationImageIdOffset; if (Action == PeepActionType::Idle) { Action = PeepActionType::Walking; @@ -433,7 +433,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) if (!UpdateActionAnimation()) { - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; Action = PeepActionType::Walking; UpdateCurrentAnimationType(); return { { x, y } }; @@ -460,7 +460,7 @@ bool Peep::UpdateActionAnimation() return false; } - ActionSpriteImageOffset = peepAnimation.frame_offsets[AnimationFrameNum]; + AnimationImageIdOffset = peepAnimation.frame_offsets[AnimationFrameNum]; return true; } @@ -515,7 +515,7 @@ void Peep::UpdateWalkingAnimation() { WalkingAnimationFrameNum = 0; } - ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingAnimationFrameNum]; + AnimationImageIdOffset = peepAnimation.frame_offsets[WalkingAnimationFrameNum]; } void Peep::ThrowUp() @@ -621,7 +621,7 @@ void Peep::PickupAbort(int32_t old_x) SetState(PeepState::Falling); Action = PeepActionType::Walking; SpecialSprite = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; AnimationType = PeepAnimationType::None; PathCheckOptimisation = 0; } @@ -670,7 +670,7 @@ GameActions::Result Peep::Place(const TileCoordsXYZ& location, bool apply) SetState(PeepState::Falling); Action = PeepActionType::Walking; SpecialSprite = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; AnimationType = PeepAnimationType::None; PathCheckOptimisation = 0; EntityTweener::Get().Reset(); @@ -817,7 +817,7 @@ void Peep::UpdateFalling() Action = PeepActionType::Drowning; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); PeepWindowStateUpdate(this); @@ -1382,7 +1382,7 @@ void PeepApplause() { peep->Action = PeepActionType::Clap; peep->AnimationFrameNum = 0; - peep->ActionSpriteImageOffset = 0; + peep->AnimationImageIdOffset = 0; peep->UpdateCurrentAnimationType(); } } @@ -1790,7 +1790,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ { // Guest is in the ride queue. guest->RideSubState = PeepRideSubState::AtQueueFront; - guest->ActionSpriteImageOffset = _backupActionSpriteImageOffset; + guest->AnimationImageIdOffset = _backupAnimationImageIdOffset; return true; } @@ -1820,7 +1820,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ } // Guest has decided to go on the ride. - guest->ActionSpriteImageOffset = _backupActionSpriteImageOffset; + guest->AnimationImageIdOffset = _backupAnimationImageIdOffset; guest->InteractionRideIndex = rideIndex; auto& station = ride->GetStation(stationNum); @@ -2399,7 +2399,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) { if (guest->GuestHeadingToRideId == rideIndex) guest->GuestHeadingToRideId = RideId::GetNull(); - guest->ActionSpriteImageOffset = _backupActionSpriteImageOffset; + guest->AnimationImageIdOffset = _backupAnimationImageIdOffset; guest->SetState(PeepState::Buying); guest->CurrentRide = rideIndex; guest->SubState = 0; @@ -2809,7 +2809,7 @@ void Peep::Serialise(DataSerialiser& stream) stream << SpecialSprite; stream << AnimationType; stream << NextAnimationType; - stream << ActionSpriteImageOffset; + stream << AnimationImageIdOffset; stream << Action; stream << AnimationFrameNum; stream << StepProgress; @@ -2860,7 +2860,7 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const } PeepAnimationType actionSpriteType = AnimationType; - uint8_t imageOffset = ActionSpriteImageOffset; + uint8_t imageOffset = AnimationImageIdOffset; if (Action == PeepActionType::Idle) { diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 9a3bbcd4b7..44cef90904 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -356,7 +356,7 @@ struct Peep : EntityBase // Seems to be used like a local variable, as it's always set before calling SwitchNextAnimationType, which // reads this again PeepAnimationType NextAnimationType; - uint8_t ActionSpriteImageOffset; + uint8_t AnimationImageIdOffset; PeepActionType Action; uint8_t AnimationFrameNum; uint8_t StepProgress; diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index 0eb4c73fbd..a1aa97bf17 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -916,7 +916,7 @@ bool Staff::DoEntertainerPathFinding() { Action = (ScenarioRand() & 1) ? PeepActionType::Wave2 : PeepActionType::Joy; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); EntertainerUpdateNearbyPeeps(); @@ -1114,7 +1114,7 @@ void Staff::UpdateWatering() Orientation = (Var37 & 3) << 3; Action = PeepActionType::StaffWatering; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); SubState = 1; @@ -1178,7 +1178,7 @@ void Staff::UpdateEmptyingBin() Orientation = (Var37 & 3) << 3; Action = PeepActionType::StaffEmptyBin; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); SubState = 1; @@ -1267,7 +1267,7 @@ void Staff::UpdateSweeping() { Action = PeepActionType::StaffSweep; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); return; } @@ -1395,7 +1395,7 @@ void Staff::UpdateAnswering() { Action = PeepActionType::StaffAnswerCall; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); @@ -1699,7 +1699,7 @@ void Staff::Tick128UpdateStaff() return; SpriteType = newSpriteType; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; WalkingAnimationFrameNum = 0; if (Action < PeepActionType::Idle) Action = PeepActionType::Walking; @@ -2092,7 +2092,7 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride& ride) Orientation = PeepDirection << 3; Action = (ScenarioRand() & 1) ? PeepActionType::StaffFix2 : PeepActionType::StaffFix; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; AnimationFrameNum = 0; UpdateCurrentAnimationType(); } @@ -2133,7 +2133,7 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) { Orientation = PeepDirection << 3; Action = PeepActionType::StaffFix3; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; AnimationFrameNum = 0; UpdateCurrentAnimationType(); @@ -2240,7 +2240,7 @@ bool Staff::UpdateFixingFixStationEnd(bool firstRun) Orientation = PeepDirection << 3; Action = PeepActionType::StaffCheckboard; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -2355,7 +2355,7 @@ bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride& ride) Action = PeepActionType::StaffFix; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -2383,7 +2383,7 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) Action = PeepActionType::StaffFixGround; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } @@ -2474,7 +2474,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& r Orientation = PeepDirection << 3; Action = PeepActionType::StaffAnswerCall2; AnimationFrameNum = 0; - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; UpdateCurrentAnimationType(); } diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index d8b2027281..b4e770fd89 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1789,7 +1789,7 @@ namespace OpenRCT2 cs.ReadWrite(entity.SpecialSprite); cs.ReadWrite(entity.AnimationType); cs.ReadWrite(entity.NextAnimationType); - cs.ReadWrite(entity.ActionSpriteImageOffset); + cs.ReadWrite(entity.AnimationImageIdOffset); cs.ReadWrite(entity.Action); cs.ReadWrite(entity.AnimationFrameNum); cs.ReadWrite(entity.StepProgress); diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 6eb63e72bc..f897784225 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -604,10 +604,10 @@ namespace OpenRCT2::RCT1 uint8_t AnimationType; // 0x6E // Seems to be used like a local variable, as it's always set before calling SwitchNextAnimationType, which reads // this again - uint8_t NextAnimationType; // 0x6F - uint8_t ActionSpriteImageOffset; // 0x70 - uint8_t Action; // 0x71 - uint8_t AnimationFrameNum; // 0x72 + uint8_t NextAnimationType; // 0x6F + uint8_t AnimationImageIdOffset; // 0x70 + uint8_t Action; // 0x71 + uint8_t AnimationFrameNum; // 0x72 uint8_t StepProgress; union { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 1cec049db7..d10ea4e38e 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1302,7 +1302,7 @@ namespace OpenRCT2::RCT1 dst->Action = static_cast(src->Action); dst->SpecialSprite = src->SpecialSprite; dst->NextAnimationType = static_cast(src->NextAnimationType); - dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; + dst->AnimationImageIdOffset = src->AnimationImageIdOffset; dst->WalkingAnimationFrameNum = src->NoActionFrameNum; dst->AnimationType = static_cast(src->AnimationType); dst->AnimationFrameNum = src->AnimationFrameNum; diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index fe03889bcf..a0423d6cee 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -592,13 +592,13 @@ namespace OpenRCT2::RCT2 uint8_t StandingFlags; // 0x6C }; }; - uint8_t SpecialSprite; // 0x6D - uint8_t AnimationType; // 0x6E - uint8_t NextAnimationType; // 0x6F - uint8_t ActionSpriteImageOffset; // 0x70 - uint8_t Action; // 0x71 - uint8_t AnimationFrameNum; // 0x72 - uint8_t StepProgress; // 0x73 + uint8_t SpecialSprite; // 0x6D + uint8_t AnimationType; // 0x6E + uint8_t NextAnimationType; // 0x6F + uint8_t AnimationImageIdOffset; // 0x70 + uint8_t Action; // 0x71 + uint8_t AnimationFrameNum; // 0x72 + uint8_t StepProgress; // 0x73 union { uint16_t MechanicTimeSinceCall; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index adc562b9cb..a5e0f51d65 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1631,7 +1631,7 @@ namespace OpenRCT2::RCT2 dst->SpecialSprite = src->SpecialSprite; dst->AnimationType = static_cast(src->AnimationType); dst->NextAnimationType = static_cast(src->NextAnimationType); - dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; + dst->AnimationImageIdOffset = src->AnimationImageIdOffset; dst->Action = static_cast(src->Action); dst->AnimationFrameNum = src->AnimationFrameNum; dst->StepProgress = src->StepProgress; diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 6108a0b5b1..99b89207be 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -947,7 +947,7 @@ namespace OpenRCT2::Scripting peep->AnimationFrameNum = offset; auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -980,7 +980,7 @@ namespace OpenRCT2::Scripting else peep->AnimationFrameNum = offset; - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 50dcd9488f..3c0e356318 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -389,7 +389,7 @@ namespace OpenRCT2::Scripting peep->AnimationFrameNum = offset; auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -422,7 +422,7 @@ namespace OpenRCT2::Scripting else peep->AnimationFrameNum = offset; - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 020c02e092..72cfa5ece1 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -211,7 +211,7 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) peep->Action = PeepActionType::CheckTime; peep->AnimationFrameNum = 0; - peep->ActionSpriteImageOffset = 0; + peep->AnimationImageIdOffset = 0; peep->UpdateCurrentAnimationType(); peep->Invalidate(); break; From 48a71461bf906df7bf63b9c418ea17c3c51fb4dd Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:18:41 +0200 Subject: [PATCH 07/12] Rename PeepAnimationType::StaffCheckboard to StaffCheckBoard --- src/openrct2/entity/Peep.cpp | 2 +- src/openrct2/entity/Peep.h | 4 ++-- src/openrct2/entity/Staff.cpp | 2 +- src/openrct2/peep/PeepAnimationData.cpp | 4 ++-- src/openrct2/peep/PeepSpriteIds.h | 2 +- src/openrct2/scripting/bindings/entity/ScStaff.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 81429285a6..2623d340bd 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -98,7 +98,7 @@ static PeepAnimationType PeepActionToSpriteTypeMap[] = { PeepAnimationType::Drowning, PeepAnimationType::StaffAnswerCall, PeepAnimationType::StaffAnswerCall2, - PeepAnimationType::StaffCheckboard, + PeepAnimationType::StaffCheckBoard, PeepAnimationType::StaffFix, PeepAnimationType::StaffFix2, PeepAnimationType::StaffFixGround, diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 44cef90904..3cc58435bc 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -129,7 +129,7 @@ enum class PeepActionType : uint8_t Drowning = 11, StaffAnswerCall = 12, StaffAnswerCall2 = 13, - StaffCheckboard = 14, + StaffCheckBoard = 14, StaffFix = 15, StaffFix2 = 16, StaffFixGround = 17, @@ -173,7 +173,7 @@ enum class PeepAnimationType : uint8_t Drowning = 17, StaffAnswerCall = 18, StaffAnswerCall2 = 19, - StaffCheckboard = 20, + StaffCheckBoard = 20, StaffFix = 21, StaffFix2 = 22, StaffFixGround = 23, diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index a1aa97bf17..5c9dc3e885 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -2238,7 +2238,7 @@ bool Staff::UpdateFixingFixStationEnd(bool firstRun) if (!firstRun) { Orientation = PeepDirection << 3; - Action = PeepActionType::StaffCheckboard; + Action = PeepActionType::StaffCheckBoard; AnimationFrameNum = 0; AnimationImageIdOffset = 0; diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index 0657ac9517..8aa0bebe5c 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -108,7 +108,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceMechanicDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffAnswerCall = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffAnswerCall2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceMechanicStaffCheckboard = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; + static constexpr std::array kPeepAnimationSequenceMechanicStaffCheckBoard = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffFix = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffFix2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffFixGround = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; @@ -123,7 +123,7 @@ namespace OpenRCT2 pag[PeepAnimationType::Drowning] = { kMechanicSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceMechanicDrowning }; pag[PeepAnimationType::StaffAnswerCall] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall }; pag[PeepAnimationType::StaffAnswerCall2] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall2 }; - pag[PeepAnimationType::StaffCheckboard] = { kMechanicSpriteStateStaffCheckboardId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffCheckboard }; + pag[PeepAnimationType::StaffCheckBoard] = { kMechanicSpriteStateStaffCheckBoardId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffCheckBoard }; pag[PeepAnimationType::StaffFix] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix }; pag[PeepAnimationType::StaffFix2] = { kMechanicSpriteStateStaffFixId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffFix2 }; pag[PeepAnimationType::StaffFixGround] = { kMechanicSpriteStateStaffFixGroundId, { 19, 16, 16 }, kPeepAnimationSequenceMechanicStaffFixGround }; diff --git a/src/openrct2/peep/PeepSpriteIds.h b/src/openrct2/peep/PeepSpriteIds.h index 0086a52968..c9868bae66 100644 --- a/src/openrct2/peep/PeepSpriteIds.h +++ b/src/openrct2/peep/PeepSpriteIds.h @@ -52,7 +52,7 @@ namespace OpenRCT2 kMechanicSpriteStateUiId = 11469, kMechanicSpriteStateDrowningId = 11481, kMechanicSpriteStateStaffAnswerCallId = 11513, - kMechanicSpriteStateStaffCheckboardId = 11597, + kMechanicSpriteStateStaffCheckBoardId = 11597, kMechanicSpriteStateStaffFixId = 11669, kMechanicSpriteStateStaffFixGroundId = 11801, diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 3c0e356318..e6e7d02c47 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -35,7 +35,7 @@ namespace OpenRCT2::Scripting { "drowning", PeepAnimationType::Drowning }, { "staffAnswerCall", PeepAnimationType::StaffAnswerCall }, { "staffAnswerCall2", PeepAnimationType::StaffAnswerCall2 }, - { "staffCheckBoard", PeepAnimationType::StaffCheckboard }, + { "staffCheckBoard", PeepAnimationType::StaffCheckBoard }, { "staffFix", PeepAnimationType::StaffFix }, { "staffFix2", PeepAnimationType::StaffFix2 }, { "staffFixGround", PeepAnimationType::StaffFixGround }, From 58f33ca32554e287f38e1e882fa6c1c2f7a7cb12 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:21:32 +0200 Subject: [PATCH 08/12] Rename PeepAnimationType::Ui to Hanging --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/entity/Peep.cpp | 2 +- src/openrct2/entity/Peep.h | 2 +- src/openrct2/peep/PeepAnimationData.cpp | 64 +++++++++---------- src/openrct2/peep/PeepSpriteIds.h | 30 ++++----- .../scripting/bindings/entity/ScGuest.cpp | 4 +- .../scripting/bindings/entity/ScStaff.cpp | 10 +-- 8 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 9ce23a7c28..876a9daa62 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -957,7 +957,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(peep->SpriteType, PeepAnimationType::Ui).base_image; + auto baseImageId = GetPeepAnimation(peep->SpriteType, PeepAnimationType::Hanging).base_image; baseImageId += picked_peep_frame >> 2; gPickupPeepImage = ImageId(baseImageId, peep->TshirtColour, peep->TrousersColour); } diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index cd52407ad1..73a2491baf 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -681,7 +681,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(staff->SpriteType, PeepAnimationType::Ui).base_image; + auto baseImageId = GetPeepAnimation(staff->SpriteType, PeepAnimationType::Hanging).base_image; baseImageId += picked_peep_frame >> 2; gPickupPeepImage = ImageId(baseImageId, staff->TshirtColour, staff->TrousersColour); } diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 2623d340bd..b99d4cb23b 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -2873,7 +2873,7 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const uint32_t baseImageId = GetPeepAnimation(SpriteType, actionSpriteType).base_image; // Offset frame onto the base image, using rotation except for the 'picked up' state - if (actionSpriteType != PeepAnimationType::Ui) + if (actionSpriteType != PeepAnimationType::Hanging) baseImageId += (imageDirection >> 3) + imageOffset * 4; else baseImageId += imageOffset; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 3cc58435bc..5358708077 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -164,7 +164,7 @@ enum class PeepAnimationType : uint8_t SittingEatFood = 8, SittingLookAroundLeft = 9, SittingLookAroundRight = 10, - Ui = 11, + Hanging = 11, StaffMower = 12, Wow = 13, ThrowUp = 14, diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index 8aa0bebe5c..a57f0cce94 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -29,7 +29,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceNormalSittingEatFood = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; static constexpr std::array kPeepAnimationSequenceNormalSittingLookAroundLeft = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; static constexpr std::array kPeepAnimationSequenceNormalSittingLookAroundRight = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; - static constexpr std::array kPeepAnimationSequenceNormalUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceNormalHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceNormalWow = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceNormalThrowUp = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; static constexpr std::array kPeepAnimationSequenceNormalJump = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; @@ -59,7 +59,7 @@ namespace OpenRCT2 pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteNormalStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingEatFood }; pag[PeepAnimationType::SittingLookAroundLeft] = { kPeepSpriteNormalStateSittingLookAroundLeftId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingLookAroundLeft }; pag[PeepAnimationType::SittingLookAroundRight] = { kPeepSpriteNormalStateSittingLookAroundRightId, { 9, 16, 6 }, kPeepAnimationSequenceNormalSittingLookAroundRight }; - pag[PeepAnimationType::Ui] = { kPeepSpriteNormalStateUiId, { 8, 16, 5 }, kPeepAnimationSequenceNormalUi }; + pag[PeepAnimationType::Hanging] = { kPeepSpriteNormalStateHangingId, { 8, 16, 5 }, kPeepAnimationSequenceNormalHanging }; pag[PeepAnimationType::Wow] = { kPeepSpriteNormalStateWowId, { 12, 22, 5 }, kPeepAnimationSequenceNormalWow }; pag[PeepAnimationType::ThrowUp] = { kPeepSpriteNormalStateThrowUpId, { 9, 16, 7 }, kPeepAnimationSequenceNormalThrowUp }; pag[PeepAnimationType::Jump] = { kPeepSpriteNormalStateJumpId, { 10, 22, 5 }, kPeepAnimationSequenceNormalJump }; @@ -80,7 +80,7 @@ namespace OpenRCT2 // Define animation sequences for Handyman sprites static constexpr std::array kPeepAnimationSequenceHandymanNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceHandymanWatchRide = { 0 }; - static constexpr std::array kPeepAnimationSequenceHandymanUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceHandymanHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceHandymanStaffMower = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceHandymanStaffSweep = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; static constexpr std::array kPeepAnimationSequenceHandymanDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; @@ -92,7 +92,7 @@ namespace OpenRCT2 PeepAnimationGroup pag; pag[PeepAnimationType::None] = { kHandymanSpriteStateNoneId, { 12, 16, 6 }, kPeepAnimationSequenceHandymanNone }; pag[PeepAnimationType::WatchRide] = { kHandymanSpriteStateWatchRideId, { 9, 16, 6 }, kPeepAnimationSequenceHandymanWatchRide }; - pag[PeepAnimationType::Ui] = { kHandymanSpriteStateUiId, { 15, 16, 5 }, kPeepAnimationSequenceHandymanUi }; + pag[PeepAnimationType::Hanging] = { kHandymanSpriteStateHangingId, { 15, 16, 5 }, kPeepAnimationSequenceHandymanHanging }; pag[PeepAnimationType::StaffMower] = { kHandymanSpriteStateStaffMowerId, { 18, 16, 11 }, kPeepAnimationSequenceHandymanStaffMower }; pag[PeepAnimationType::StaffSweep] = { kHandymanSpriteStateStaffSweepId, { 17, 16, 9 }, kPeepAnimationSequenceHandymanStaffSweep }; pag[PeepAnimationType::Drowning] = { kHandymanSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceHandymanDrowning }; @@ -104,7 +104,7 @@ namespace OpenRCT2 // Define animation sequences for Mechanic sprites static constexpr std::array kPeepAnimationSequenceMechanicNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceMechanicWatchRide = { 0 }; - static constexpr std::array kPeepAnimationSequenceMechanicUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceMechanicHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceMechanicDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffAnswerCall = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceMechanicStaffAnswerCall2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; @@ -119,7 +119,7 @@ namespace OpenRCT2 PeepAnimationGroup pag; pag[PeepAnimationType::None] = { kMechanicSpriteStateNoneId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicNone }; pag[PeepAnimationType::WatchRide] = { kMechanicSpriteStateWatchRideId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicWatchRide }; - pag[PeepAnimationType::Ui] = { kMechanicSpriteStateUiId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicUi }; + pag[PeepAnimationType::Hanging] = { kMechanicSpriteStateHangingId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicHanging }; pag[PeepAnimationType::Drowning] = { kMechanicSpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceMechanicDrowning }; pag[PeepAnimationType::StaffAnswerCall] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall }; pag[PeepAnimationType::StaffAnswerCall2] = { kMechanicSpriteStateStaffAnswerCallId, { 13, 22, 7 }, kPeepAnimationSequenceMechanicStaffAnswerCall2 }; @@ -134,7 +134,7 @@ namespace OpenRCT2 // Define animation sequences for Security sprites static constexpr std::array kPeepAnimationSequenceSecurityNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceSecurityWatchRide = { 0 }; - static constexpr std::array kPeepAnimationSequenceSecurityUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceSecurityHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceSecurityDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; // Define animation group for Security sequences @@ -142,7 +142,7 @@ namespace OpenRCT2 PeepAnimationGroup pag; pag[PeepAnimationType::None] = { kSecuritySpriteStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityNone }; pag[PeepAnimationType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityWatchRide }; - pag[PeepAnimationType::Ui] = { kSecuritySpriteStateUiId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityUi }; + pag[PeepAnimationType::Hanging] = { kSecuritySpriteStateHangingId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityHanging }; pag[PeepAnimationType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityDrowning }; return pag; }(); @@ -151,7 +151,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerPandaNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerPandaWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerPandaEatFood = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerPandaUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerPandaHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerPandaDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; static constexpr std::array kPeepAnimationSequenceEntertainerPandaJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; static constexpr std::array kPeepAnimationSequenceEntertainerPandaWave2 = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; @@ -162,7 +162,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpritePandaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerPandaNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpritePandaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPandaWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpritePandaStateUiId, { 19, 30, 8 }, kPeepAnimationSequenceEntertainerPandaUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpritePandaStateHangingId, { 19, 30, 8 }, kPeepAnimationSequenceEntertainerPandaHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpritePandaStateDrowningId, { 13, 15, 6 }, kPeepAnimationSequenceEntertainerPandaDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpritePandaStateJoyId, { 14, 25, 8 }, kPeepAnimationSequenceEntertainerPandaJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaWave2 }; @@ -173,7 +173,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerTigerNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerTigerWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerTigerEatFood = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerTigerUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerTigerHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerTigerDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; static constexpr std::array kPeepAnimationSequenceEntertainerTigerJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25 }; static constexpr std::array kPeepAnimationSequenceEntertainerTigerWave2 = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; @@ -184,7 +184,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteTigerStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerTigerNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteTigerStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerTigerWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteTigerStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerTigerUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteTigerStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerTigerHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteTigerStateDrowningId, { 13, 15, 6 }, kPeepAnimationSequenceEntertainerTigerDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteTigerStateJoyId, { 16, 28, 9 }, kPeepAnimationSequenceEntertainerTigerJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerWave2 }; @@ -195,7 +195,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerElephantNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerElephantWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerElephantEatFood = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerElephantUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerElephantHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerElephantDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7, 8, 9 }; static constexpr std::array kPeepAnimationSequenceEntertainerElephantJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }; static constexpr std::array kPeepAnimationSequenceEntertainerElephantWave2 = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; @@ -206,7 +206,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteElephantStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerElephantNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteElephantStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerElephantWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteElephantStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerElephantUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteElephantStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerElephantHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteElephantStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerElephantDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteElephantStateJoyId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerElephantJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantWave2 }; @@ -217,7 +217,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerRomanNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerRomanWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerRomanEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerRomanUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerRomanHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerRomanDrowning = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; static constexpr std::array kPeepAnimationSequenceEntertainerRomanJoy = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 24, 25, 26, 27, 28, 28, 28, 29, 30, 31, 32, 32, 32, 32, 32, 33, 34, 35, 36, 37, 38 }; static constexpr std::array kPeepAnimationSequenceEntertainerRomanWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; @@ -228,7 +228,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteRomanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerRomanNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteRomanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerRomanWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteRomanStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerRomanUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteRomanStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerRomanHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteRomanStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerRomanDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteRomanStateJoyId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerRomanJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanWave2 }; @@ -239,7 +239,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerGorillaNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerGorillaWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerGorillaEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerGorillaUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerGorillaHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerGorillaDrowning = { 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerGorillaJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerGorillaWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; @@ -250,7 +250,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteGorillaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteGorillaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerGorillaWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteGorillaStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerGorillaUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteGorillaStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerGorillaHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteGorillaStateDrowningId, { 17, 15, 6 }, kPeepAnimationSequenceEntertainerGorillaDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteGorillaStateWaveId, { 18, 25, 9 }, kPeepAnimationSequenceEntertainerGorillaJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaWave2 }; @@ -261,7 +261,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; - static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanDrowning = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7, 8, 9 }; static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; @@ -272,7 +272,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteSnowmanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerSnowmanNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteSnowmanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSnowmanWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteSnowmanStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSnowmanUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteSnowmanStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSnowmanHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteSnowmanStateDrowningId, { 17, 15, 9 }, kPeepAnimationSequenceEntertainerSnowmanDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteSnowmanStateWaveId, { 18, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanWave2 }; @@ -283,7 +283,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerKnightNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerKnightWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerKnightEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; - static constexpr std::array kPeepAnimationSequenceEntertainerKnightUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerKnightHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerKnightDrowning = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; static constexpr std::array kPeepAnimationSequenceEntertainerKnightJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; static constexpr std::array kPeepAnimationSequenceEntertainerKnightWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; @@ -294,7 +294,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteKnightStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerKnightNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteKnightStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerKnightWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteKnightStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerKnightUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteKnightStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerKnightHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteKnightStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerKnightDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightWave2 }; @@ -305,7 +305,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerAstronautNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerAstronautWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerAstronautEatFood = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerAstronautUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerAstronautHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerAstronautDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; static constexpr std::array kPeepAnimationSequenceEntertainerAstronautJoy = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerAstronautWave2 = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; @@ -316,7 +316,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteAstronautStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerAstronautNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteAstronautStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerAstronautWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteAstronautStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerAstronautUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteAstronautStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerAstronautHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteAstronautStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerAstronautDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautWave2 }; @@ -327,7 +327,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerBanditNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerBanditWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerBanditEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; - static constexpr std::array kPeepAnimationSequenceEntertainerBanditUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerBanditHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerBanditDrowning = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; static constexpr std::array kPeepAnimationSequenceEntertainerBanditJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; static constexpr std::array kPeepAnimationSequenceEntertainerBanditWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; @@ -338,7 +338,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteBanditStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerBanditNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteBanditStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerBanditWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteBanditStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerBanditUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteBanditStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerBanditHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteBanditStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerBanditDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditWave2 }; @@ -349,7 +349,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerSheriffNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerSheriffWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerSheriffEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; - static constexpr std::array kPeepAnimationSequenceEntertainerSheriffUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerSheriffHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerSheriffDrowning = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; static constexpr std::array kPeepAnimationSequenceEntertainerSheriffJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerSheriffWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; @@ -360,7 +360,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpriteSheriffStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerSheriffNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteSheriffStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSheriffWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpriteSheriffStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSheriffUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpriteSheriffStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerSheriffHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpriteSheriffStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerSheriffDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffWave2 }; @@ -371,7 +371,7 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerPirateNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceEntertainerPirateWatchRide = { 0 }; static constexpr std::array kPeepAnimationSequenceEntertainerPirateEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; - static constexpr std::array kPeepAnimationSequenceEntertainerPirateUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceEntertainerPirateHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceEntertainerPirateDrowning = { 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; static constexpr std::array kPeepAnimationSequenceEntertainerPirateJoy = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; static constexpr std::array kPeepAnimationSequenceEntertainerPirateWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; @@ -382,7 +382,7 @@ namespace OpenRCT2 pag[PeepAnimationType::None] = { kEntertainerSpritePirateStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerPirateNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpritePirateStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPirateWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateEatFood }; - pag[PeepAnimationType::Ui] = { kEntertainerSpritePirateStateUiId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerPirateUi }; + pag[PeepAnimationType::Hanging] = { kEntertainerSpritePirateStateHangingId, { 23, 30, 8 }, kPeepAnimationSequenceEntertainerPirateHanging }; pag[PeepAnimationType::Drowning] = { kEntertainerSpritePirateStateDrowningId, { 21, 32, 9 }, kPeepAnimationSequenceEntertainerPirateDrowning }; pag[PeepAnimationType::Joy] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateJoy }; pag[PeepAnimationType::Wave2] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateWave2 }; @@ -528,7 +528,7 @@ namespace OpenRCT2 // Define animation sequences for SecurityAlt sprites static constexpr std::array kPeepAnimationSequenceSecurityAltNone = { 0, 1, 2, 3, 4, 5 }; static constexpr std::array kPeepAnimationSequenceSecurityAltWatchRide = { 0 }; - static constexpr std::array kPeepAnimationSequenceSecurityAltUi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + static constexpr std::array kPeepAnimationSequenceSecurityAltHanging = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static constexpr std::array kPeepAnimationSequenceSecurityAltDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; // Define animation group for SecurityAlt sequences @@ -536,7 +536,7 @@ namespace OpenRCT2 PeepAnimationGroup pag; pag[PeepAnimationType::None] = { kSecurityStaffSpriteAltStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityAltNone }; pag[PeepAnimationType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityAltWatchRide }; - pag[PeepAnimationType::Ui] = { kSecuritySpriteStateUiId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityAltUi }; + pag[PeepAnimationType::Hanging] = { kSecuritySpriteStateHangingId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityAltHanging }; pag[PeepAnimationType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityAltDrowning }; return pag; }(); diff --git a/src/openrct2/peep/PeepSpriteIds.h b/src/openrct2/peep/PeepSpriteIds.h index c9868bae66..7eacf53779 100644 --- a/src/openrct2/peep/PeepSpriteIds.h +++ b/src/openrct2/peep/PeepSpriteIds.h @@ -22,7 +22,7 @@ namespace OpenRCT2 kPeepSpriteNormalStateSittingEatFoodId = 6629, kPeepSpriteNormalStateSittingLookAroundLeftId = 6637, kPeepSpriteNormalStateSittingLookAroundRightId = 6645, - kPeepSpriteNormalStateUiId = 6813, + kPeepSpriteNormalStateHangingId = 6813, kPeepSpriteNormalStateWowId = 6825, kPeepSpriteNormalStateThrowUpId = 6845, kPeepSpriteNormalStateJumpId = 6909, @@ -40,7 +40,7 @@ namespace OpenRCT2 kHandymanSpriteStateNoneId = 11261, kHandymanSpriteStateWatchRideId = 11285, - kHandymanSpriteStateUiId = 11289, + kHandymanSpriteStateHangingId = 11289, kHandymanSpriteStateStaffMowerId = 11301, kHandymanSpriteStateStaffSweepId = 11325, kHandymanSpriteStateDrowningId = 11345, @@ -49,7 +49,7 @@ namespace OpenRCT2 kMechanicSpriteStateNoneId = 11441, kMechanicSpriteStateWatchRideId = 11465, - kMechanicSpriteStateUiId = 11469, + kMechanicSpriteStateHangingId = 11469, kMechanicSpriteStateDrowningId = 11481, kMechanicSpriteStateStaffAnswerCallId = 11513, kMechanicSpriteStateStaffCheckBoardId = 11597, @@ -58,77 +58,77 @@ namespace OpenRCT2 kSecuritySpriteStateNoneId = 11881, kSecuritySpriteStateWatchRideId = 11905, - kSecuritySpriteStateUiId = 11909, + kSecuritySpriteStateHangingId = 11909, kSecuritySpriteStateDrowningId = 11921, kEntertainerSpritePandaStateNoneId = 11973, kEntertainerSpritePandaStateWatchRideId = 11997, kEntertainerSpritePandaStateWaveId = 12041, - kEntertainerSpritePandaStateUiId = 12001, + kEntertainerSpritePandaStateHangingId = 12001, kEntertainerSpritePandaStateDrowningId = 12013, kEntertainerSpritePandaStateJoyId = 12065, kEntertainerSpriteTigerStateNoneId = 12129, kEntertainerSpriteTigerStateWatchRideId = 12153, kEntertainerSpriteTigerStateWaveId = 12197, - kEntertainerSpriteTigerStateUiId = 12157, + kEntertainerSpriteTigerStateHangingId = 12157, kEntertainerSpriteTigerStateDrowningId = 12169, kEntertainerSpriteTigerStateJoyId = 12221, kEntertainerSpriteElephantStateNoneId = 12325, kEntertainerSpriteElephantStateWatchRideId = 12349, kEntertainerSpriteElephantStateWaveId = 12365, - kEntertainerSpriteElephantStateUiId = 12353, + kEntertainerSpriteElephantStateHangingId = 12353, kEntertainerSpriteElephantStateDrowningId = 12393, kEntertainerSpriteElephantStateJoyId = 12433, kEntertainerSpriteRomanStateNoneId = 13897, kEntertainerSpriteRomanStateWatchRideId = 13921, kEntertainerSpriteRomanStateWaveId = 13937, - kEntertainerSpriteRomanStateUiId = 13925, + kEntertainerSpriteRomanStateHangingId = 13925, kEntertainerSpriteRomanStateDrowningId = 13969, kEntertainerSpriteRomanStateJoyId = 14029, kEntertainerSpriteGorillaStateNoneId = 12549, kEntertainerSpriteGorillaStateWatchRideId = 12545, kEntertainerSpriteGorillaStateWaveId = 12573, - kEntertainerSpriteGorillaStateUiId = 12665, + kEntertainerSpriteGorillaStateHangingId = 12665, kEntertainerSpriteGorillaStateDrowningId = 12617, kEntertainerSpriteSnowmanStateNoneId = 12681, kEntertainerSpriteSnowmanStateWatchRideId = 12677, kEntertainerSpriteSnowmanStateWaveId = 12705, - kEntertainerSpriteSnowmanStateUiId = 12881, + kEntertainerSpriteSnowmanStateHangingId = 12881, kEntertainerSpriteSnowmanStateDrowningId = 12841, kEntertainerSpriteKnightStateNoneId = 12897, kEntertainerSpriteKnightStateWatchRideId = 12893, kEntertainerSpriteKnightStateWaveId = 12993, - kEntertainerSpriteKnightStateUiId = 12981, + kEntertainerSpriteKnightStateHangingId = 12981, kEntertainerSpriteKnightStateDrowningId = 12921, kEntertainerSpriteAstronautStateNoneId = 13769, kEntertainerSpriteAstronautStateWatchRideId = 13765, kEntertainerSpriteAstronautStateWaveId = 13857, - kEntertainerSpriteAstronautStateUiId = 13845, + kEntertainerSpriteAstronautStateHangingId = 13845, kEntertainerSpriteAstronautStateDrowningId = 13793, kEntertainerSpriteBanditStateNoneId = 13109, kEntertainerSpriteBanditStateWatchRideId = 13105, kEntertainerSpriteBanditStateWaveId = 13209, - kEntertainerSpriteBanditStateUiId = 13197, + kEntertainerSpriteBanditStateHangingId = 13197, kEntertainerSpriteBanditStateDrowningId = 13133, kEntertainerSpriteSheriffStateNoneId = 13613, kEntertainerSpriteSheriffStateWatchRideId = 13609, kEntertainerSpriteSheriffStateWaveId = 13713, - kEntertainerSpriteSheriffStateUiId = 13701, + kEntertainerSpriteSheriffStateHangingId = 13701, kEntertainerSpriteSheriffStateDrowningId = 13637, kEntertainerSpritePirateStateNoneId = 13381, kEntertainerSpritePirateStateWatchRideId = 13377, kEntertainerSpritePirateStateWaveId = 13481, - kEntertainerSpritePirateStateUiId = 13469, + kEntertainerSpritePirateStateHangingId = 13469, kEntertainerSpritePirateStateDrowningId = 13405, kPeepSpriteIceCreamStateNoneId = 7505, diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 99b89207be..ee68f6182e 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -159,7 +159,7 @@ namespace OpenRCT2::Scripting { "sittingEatFood", PeepAnimationType::SittingEatFood }, { "sittingLookAroundLeft", PeepAnimationType::SittingLookAroundLeft }, { "sittingLookAroundRight", PeepAnimationType::SittingLookAroundRight }, - { "hanging", PeepAnimationType::Ui }, + { "hanging", PeepAnimationType::Hanging }, { "wow", PeepAnimationType::Wow }, { "throwUp", PeepAnimationType::ThrowUp }, { "jump", PeepAnimationType::Jump }, @@ -898,7 +898,7 @@ namespace OpenRCT2::Scripting for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; - if (animationType != PeepAnimationType::Ui) + if (animationType != PeepAnimationType::Hanging) imageId += rotation + frameOffset * 4; else imageId += frameOffset; diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index e6e7d02c47..6b823592ec 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -20,7 +20,7 @@ namespace OpenRCT2::Scripting static const DukEnumMap availableHandymanAnimations({ { "walking", PeepAnimationType::None }, { "watchRide", PeepAnimationType::WatchRide }, - { "hanging", PeepAnimationType::Ui }, + { "hanging", PeepAnimationType::Hanging }, { "staffMower", PeepAnimationType::StaffMower }, { "staffSweep", PeepAnimationType::StaffSweep }, { "drowning", PeepAnimationType::Drowning }, @@ -31,7 +31,7 @@ namespace OpenRCT2::Scripting static const DukEnumMap availableMechanicAnimations({ { "walking", PeepAnimationType::None }, { "watchRide", PeepAnimationType::WatchRide }, - { "hanging", PeepAnimationType::Ui }, + { "hanging", PeepAnimationType::Hanging }, { "drowning", PeepAnimationType::Drowning }, { "staffAnswerCall", PeepAnimationType::StaffAnswerCall }, { "staffAnswerCall2", PeepAnimationType::StaffAnswerCall2 }, @@ -45,7 +45,7 @@ namespace OpenRCT2::Scripting static const DukEnumMap availableSecurityAnimations({ { "walking", PeepAnimationType::None }, { "watchRide", PeepAnimationType::WatchRide }, - { "hanging", PeepAnimationType::Ui }, + { "hanging", PeepAnimationType::Hanging }, { "drowning", PeepAnimationType::Drowning }, }); @@ -53,7 +53,7 @@ namespace OpenRCT2::Scripting { "walking", PeepAnimationType::None }, { "watchRide", PeepAnimationType::WatchRide }, { "wave", PeepAnimationType::EatFood }, // NB: this not a typo - { "hanging", PeepAnimationType::Ui }, + { "hanging", PeepAnimationType::Hanging }, { "drowning", PeepAnimationType::Drowning }, { "joy", PeepAnimationType::Joy }, { "wave2", PeepAnimationType::Wave2 }, @@ -344,7 +344,7 @@ namespace OpenRCT2::Scripting for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; - if (animationType != PeepAnimationType::Ui) + if (animationType != PeepAnimationType::Hanging) imageId += rotation + frameOffset * 4; else imageId += frameOffset; From c5e86b331ed2284c636008ef36b67019a931831d Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:42:03 +0200 Subject: [PATCH 09/12] Rename PeepAnimationGroup to PeepAnimations --- src/openrct2/peep/PeepAnimationData.cpp | 288 ++++++++++++------------ src/openrct2/peep/PeepAnimationData.h | 2 +- 2 files changed, 145 insertions(+), 145 deletions(-) diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index a57f0cce94..72ba611d26 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -46,8 +46,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceNormalWithdrawMoney = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; // Define animation group for Normal sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupNormal = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsNormal = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kPeepSpriteNormalStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNormalNone }; pag[PeepAnimationType::CheckTime] = { kPeepSpriteNormalStateCheckTimeId, { 8, 16, 5 }, kPeepAnimationSequenceNormalCheckTime }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteNormalStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNormalWatchRide }; @@ -88,8 +88,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceHandymanStaffEmptyBin = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; // Define animation group for Handyman sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupHandyman = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsHandyman = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kHandymanSpriteStateNoneId, { 12, 16, 6 }, kPeepAnimationSequenceHandymanNone }; pag[PeepAnimationType::WatchRide] = { kHandymanSpriteStateWatchRideId, { 9, 16, 6 }, kPeepAnimationSequenceHandymanWatchRide }; pag[PeepAnimationType::Hanging] = { kHandymanSpriteStateHangingId, { 15, 16, 5 }, kPeepAnimationSequenceHandymanHanging }; @@ -115,8 +115,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceMechanicStaffFix3 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; // Define animation group for Mechanic sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupMechanic = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsMechanic = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kMechanicSpriteStateNoneId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicNone }; pag[PeepAnimationType::WatchRide] = { kMechanicSpriteStateWatchRideId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicWatchRide }; pag[PeepAnimationType::Hanging] = { kMechanicSpriteStateHangingId, { 10, 16, 5 }, kPeepAnimationSequenceMechanicHanging }; @@ -138,8 +138,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSecurityDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; // Define animation group for Security sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSecurity = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsSecurity = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kSecuritySpriteStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityNone }; pag[PeepAnimationType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityWatchRide }; pag[PeepAnimationType::Hanging] = { kSecuritySpriteStateHangingId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityHanging }; @@ -157,8 +157,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerPandaWave2 = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; // Define animation group for EntertainerPanda sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerPanda = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerPanda = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpritePandaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerPandaNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpritePandaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPandaWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpritePandaStateWaveId, { 14, 24, 7 }, kPeepAnimationSequenceEntertainerPandaEatFood }; @@ -179,8 +179,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerTigerWave2 = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; // Define animation group for EntertainerTiger sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerTiger = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerTiger = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteTigerStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerTigerNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteTigerStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerTigerWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteTigerStateWaveId, { 16, 24, 8 }, kPeepAnimationSequenceEntertainerTigerEatFood }; @@ -201,8 +201,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerElephantWave2 = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; // Define animation group for EntertainerElephant sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerElephant = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerElephant = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteElephantStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerElephantNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteElephantStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerElephantWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteElephantStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerElephantEatFood }; @@ -223,8 +223,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerRomanWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; // Define animation group for EntertainerRoman sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerRoman = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerRoman = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteRomanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerRomanNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteRomanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerRomanWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteRomanStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerRomanEatFood }; @@ -245,8 +245,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerGorillaWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; // Define animation group for EntertainerGorilla sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerGorilla = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerGorilla = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteGorillaStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteGorillaStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerGorillaWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteGorillaStateWaveId, { 17, 24, 8 }, kPeepAnimationSequenceEntertainerGorillaEatFood }; @@ -267,8 +267,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerSnowmanWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; // Define animation group for EntertainerSnowman sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerSnowman = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerSnowman = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteSnowmanStateNoneId, { 13, 24, 8 }, kPeepAnimationSequenceEntertainerSnowmanNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteSnowmanStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSnowmanWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteSnowmanStateWaveId, { 17, 28, 9 }, kPeepAnimationSequenceEntertainerSnowmanEatFood }; @@ -289,8 +289,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerKnightWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; // Define animation group for EntertainerKnight sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerKnight = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerKnight = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteKnightStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerKnightNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteKnightStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerKnightWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteKnightStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerKnightEatFood }; @@ -311,8 +311,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerAstronautWave2 = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; // Define animation group for EntertainerAstronaut sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerAstronaut = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerAstronaut = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteAstronautStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerAstronautNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteAstronautStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerAstronautWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteAstronautStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerAstronautEatFood }; @@ -333,8 +333,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerBanditWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; // Define animation group for EntertainerBandit sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerBandit = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerBandit = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteBanditStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerBanditNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteBanditStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerBanditWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteBanditStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerBanditEatFood }; @@ -355,8 +355,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerSheriffWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; // Define animation group for EntertainerSheriff sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerSheriff = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerSheriff = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpriteSheriffStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerSheriffNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpriteSheriffStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerSheriffWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpriteSheriffStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerSheriffEatFood }; @@ -377,8 +377,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceEntertainerPirateWave2 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; // Define animation group for EntertainerPirate sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupEntertainerPirate = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsEntertainerPirate = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kEntertainerSpritePirateStateNoneId, { 16, 32, 8 }, kPeepAnimationSequenceEntertainerPirateNone }; pag[PeepAnimationType::WatchRide] = { kEntertainerSpritePirateStateWatchRideId, { 10, 23, 7 }, kPeepAnimationSequenceEntertainerPirateWatchRide }; pag[PeepAnimationType::EatFood] = { kEntertainerSpritePirateStateWaveId, { 23, 30, 15 }, kPeepAnimationSequenceEntertainerPirateEatFood }; @@ -397,8 +397,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceIceCreamSittingEatFood = { 0, 1, 2, 3, 4, 5 }; // Define animation group for IceCream sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupIceCream = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsIceCream = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteIceCreamStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteIceCreamStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteIceCreamStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceIceCreamEatFood }; @@ -415,8 +415,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceChipsSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Chips sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupChips = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsChips = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteChipsStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceChipsNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteChipsStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChipsWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteChipsStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceChipsEatFood }; @@ -433,8 +433,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceBurgerSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Burger sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupBurger = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsBurger = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteBurgerStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteBurgerStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteBurgerStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceBurgerEatFood }; @@ -451,8 +451,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceDrinkSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Drink sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupDrink = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsDrink = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteDrinkStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteDrinkStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteDrinkStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceDrinkEatFood }; @@ -467,8 +467,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceBalloonSittingIdle = { 0 }; // Define animation group for Balloon sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupBalloon = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsBalloon = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteBalloonStateNoneId, { 11, 28, 5 }, kPeepAnimationSequenceBalloonNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteBalloonStateWatchRideId, { 11, 28, 5 }, kPeepAnimationSequenceBalloonWatchRide }; pag[PeepAnimationType::SittingIdle] = { kPeepSpriteBalloonStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceBalloonSittingIdle }; @@ -483,8 +483,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceCandyflossSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Candyfloss sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupCandyfloss = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsCandyfloss = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteCandyflossStateNoneId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteCandyflossStateWatchRideId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteCandyflossStateEatFoodId, { 11, 19, 5 }, kPeepAnimationSequenceCandyflossEatFood }; @@ -499,8 +499,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceUmbrellaSittingIdle = { 0 }; // Define animation group for Umbrella sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupUmbrella = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsUmbrella = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteUmbrellaStateNoneId, { 14, 21, 5 }, kPeepAnimationSequenceUmbrellaNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteUmbrellaStateWatchRideId, { 14, 21, 5 }, kPeepAnimationSequenceUmbrellaWatchRide }; pag[PeepAnimationType::SittingIdle] = { kPeepSpriteUmbrellaStateSittingIdleId, { 14, 19, 6 }, kPeepAnimationSequenceUmbrellaSittingIdle }; @@ -515,8 +515,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequencePizzaSittingEatFood = { 0, 1, 2, 3, 4, 5 }; // Define animation group for Pizza sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupPizza = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsPizza = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpritePizzaStateNoneId, { 8, 16, 5 }, kPeepAnimationSequencePizzaNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpritePizzaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePizzaWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpritePizzaStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequencePizzaEatFood }; @@ -532,8 +532,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSecurityAltDrowning = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; // Define animation group for SecurityAlt sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSecurityAlt = []() { - PeepAnimationGroup pag; + static constexpr PeepAnimations kPeepAnimationsSecurityAlt = []() { + PeepAnimations pag; pag[PeepAnimationType::None] = { kSecurityStaffSpriteAltStateNoneId, { 8, 18, 5 }, kPeepAnimationSequenceSecurityAltNone }; pag[PeepAnimationType::WatchRide] = { kSecuritySpriteStateWatchRideId, { 8, 17, 5 }, kPeepAnimationSequenceSecurityAltWatchRide }; pag[PeepAnimationType::Hanging] = { kSecuritySpriteStateHangingId, { 15, 19, 6 }, kPeepAnimationSequenceSecurityAltHanging }; @@ -549,8 +549,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequencePopcornSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Popcorn sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupPopcorn = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsPopcorn = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpritePopcornStateNoneId, { 11, 19, 5 }, kPeepAnimationSequencePopcornNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpritePopcornStateWatchRideId, { 11, 19, 5 }, kPeepAnimationSequencePopcornWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpritePopcornStateEatFoodId, { 11, 19, 5 }, kPeepAnimationSequencePopcornEatFood }; @@ -563,8 +563,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceArmsCrossedNone = { 0, 1, 2, 3, 4, 5 }; // Define animation group for ArmsCrossed sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupArmsCrossed = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsArmsCrossed = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteArmsCrossedStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceArmsCrossedNone }; return pag; }(); @@ -573,8 +573,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceHeadDownNone = { 0, 1, 2, 3, 4, 5 }; // Define animation group for HeadDown sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupHeadDown = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsHeadDown = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteHeadDownStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHeadDownNone }; return pag; }(); @@ -583,8 +583,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceNauseousNone = { 0, 1, 2, 3, 4, 5 }; // Define animation group for Nauseous sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupNauseous = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsNauseous = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNauseousNone }; return pag; }(); @@ -595,8 +595,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceVeryNauseousSittingIdle = { 0 }; // Define animation group for VeryNauseous sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupVeryNauseous = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsVeryNauseous = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteVeryNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceVeryNauseousNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteVeryNauseousStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceVeryNauseousWatchRide }; pag[PeepAnimationType::SittingIdle] = { kPeepSpriteVeryNauseousStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceVeryNauseousSittingIdle }; @@ -607,8 +607,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceRequireToiletNone = { 0, 1, 2, 3, 4, 5 }; // Define animation group for RequireToilet sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupRequireToilet = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsRequireToilet = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteRequireToiletStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceRequireToiletNone }; return pag; }(); @@ -619,8 +619,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceHatSittingIdle = { 0 }; // Define animation group for Hat sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupHat = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsHat = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteHatStateNoneId, { 12, 32, 5 }, kPeepAnimationSequenceHatNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteHatStateWatchRideId, { 12, 32, 5 }, kPeepAnimationSequenceHatWatchRide }; pag[PeepAnimationType::SittingIdle] = { kPeepSpriteHatStateSittingIdleId, { 10, 20, 6 }, kPeepAnimationSequenceHatSittingIdle }; @@ -635,8 +635,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceHotDogSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for HotDog sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupHotDog = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsHotDog = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteHotDogStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteHotDogStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteHotDogStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceHotDogEatFood }; @@ -653,8 +653,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceTentacleSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; // Define animation group for Tentacle sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupTentacle = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsTentacle = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteTentacleStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteTentacleStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteTentacleStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceTentacleEatFood }; @@ -671,8 +671,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceToffeeAppleSittingEatFood = { 0, 1, 2, 3, 4, 5 }; // Define animation group for ToffeeApple sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupToffeeApple = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsToffeeApple = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteToffeeAppleStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteToffeeAppleStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteToffeeAppleStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceToffeeAppleEatFood }; @@ -689,8 +689,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceDonutSittingEatFood = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 4, 5 }; // Define animation group for Donut sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupDonut = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsDonut = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteDonutStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceDonutNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteDonutStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceDonutWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteDonutStateEatFoodId, { 8, 16, 5 }, kPeepAnimationSequenceDonutEatFood }; @@ -707,8 +707,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceCoffeeSittingEatFood = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1 }; // Define animation group for Coffee sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupCoffee = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsCoffee = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteCoffeeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteCoffeeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteCoffeeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceCoffeeEatFood }; @@ -725,8 +725,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceChickenSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Chicken sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupChicken = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsChicken = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteChickenStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceChickenNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteChickenStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChickenWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteChickenStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceChickenEatFood }; @@ -743,8 +743,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceLemonadeSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Lemonade sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupLemonade = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsLemonade = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteLemonadeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteLemonadeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteLemonadeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceLemonadeEatFood }; @@ -757,8 +757,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceWatchingWatchRide = { 0 }; // Define animation group for Watching sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupWatching = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsWatching = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::WatchRide] = { kPeepSpriteWatchingStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceWatchingWatchRide }; return pag; }(); @@ -771,8 +771,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequencePretzelSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Pretzel sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupPretzel = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsPretzel = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpritePretzelStateNoneId, { 8, 16, 5 }, kPeepAnimationSequencePretzelNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpritePretzelStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePretzelWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpritePretzelStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequencePretzelEatFood }; @@ -787,8 +787,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSunglassesSittingIdle = { 0 }; // Define animation group for Sunglasses sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSunglasses = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsSunglasses = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteSunglassesStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSunglassesNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteSunglassesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSunglassesWatchRide }; pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSunglassesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSunglassesSittingIdle }; @@ -803,8 +803,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSuJongkwaSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for SuJongkwa sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSuJongkwa = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsSuJongkwa = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteSuJongkwaStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteSuJongkwaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteSuJongkwaStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSuJongkwaEatFood }; @@ -821,8 +821,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceJuiceSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Juice sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupJuice = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsJuice = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteJuiceStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteJuiceStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteJuiceStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceJuiceEatFood }; @@ -839,8 +839,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceFunnelCakeSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for FunnelCake sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupFunnelCake = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsFunnelCake = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteFunnelCakeStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteFunnelCakeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteFunnelCakeStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceFunnelCakeEatFood }; @@ -857,8 +857,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceNoodlesSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Noodles sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupNoodles = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsNoodles = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteNoodlesStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteNoodlesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteNoodlesStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceNoodlesEatFood }; @@ -875,8 +875,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSausageSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Sausage sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSausage = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsSausage = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteSausageStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSausageNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteSausageStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSausageWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteSausageStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSausageEatFood }; @@ -893,8 +893,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSoupSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Soup sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSoup = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsSoup = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteSoupStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSoupNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteSoupStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSoupWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteSoupStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSoupEatFood }; @@ -911,8 +911,8 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSandwichSittingEatFood = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; // Define animation group for Sandwich sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupSandwich = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; + static constexpr PeepAnimations kPeepAnimationsSandwich = []() { + PeepAnimations pag = kPeepAnimationsNormal; pag[PeepAnimationType::None] = { kPeepSpriteSandwichStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichNone }; pag[PeepAnimationType::WatchRide] = { kPeepSpriteSandwichStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichWatchRide }; pag[PeepAnimationType::EatFood] = { kPeepSpriteSandwichStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceSandwichEatFood }; @@ -924,54 +924,54 @@ namespace OpenRCT2 // clang-format on // rct2: 0x00982708 static std::array kPeepAnimationEntries = { - kPeepAnimationGroupNormal, - kPeepAnimationGroupHandyman, - kPeepAnimationGroupMechanic, - kPeepAnimationGroupSecurity, - kPeepAnimationGroupEntertainerPanda, - kPeepAnimationGroupEntertainerTiger, - kPeepAnimationGroupEntertainerElephant, - kPeepAnimationGroupEntertainerRoman, - kPeepAnimationGroupEntertainerGorilla, - kPeepAnimationGroupEntertainerSnowman, - kPeepAnimationGroupEntertainerKnight, - kPeepAnimationGroupEntertainerAstronaut, - kPeepAnimationGroupEntertainerBandit, - kPeepAnimationGroupEntertainerSheriff, - kPeepAnimationGroupEntertainerPirate, - kPeepAnimationGroupIceCream, - kPeepAnimationGroupChips, - kPeepAnimationGroupBurger, - kPeepAnimationGroupDrink, - kPeepAnimationGroupBalloon, - kPeepAnimationGroupCandyfloss, - kPeepAnimationGroupUmbrella, - kPeepAnimationGroupPizza, - kPeepAnimationGroupSecurityAlt, - kPeepAnimationGroupPopcorn, - kPeepAnimationGroupArmsCrossed, - kPeepAnimationGroupHeadDown, - kPeepAnimationGroupNauseous, - kPeepAnimationGroupVeryNauseous, - kPeepAnimationGroupRequireToilet, - kPeepAnimationGroupHat, - kPeepAnimationGroupHotDog, - kPeepAnimationGroupTentacle, - kPeepAnimationGroupToffeeApple, - kPeepAnimationGroupDonut, - kPeepAnimationGroupCoffee, - kPeepAnimationGroupChicken, - kPeepAnimationGroupLemonade, - kPeepAnimationGroupWatching, - kPeepAnimationGroupPretzel, - kPeepAnimationGroupSunglasses, - kPeepAnimationGroupSuJongkwa, - kPeepAnimationGroupJuice, - kPeepAnimationGroupFunnelCake, - kPeepAnimationGroupNoodles, - kPeepAnimationGroupSausage, - kPeepAnimationGroupSoup, - kPeepAnimationGroupSandwich, + kPeepAnimationsNormal, + kPeepAnimationsHandyman, + kPeepAnimationsMechanic, + kPeepAnimationsSecurity, + kPeepAnimationsEntertainerPanda, + kPeepAnimationsEntertainerTiger, + kPeepAnimationsEntertainerElephant, + kPeepAnimationsEntertainerRoman, + kPeepAnimationsEntertainerGorilla, + kPeepAnimationsEntertainerSnowman, + kPeepAnimationsEntertainerKnight, + kPeepAnimationsEntertainerAstronaut, + kPeepAnimationsEntertainerBandit, + kPeepAnimationsEntertainerSheriff, + kPeepAnimationsEntertainerPirate, + kPeepAnimationsIceCream, + kPeepAnimationsChips, + kPeepAnimationsBurger, + kPeepAnimationsDrink, + kPeepAnimationsBalloon, + kPeepAnimationsCandyfloss, + kPeepAnimationsUmbrella, + kPeepAnimationsPizza, + kPeepAnimationsSecurityAlt, + kPeepAnimationsPopcorn, + kPeepAnimationsArmsCrossed, + kPeepAnimationsHeadDown, + kPeepAnimationsNauseous, + kPeepAnimationsVeryNauseous, + kPeepAnimationsRequireToilet, + kPeepAnimationsHat, + kPeepAnimationsHotDog, + kPeepAnimationsTentacle, + kPeepAnimationsToffeeApple, + kPeepAnimationsDonut, + kPeepAnimationsCoffee, + kPeepAnimationsChicken, + kPeepAnimationsLemonade, + kPeepAnimationsWatching, + kPeepAnimationsPretzel, + kPeepAnimationsSunglasses, + kPeepAnimationsSuJongkwa, + kPeepAnimationsJuice, + kPeepAnimationsFunnelCake, + kPeepAnimationsNoodles, + kPeepAnimationsSausage, + kPeepAnimationsSoup, + kPeepAnimationsSandwich, }; const PeepAnimation& GetPeepAnimation(PeepSpriteType spriteType, PeepAnimationType actionSpriteType) diff --git a/src/openrct2/peep/PeepAnimationData.h b/src/openrct2/peep/PeepAnimationData.h index 6a17db1788..4e593fb47d 100644 --- a/src/openrct2/peep/PeepAnimationData.h +++ b/src/openrct2/peep/PeepAnimationData.h @@ -20,7 +20,7 @@ namespace OpenRCT2 std::span frame_offsets; }; - struct PeepAnimationGroup + struct PeepAnimations { public: constexpr PeepAnimation& operator[](PeepAnimationType n) From 6d27369ea6c666a2c5e7056b0e6711196a314dc9 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:42:27 +0200 Subject: [PATCH 10/12] Rename PeepSpriteType to PeepAnimationGroup --- src/openrct2-ui/windows/GuestList.cpp | 2 +- src/openrct2-ui/windows/News.cpp | 2 +- src/openrct2-ui/windows/Park.cpp | 2 +- src/openrct2-ui/windows/Ride.cpp | 2 +- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2-ui/windows/StaffList.cpp | 38 ++--- src/openrct2/actions/StaffHireNewAction.cpp | 12 +- .../actions/StaffSetCostumeAction.cpp | 32 ++--- src/openrct2/entity/Guest.cpp | 136 +++++++++--------- src/openrct2/entity/Guest.h | 2 +- src/openrct2/entity/Peep.cpp | 4 +- src/openrct2/entity/Peep.h | 4 +- src/openrct2/entity/Staff.cpp | 8 +- src/openrct2/entity/Staff.h | 2 +- src/openrct2/peep/PeepAnimationData.cpp | 4 +- src/openrct2/peep/PeepAnimationData.h | 4 +- src/openrct2/rct1/RCT1.h | 4 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct1/Tables.cpp | 76 +++++----- src/openrct2/rct1/Tables.h | 4 +- src/openrct2/rct2/S6Importer.cpp | 2 +- .../scripting/bindings/entity/ScStaff.cpp | 52 +++---- 22 files changed, 198 insertions(+), 198 deletions(-) diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index f3db9950bc..8b46fbf4ce 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -650,7 +650,7 @@ namespace OpenRCT2::Ui::Windows { // Tab 1 image auto i = (_selectedTab == TabId::Individual ? _tabAnimationIndex & ~3 : 0); - i += GetPeepAnimation(PeepSpriteType::Normal).base_image + 1; + i += GetPeepAnimation(PeepAnimationGroup::Normal).base_image + 1; GfxDrawSprite( dpi, ImageId(i, COLOUR_GREY, COLOUR_DARK_OLIVE_GREEN), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_1].midX(), widgets[WIDX_TAB_1].bottom - 6 }); diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index c5ffb3f312..76a5a31583 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -251,7 +251,7 @@ namespace OpenRCT2::Ui::Windows // If normal peep set sprite to normal (no food) // If staff set sprite to staff sprite - auto spriteType = PeepSpriteType::Normal; + auto spriteType = PeepAnimationGroup::Normal; auto* staff = peep->As(); if (staff != nullptr) { diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 326993dcd5..d0710b59a9 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -1265,7 +1265,7 @@ namespace OpenRCT2::Ui::Windows spriteIdx = spriteIdx.WithIndexOffset((frame_no / 8) % 8); GfxDrawSprite(dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].left, widgets[WIDX_TAB_3].top }); - ImageId peepImage(GetPeepAnimation(PeepSpriteType::Normal).base_image + 1, COLOUR_BRIGHT_RED, COLOUR_TEAL); + ImageId peepImage(GetPeepAnimation(PeepAnimationGroup::Normal).base_image + 1, COLOUR_BRIGHT_RED, COLOUR_TEAL); if (page == WINDOW_PARK_PAGE_GUESTS) peepImage = peepImage.WithIndexOffset(_peepAnimationFrame & 0xFFFFFFFC); diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 8d3077230a..4add6c1aee 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1327,7 +1327,7 @@ namespace OpenRCT2::Ui::Windows if (page == WINDOW_RIDE_PAGE_CUSTOMER) spriteIndex = picked_peep_frame & ~3; - spriteIndex += GetPeepAnimation(PeepSpriteType::Normal).base_image + 1; + spriteIndex += GetPeepAnimation(PeepAnimationGroup::Normal).base_image + 1; GfxDrawSprite( dpi, ImageId(spriteIndex, COLOUR_BRIGHT_RED, COLOUR_TEAL), diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 73a2491baf..046c4d2600 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -831,7 +831,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_COSTUME_BTN].type = WindowWidgetType::Button; // TODO: retrieve string from object instead - auto costumeType = EnumValue(staff->SpriteType) - EnumValue(PeepSpriteType::EntertainerPanda); + auto costumeType = EnumValue(staff->SpriteType) - EnumValue(PeepAnimationGroup::EntertainerPanda); if (costumeType >= 0) widgets[WIDX_COSTUME_BOX].text = StaffCostumeNames[costumeType]; else diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 7be015f823..c76ae9ff53 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -599,13 +599,13 @@ namespace OpenRCT2::Ui::Windows void DrawTabImages(DrawPixelInfo& dpi) const { const auto& gameState = GetGameState(); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_HANDYMEN, PeepSpriteType::Handyman, gameState.StaffHandymanColour); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_MECHANICS, PeepSpriteType::Mechanic, gameState.StaffMechanicColour); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_SECURITY, PeepSpriteType::Security, gameState.StaffSecurityColour); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_ENTERTAINERS, PeepSpriteType::EntertainerElephant); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_HANDYMEN, PeepAnimationGroup::Handyman, gameState.StaffHandymanColour); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_MECHANICS, PeepAnimationGroup::Mechanic, gameState.StaffMechanicColour); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_SECURITY, PeepAnimationGroup::Security, gameState.StaffSecurityColour); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_ENTERTAINERS, PeepAnimationGroup::EntertainerElephant); } - void DrawTabImage(DrawPixelInfo& dpi, int32_t tabIndex, PeepSpriteType type, colour_t colour) const + void DrawTabImage(DrawPixelInfo& dpi, int32_t tabIndex, PeepAnimationGroup type, colour_t colour) const { auto widgetIndex = WIDX_STAFF_LIST_HANDYMEN_TAB + tabIndex; const auto& widget = widgets[widgetIndex]; @@ -616,7 +616,7 @@ namespace OpenRCT2::Ui::Windows windowPos + ScreenCoordsXY{ (widget.left + widget.right) / 2, widget.bottom - 6 }); } - void DrawTabImage(DrawPixelInfo& dpi, int32_t tabIndex, PeepSpriteType type) const + void DrawTabImage(DrawPixelInfo& dpi, int32_t tabIndex, PeepAnimationGroup type) const { auto widgetIndex = WIDX_STAFF_LIST_HANDYMEN_TAB + tabIndex; const auto& widget = widgets[widgetIndex]; @@ -723,33 +723,33 @@ namespace OpenRCT2::Ui::Windows } } - static uint32_t GetEntertainerCostumeSprite(PeepSpriteType type) + static uint32_t GetEntertainerCostumeSprite(PeepAnimationGroup type) { switch (type) { - case PeepSpriteType::EntertainerPanda: + case PeepAnimationGroup::EntertainerPanda: return SPR_STAFF_COSTUME_PANDA; - case PeepSpriteType::EntertainerTiger: + case PeepAnimationGroup::EntertainerTiger: return SPR_STAFF_COSTUME_TIGER; - case PeepSpriteType::EntertainerElephant: + case PeepAnimationGroup::EntertainerElephant: return SPR_STAFF_COSTUME_ELEPHANT; - case PeepSpriteType::EntertainerRoman: + case PeepAnimationGroup::EntertainerRoman: return SPR_STAFF_COSTUME_ROMAN; - case PeepSpriteType::EntertainerGorilla: + case PeepAnimationGroup::EntertainerGorilla: return SPR_STAFF_COSTUME_GORILLA; - case PeepSpriteType::EntertainerSnowman: + case PeepAnimationGroup::EntertainerSnowman: return SPR_STAFF_COSTUME_SNOWMAN; - case PeepSpriteType::EntertainerKnight: + case PeepAnimationGroup::EntertainerKnight: return SPR_STAFF_COSTUME_KNIGHT; - case PeepSpriteType::EntertainerAstronaut: + case PeepAnimationGroup::EntertainerAstronaut: return SPR_STAFF_COSTUME_ASTRONAUT; - case PeepSpriteType::EntertainerBandit: + case PeepAnimationGroup::EntertainerBandit: return SPR_STAFF_COSTUME_BANDIT; - case PeepSpriteType::EntertainerSheriff: + case PeepAnimationGroup::EntertainerSheriff: return SPR_STAFF_COSTUME_SHERIFF; - case PeepSpriteType::EntertainerPirate: + case PeepAnimationGroup::EntertainerPirate: return SPR_STAFF_COSTUME_PIRATE; - case PeepSpriteType::Normal: + case PeepAnimationGroup::Normal: default: return SPR_PEEP_SMALL_FACE_HAPPY; } diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index e6352f9260..717984edd7 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -33,11 +33,11 @@ using namespace OpenRCT2; /* rct2: 0x009929FC */ -static constexpr PeepSpriteType spriteTypes[] = { - PeepSpriteType::Handyman, - PeepSpriteType::Mechanic, - PeepSpriteType::Security, - PeepSpriteType::EntertainerPanda, +static constexpr PeepAnimationGroup spriteTypes[] = { + PeepAnimationGroup::Handyman, + PeepAnimationGroup::Mechanic, + PeepAnimationGroup::Security, + PeepAnimationGroup::EntertainerPanda, }; StaffHireNewAction::StaffHireNewAction( @@ -163,7 +163,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->PeepId = newStaffId; newPeep->AssignedStaffType = static_cast(_staffType); - PeepSpriteType spriteType = spriteTypes[_staffType]; + PeepAnimationGroup spriteType = spriteTypes[_staffType]; if (_staffType == static_cast(StaffType::Entertainer)) { spriteType = EntertainerCostumeToSprite(_entertainerType); diff --git a/src/openrct2/actions/StaffSetCostumeAction.cpp b/src/openrct2/actions/StaffSetCostumeAction.cpp index 1856bdd5d9..b59c0757b2 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.cpp +++ b/src/openrct2/actions/StaffSetCostumeAction.cpp @@ -20,22 +20,22 @@ using namespace OpenRCT2; /** rct2: 0x00982134 */ constexpr bool peep_slow_walking_types[] = { - false, // PeepSpriteType::Normal - false, // PeepSpriteType::Handyman - false, // PeepSpriteType::Mechanic - false, // PeepSpriteType::Security - false, // PeepSpriteType::EntertainerPanda - false, // PeepSpriteType::EntertainerTiger - false, // PeepSpriteType::EntertainerElephant - false, // PeepSpriteType::EntertainerRoman - false, // PeepSpriteType::EntertainerGorilla - false, // PeepSpriteType::EntertainerSnowman - false, // PeepSpriteType::EntertainerKnight - true, // PeepSpriteType::EntertainerAstronaut - false, // PeepSpriteType::EntertainerBandit - false, // PeepSpriteType::EntertainerSheriff - true, // PeepSpriteType::EntertainerPirate - true, // PeepSpriteType::Balloon + false, // PeepAnimationGroup::Normal + false, // PeepAnimationGroup::Handyman + false, // PeepAnimationGroup::Mechanic + false, // PeepAnimationGroup::Security + false, // PeepAnimationGroup::EntertainerPanda + false, // PeepAnimationGroup::EntertainerTiger + false, // PeepAnimationGroup::EntertainerElephant + false, // PeepAnimationGroup::EntertainerRoman + false, // PeepAnimationGroup::EntertainerGorilla + false, // PeepAnimationGroup::EntertainerSnowman + false, // PeepAnimationGroup::EntertainerKnight + true, // PeepAnimationGroup::EntertainerAstronaut + false, // PeepAnimationGroup::EntertainerBandit + false, // PeepAnimationGroup::EntertainerSheriff + true, // PeepAnimationGroup::EntertainerPirate + true, // PeepAnimationGroup::Balloon }; StaffSetCostumeAction::StaffSetCostumeAction(EntityId spriteIndex, EntertainerCostume costume) diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index dba57fd5f9..47208e8ff0 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1308,7 +1308,7 @@ void Guest::UpdateSitting() return; } - if (SpriteType == PeepSpriteType::Umbrella) + if (SpriteType == PeepAnimationGroup::Umbrella) { TryGetUpFromSitting(); return; @@ -1334,7 +1334,7 @@ void Guest::UpdateSitting() TryGetUpFromSitting(); return; } - if (SpriteType == PeepSpriteType::Balloon || SpriteType == PeepSpriteType::Hat) + if (SpriteType == PeepAnimationGroup::Balloon || SpriteType == PeepAnimationGroup::Hat) { TryGetUpFromSitting(); return; @@ -5632,7 +5632,7 @@ void Guest::UpdateQueuing() PerformNextAction(pathingResult); if (!IsActionInterruptable()) return; - if (SpriteType == PeepSpriteType::Normal) + if (SpriteType == PeepAnimationGroup::Normal) { if (TimeInQueue >= 2000 && (0xFFFF & ScenarioRand()) <= 119) { @@ -5654,28 +5654,28 @@ void Guest::UpdateQueuing() { switch (SpriteType) { - case PeepSpriteType::IceCream: - case PeepSpriteType::Chips: - case PeepSpriteType::Burger: - case PeepSpriteType::Drink: - case PeepSpriteType::Candyfloss: - case PeepSpriteType::Pizza: - case PeepSpriteType::Popcorn: - case PeepSpriteType::HotDog: - case PeepSpriteType::Tentacle: - case PeepSpriteType::ToffeeApple: - case PeepSpriteType::Doughnut: - case PeepSpriteType::Coffee: - case PeepSpriteType::Chicken: - case PeepSpriteType::Lemonade: - case PeepSpriteType::Pretzel: - case PeepSpriteType::SuJongkwa: - case PeepSpriteType::Juice: - case PeepSpriteType::FunnelCake: - case PeepSpriteType::Noodles: - case PeepSpriteType::Sausage: - case PeepSpriteType::Soup: - case PeepSpriteType::Sandwich: + case PeepAnimationGroup::IceCream: + case PeepAnimationGroup::Chips: + case PeepAnimationGroup::Burger: + case PeepAnimationGroup::Drink: + case PeepAnimationGroup::Candyfloss: + case PeepAnimationGroup::Pizza: + case PeepAnimationGroup::Popcorn: + case PeepAnimationGroup::HotDog: + case PeepAnimationGroup::Tentacle: + case PeepAnimationGroup::ToffeeApple: + case PeepAnimationGroup::Doughnut: + case PeepAnimationGroup::Coffee: + case PeepAnimationGroup::Chicken: + case PeepAnimationGroup::Lemonade: + case PeepAnimationGroup::Pretzel: + case PeepAnimationGroup::SuJongkwa: + case PeepAnimationGroup::Juice: + case PeepAnimationGroup::FunnelCake: + case PeepAnimationGroup::Noodles: + case PeepAnimationGroup::Sausage: + case PeepAnimationGroup::Soup: + case PeepAnimationGroup::Sandwich: // Eat food Action = PeepActionType::EatFood; AnimationFrameNum = 0; @@ -6732,7 +6732,7 @@ static bool PeepFindRideToLookAt(Peep* peep, uint8_t edge, RideId* rideToView, u } /* Part of 0x0069B8CC rct2: 0x0069BC31 */ -void Guest::SetSpriteType(PeepSpriteType new_sprite_type) +void Guest::SetSpriteType(PeepAnimationGroup new_sprite_type) { if (SpriteType == new_sprite_type) return; @@ -6771,42 +6771,42 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type) struct ItemPref { ShopItem item; - PeepSpriteType sprite_type; + PeepAnimationGroup sprite_type; }; // clang-format off static ItemPref item_order_preference[] = { - { ShopItem::IceCream, PeepSpriteType::IceCream }, - { ShopItem::Chips, PeepSpriteType::Chips }, - { ShopItem::Pizza, PeepSpriteType::Pizza }, - { ShopItem::Burger, PeepSpriteType::Burger }, - { ShopItem::Drink, PeepSpriteType::Drink }, - { ShopItem::Coffee, PeepSpriteType::Coffee }, - { ShopItem::Chicken, PeepSpriteType::Chicken }, - { ShopItem::Lemonade, PeepSpriteType::Lemonade }, - { ShopItem::Candyfloss, PeepSpriteType::Candyfloss }, - { ShopItem::Popcorn, PeepSpriteType::Popcorn }, - { ShopItem::HotDog, PeepSpriteType::HotDog }, - { ShopItem::Tentacle, PeepSpriteType::Tentacle }, - { ShopItem::ToffeeApple, PeepSpriteType::ToffeeApple }, - { ShopItem::Doughnut, PeepSpriteType::Doughnut }, - { ShopItem::Pretzel, PeepSpriteType::Pretzel }, - { ShopItem::Cookie, PeepSpriteType::Pretzel }, - { ShopItem::Chocolate, PeepSpriteType::Coffee }, - { ShopItem::IcedTea, PeepSpriteType::Coffee }, - { ShopItem::FunnelCake, PeepSpriteType::FunnelCake }, - { ShopItem::BeefNoodles, PeepSpriteType::Noodles }, - { ShopItem::FriedRiceNoodles, PeepSpriteType::Noodles }, - { ShopItem::WontonSoup, PeepSpriteType::Soup }, - { ShopItem::MeatballSoup, PeepSpriteType::Soup }, - { ShopItem::FruitJuice, PeepSpriteType::Juice }, - { ShopItem::SoybeanMilk, PeepSpriteType::SuJongkwa }, - { ShopItem::Sujeonggwa, PeepSpriteType::SuJongkwa }, - { ShopItem::SubSandwich, PeepSpriteType::Sandwich }, - { ShopItem::RoastSausage, PeepSpriteType::Sausage }, - { ShopItem::Balloon, PeepSpriteType::Balloon }, - { ShopItem::Hat, PeepSpriteType::Hat }, - { ShopItem::Sunglasses, PeepSpriteType::Sunglasses }, + { ShopItem::IceCream, PeepAnimationGroup::IceCream }, + { ShopItem::Chips, PeepAnimationGroup::Chips }, + { ShopItem::Pizza, PeepAnimationGroup::Pizza }, + { ShopItem::Burger, PeepAnimationGroup::Burger }, + { ShopItem::Drink, PeepAnimationGroup::Drink }, + { ShopItem::Coffee, PeepAnimationGroup::Coffee }, + { ShopItem::Chicken, PeepAnimationGroup::Chicken }, + { ShopItem::Lemonade, PeepAnimationGroup::Lemonade }, + { ShopItem::Candyfloss, PeepAnimationGroup::Candyfloss }, + { ShopItem::Popcorn, PeepAnimationGroup::Popcorn }, + { ShopItem::HotDog, PeepAnimationGroup::HotDog }, + { ShopItem::Tentacle, PeepAnimationGroup::Tentacle }, + { ShopItem::ToffeeApple, PeepAnimationGroup::ToffeeApple }, + { ShopItem::Doughnut, PeepAnimationGroup::Doughnut }, + { ShopItem::Pretzel, PeepAnimationGroup::Pretzel }, + { ShopItem::Cookie, PeepAnimationGroup::Pretzel }, + { ShopItem::Chocolate, PeepAnimationGroup::Coffee }, + { ShopItem::IcedTea, PeepAnimationGroup::Coffee }, + { ShopItem::FunnelCake, PeepAnimationGroup::FunnelCake }, + { ShopItem::BeefNoodles, PeepAnimationGroup::Noodles }, + { ShopItem::FriedRiceNoodles, PeepAnimationGroup::Noodles }, + { ShopItem::WontonSoup, PeepAnimationGroup::Soup }, + { ShopItem::MeatballSoup, PeepAnimationGroup::Soup }, + { ShopItem::FruitJuice, PeepAnimationGroup::Juice }, + { ShopItem::SoybeanMilk, PeepAnimationGroup::SuJongkwa }, + { ShopItem::Sujeonggwa, PeepAnimationGroup::SuJongkwa }, + { ShopItem::SubSandwich, PeepAnimationGroup::Sandwich }, + { ShopItem::RoastSausage, PeepAnimationGroup::Sausage }, + { ShopItem::Balloon, PeepAnimationGroup::Balloon }, + { ShopItem::Hat, PeepAnimationGroup::Hat }, + { ShopItem::Sunglasses, PeepAnimationGroup::Sunglasses }, }; // clang-format on @@ -6816,7 +6816,7 @@ static ItemPref item_order_preference[] = { */ void Guest::UpdateSpriteType() { - if (SpriteType == PeepSpriteType::Balloon && (ScenarioRand() & 0xFFFF) <= 327) + if (SpriteType == PeepAnimationGroup::Balloon && (ScenarioRand() & 0xFFFF) <= 327) { bool isBalloonPopped = false; if (x != kLocationNull) @@ -6848,7 +6848,7 @@ void Guest::UpdateSpriteType() if (tileElement->IsLastForTile()) { - SetSpriteType(PeepSpriteType::Umbrella); + SetSpriteType(PeepAnimationGroup::Umbrella); return; } tileElement++; @@ -6867,41 +6867,41 @@ void Guest::UpdateSpriteType() if (State == PeepState::Watching && StandingFlags & (1 << 1)) { - SetSpriteType(PeepSpriteType::Watching); + SetSpriteType(PeepAnimationGroup::Watching); return; } if (Nausea > 170) { - SetSpriteType(PeepSpriteType::VeryNauseous); + SetSpriteType(PeepAnimationGroup::VeryNauseous); return; } if (Nausea > 140) { - SetSpriteType(PeepSpriteType::Nauseous); + SetSpriteType(PeepAnimationGroup::Nauseous); return; } if (Energy <= 64 && Happiness < 128) { - SetSpriteType(PeepSpriteType::HeadDown); + SetSpriteType(PeepAnimationGroup::HeadDown); return; } if (Energy <= 80 && Happiness < 128) { - SetSpriteType(PeepSpriteType::ArmsCrossed); + SetSpriteType(PeepAnimationGroup::ArmsCrossed); return; } if (Toilet > 220) { - SetSpriteType(PeepSpriteType::RequireToilet); + SetSpriteType(PeepAnimationGroup::RequireToilet); return; } - SetSpriteType(PeepSpriteType::Normal); + SetSpriteType(PeepAnimationGroup::Normal); } bool Guest::HeadingForRideOrParkExit() const @@ -7119,7 +7119,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) auto& gameState = GetGameState(); Guest* peep = CreateEntity(); - peep->SpriteType = PeepSpriteType::Normal; + peep->SpriteType = PeepAnimationGroup::Normal; peep->OutsideOfPark = true; peep->State = PeepState::Falling; peep->Action = PeepActionType::Walking; diff --git a/src/openrct2/entity/Guest.h b/src/openrct2/entity/Guest.h index 8266160742..a232e80d6d 100644 --- a/src/openrct2/entity/Guest.h +++ b/src/openrct2/entity/Guest.h @@ -354,7 +354,7 @@ public: void CheckCantFindRide(); void CheckCantFindExit(); bool DecideAndBuyItem(Ride& ride, ShopItem shopItem, money64 price); - void SetSpriteType(PeepSpriteType new_sprite_type); + void SetSpriteType(PeepAnimationGroup new_sprite_type); void HandleEasterEggName(); int32_t GetEasterEggNameId() const; void UpdateEasterEggInteractions(); diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index b99d4cb23b..4786e00217 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -337,7 +337,7 @@ PeepAnimationType Peep::GetAnimationType() */ void Peep::UpdateCurrentAnimationType() { - if (EnumValue(SpriteType) >= EnumValue(PeepSpriteType::Count)) + if (EnumValue(SpriteType) >= EnumValue(PeepAnimationGroup::Count)) { return; } @@ -2739,7 +2739,7 @@ static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height) { peep->RemoveItem(ShopItem::Balloon); - if (peep->SpriteType == PeepSpriteType::Balloon && peep->x != kLocationNull) + if (peep->SpriteType == PeepAnimationGroup::Balloon && peep->x != kLocationNull) { Balloon::Create({ peep->x, peep->y, spawn_height }, peep->BalloonColour, false); peep->WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 5358708077..106c86e213 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -240,7 +240,7 @@ enum PeepNextFlags PEEP_NEXT_FLAG_UNUSED = (1 << 4), }; -enum class PeepSpriteType : uint8_t +enum class PeepAnimationGroup : uint8_t { Normal = 0, Handyman = 1, @@ -322,7 +322,7 @@ struct Peep : EntityBase PeepRideSubState RideSubState; PeepUsingBinSubState UsingBinSubState; }; - PeepSpriteType SpriteType; + PeepAnimationGroup SpriteType; uint8_t TshirtColour; uint8_t TrousersColour; uint16_t DestinationX; // Location that the peep is trying to get to diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index 5c9dc3e885..d341fd1e22 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -958,10 +958,10 @@ int32_t Staff::GetHireDate() const return HireDate; } -PeepSpriteType EntertainerCostumeToSprite(EntertainerCostume entertainerType) +PeepAnimationGroup EntertainerCostumeToSprite(EntertainerCostume entertainerType) { uint8_t value = static_cast(entertainerType); - PeepSpriteType newSpriteType = static_cast(value + EnumValue(PeepSpriteType::EntertainerPanda)); + PeepAnimationGroup newSpriteType = static_cast(value + EnumValue(PeepAnimationGroup::EntertainerPanda)); return newSpriteType; } @@ -1691,9 +1691,9 @@ void Staff::Tick128UpdateStaff() if (AssignedStaffType != StaffType::Security) return; - PeepSpriteType newSpriteType = PeepSpriteType::SecurityAlt; + PeepAnimationGroup newSpriteType = PeepAnimationGroup::SecurityAlt; if (State != PeepState::Patrolling) - newSpriteType = PeepSpriteType::Security; + newSpriteType = PeepAnimationGroup::Security; if (SpriteType == newSpriteType) return; diff --git a/src/openrct2/entity/Staff.h b/src/openrct2/entity/Staff.h index 614236eac7..2eea66d32a 100644 --- a/src/openrct2/entity/Staff.h +++ b/src/openrct2/entity/Staff.h @@ -147,6 +147,6 @@ uint32_t StaffGetAvailableEntertainerCostumes(); int32_t StaffGetAvailableEntertainerCostumeList(EntertainerCostume* costumeList); money64 GetStaffWage(StaffType type); -PeepSpriteType EntertainerCostumeToSprite(EntertainerCostume entertainerType); +PeepAnimationGroup EntertainerCostumeToSprite(EntertainerCostume entertainerType); const PatrolArea& GetMergedPatrolArea(const StaffType type); diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index 72ba611d26..5ae6876786 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -974,12 +974,12 @@ namespace OpenRCT2 kPeepAnimationsSandwich, }; - const PeepAnimation& GetPeepAnimation(PeepSpriteType spriteType, PeepAnimationType actionSpriteType) + const PeepAnimation& GetPeepAnimation(PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType) { return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType]; } - const SpriteBounds& GetSpriteBounds(PeepSpriteType spriteType, PeepAnimationType actionSpriteType) + const SpriteBounds& GetSpriteBounds(PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType) { return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType].bounds; } diff --git a/src/openrct2/peep/PeepAnimationData.h b/src/openrct2/peep/PeepAnimationData.h index 4e593fb47d..16a2a20f2f 100644 --- a/src/openrct2/peep/PeepAnimationData.h +++ b/src/openrct2/peep/PeepAnimationData.h @@ -37,7 +37,7 @@ namespace OpenRCT2 }; const PeepAnimation& GetPeepAnimation( - PeepSpriteType spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); + PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); const SpriteBounds& GetSpriteBounds( - PeepSpriteType spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); + PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); } // namespace OpenRCT2 diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index f897784225..fc695f1609 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -509,7 +509,7 @@ namespace OpenRCT2::RCT1 } }; - enum class PeepSpriteType : uint8_t + enum class PeepAnimationGroup : uint8_t { Normal = 0, Handyman = 1, @@ -552,7 +552,7 @@ namespace OpenRCT2::RCT1 uint8_t OutsideOfPark; // 0x2A uint8_t State; // 0x2B uint8_t SubState; // 0x2C - PeepSpriteType SpriteType; // 0x2D + PeepAnimationGroup SpriteType; // 0x2D RCT12PeepType PeepType; // 0x2E union { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index d10ea4e38e..4ba1bd6374 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1298,7 +1298,7 @@ namespace OpenRCT2::RCT1 void ImportPeep(::Peep* dst, const RCT1::Peep* src) { // Peep vs. staff (including which kind) - dst->SpriteType = RCT1::GetPeepSpriteType(src->SpriteType); + dst->SpriteType = RCT1::GetPeepAnimationGroup(src->SpriteType); dst->Action = static_cast(src->Action); dst->SpecialSprite = src->SpecialSprite; dst->NextAnimationType = static_cast(src->NextAnimationType); diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index f53949886f..fafd5d7141 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -68,50 +68,50 @@ namespace OpenRCT2::RCT1 return map[colour]; } - ::PeepSpriteType GetPeepSpriteType(RCT1::PeepSpriteType rct1SpriteType) + ::PeepAnimationGroup GetPeepAnimationGroup(RCT1::PeepAnimationGroup rct1SpriteType) { - static constexpr ::PeepSpriteType map[] = + static constexpr ::PeepAnimationGroup map[] = { - ::PeepSpriteType::Normal, // 0x00 - ::PeepSpriteType::Handyman, // 0x01 - ::PeepSpriteType::Mechanic, // 0x02 - ::PeepSpriteType::Security, // 0x03 - ::PeepSpriteType::EntertainerPanda, // 0x04 - ::PeepSpriteType::EntertainerTiger, // 0x05 - ::PeepSpriteType::EntertainerElephant, // 0x06 - ::PeepSpriteType::EntertainerRoman, // 0x07 - ::PeepSpriteType::EntertainerGorilla, // 0x08 - ::PeepSpriteType::EntertainerSnowman, // 0x09 - ::PeepSpriteType::EntertainerKnight, // 0x0A - ::PeepSpriteType::EntertainerAstronaut, // 0x0B - ::PeepSpriteType::IceCream, // 0x0C - ::PeepSpriteType::Chips, // 0x0D - ::PeepSpriteType::Burger, // 0x0E - ::PeepSpriteType::Drink, // 0x0F - ::PeepSpriteType::Balloon, // 0x10 - ::PeepSpriteType::Candyfloss, // 0x11 - ::PeepSpriteType::Umbrella, // 0x12 - ::PeepSpriteType::Pizza, // 0x13 - ::PeepSpriteType::SecurityAlt, // 0x14 - ::PeepSpriteType::Popcorn, // 0x15 - ::PeepSpriteType::ArmsCrossed, // 0x16 - ::PeepSpriteType::HeadDown, // 0x17 - ::PeepSpriteType::Nauseous, // 0x18 - ::PeepSpriteType::VeryNauseous, // 0x19 - ::PeepSpriteType::RequireToilet, // 0x1A - ::PeepSpriteType::Hat, // 0x1B - ::PeepSpriteType::HotDog, // 0x1C - ::PeepSpriteType::Tentacle, // 0x1D - ::PeepSpriteType::ToffeeApple, // 0x1E - ::PeepSpriteType::Doughnut, // 0x1F - ::PeepSpriteType::Coffee, // 0x20 - ::PeepSpriteType::Chicken, // 0x21 - ::PeepSpriteType::Lemonade, // 0x22 + ::PeepAnimationGroup::Normal, // 0x00 + ::PeepAnimationGroup::Handyman, // 0x01 + ::PeepAnimationGroup::Mechanic, // 0x02 + ::PeepAnimationGroup::Security, // 0x03 + ::PeepAnimationGroup::EntertainerPanda, // 0x04 + ::PeepAnimationGroup::EntertainerTiger, // 0x05 + ::PeepAnimationGroup::EntertainerElephant, // 0x06 + ::PeepAnimationGroup::EntertainerRoman, // 0x07 + ::PeepAnimationGroup::EntertainerGorilla, // 0x08 + ::PeepAnimationGroup::EntertainerSnowman, // 0x09 + ::PeepAnimationGroup::EntertainerKnight, // 0x0A + ::PeepAnimationGroup::EntertainerAstronaut, // 0x0B + ::PeepAnimationGroup::IceCream, // 0x0C + ::PeepAnimationGroup::Chips, // 0x0D + ::PeepAnimationGroup::Burger, // 0x0E + ::PeepAnimationGroup::Drink, // 0x0F + ::PeepAnimationGroup::Balloon, // 0x10 + ::PeepAnimationGroup::Candyfloss, // 0x11 + ::PeepAnimationGroup::Umbrella, // 0x12 + ::PeepAnimationGroup::Pizza, // 0x13 + ::PeepAnimationGroup::SecurityAlt, // 0x14 + ::PeepAnimationGroup::Popcorn, // 0x15 + ::PeepAnimationGroup::ArmsCrossed, // 0x16 + ::PeepAnimationGroup::HeadDown, // 0x17 + ::PeepAnimationGroup::Nauseous, // 0x18 + ::PeepAnimationGroup::VeryNauseous, // 0x19 + ::PeepAnimationGroup::RequireToilet, // 0x1A + ::PeepAnimationGroup::Hat, // 0x1B + ::PeepAnimationGroup::HotDog, // 0x1C + ::PeepAnimationGroup::Tentacle, // 0x1D + ::PeepAnimationGroup::ToffeeApple, // 0x1E + ::PeepAnimationGroup::Doughnut, // 0x1F + ::PeepAnimationGroup::Coffee, // 0x20 + ::PeepAnimationGroup::Chicken, // 0x21 + ::PeepAnimationGroup::Lemonade, // 0x22 }; if (EnumValue(rct1SpriteType) >= std::size(map)) { LOG_WARNING("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1SpriteType)); - return ::PeepSpriteType::Normal; + return ::PeepAnimationGroup::Normal; } return map[EnumValue(rct1SpriteType)]; } diff --git a/src/openrct2/rct1/Tables.h b/src/openrct2/rct1/Tables.h index e5a6a1d05f..1be800d0ab 100644 --- a/src/openrct2/rct1/Tables.h +++ b/src/openrct2/rct1/Tables.h @@ -22,10 +22,10 @@ namespace OpenRCT2::RCT1 }; enum class RideType : uint8_t; - enum class PeepSpriteType : uint8_t; + enum class PeepAnimationGroup : uint8_t; colour_t GetColour(colour_t colour); - ::PeepSpriteType GetPeepSpriteType(PeepSpriteType rct1SpriteType); + ::PeepAnimationGroup GetPeepAnimationGroup(PeepAnimationGroup rct1SpriteType); uint8_t GetRideType(RideType rideType, VehicleType vehicleType); VehicleColourSchemeCopyDescriptor GetColourSchemeCopyDescriptor(VehicleType vehicleType); diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index a5e0f51d65..9fb31e903a 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1613,7 +1613,7 @@ namespace OpenRCT2::RCT2 dst->NextFlags = src->NextFlags; dst->State = static_cast(src->State); dst->SubState = src->SubState; - dst->SpriteType = static_cast(src->SpriteType); + dst->SpriteType = static_cast(src->SpriteType); dst->TshirtColour = src->TshirtColour; dst->TrousersColour = src->TrousersColour; dst->DestinationX = src->DestinationX; diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 6b823592ec..7ca6141417 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -116,22 +116,22 @@ namespace OpenRCT2::Scripting if (value == "handyman" && peep->AssignedStaffType != StaffType::Handyman) { peep->AssignedStaffType = StaffType::Handyman; - peep->SpriteType = PeepSpriteType::Handyman; + peep->SpriteType = PeepAnimationGroup::Handyman; } else if (value == "mechanic" && peep->AssignedStaffType != StaffType::Mechanic) { peep->AssignedStaffType = StaffType::Mechanic; - peep->SpriteType = PeepSpriteType::Mechanic; + peep->SpriteType = PeepAnimationGroup::Mechanic; } else if (value == "security" && peep->AssignedStaffType != StaffType::Security) { peep->AssignedStaffType = StaffType::Security; - peep->SpriteType = PeepSpriteType::Security; + peep->SpriteType = PeepAnimationGroup::Security; } else if (value == "entertainer" && peep->AssignedStaffType != StaffType::Entertainer) { peep->AssignedStaffType = StaffType::Entertainer; - peep->SpriteType = PeepSpriteType::EntertainerPanda; + peep->SpriteType = PeepAnimationGroup::EntertainerPanda; } // Reset state to walking to prevent invalid actions from carrying over @@ -157,35 +157,35 @@ namespace OpenRCT2::Scripting } } - static const DukEnumMap availableHandymanCostumes({ - { "handyman", PeepSpriteType::Handyman }, + static const DukEnumMap availableHandymanCostumes({ + { "handyman", PeepAnimationGroup::Handyman }, }); - static const DukEnumMap availableMechanicCostumes({ - { "mechanic", PeepSpriteType::Mechanic }, + static const DukEnumMap availableMechanicCostumes({ + { "mechanic", PeepAnimationGroup::Mechanic }, }); - static const DukEnumMap availableSecurityCostumes({ - { "security1", PeepSpriteType::Security }, - { "security2", PeepSpriteType::SecurityAlt }, + static const DukEnumMap availableSecurityCostumes({ + { "security1", PeepAnimationGroup::Security }, + { "security2", PeepAnimationGroup::SecurityAlt }, }); - static const DukEnumMap availableEntertainerCostumes({ - { "none", PeepSpriteType::Normal }, - { "panda", PeepSpriteType::EntertainerPanda }, - { "tiger", PeepSpriteType::EntertainerTiger }, - { "elephant", PeepSpriteType::EntertainerElephant }, - { "roman", PeepSpriteType::EntertainerRoman }, - { "gorilla", PeepSpriteType::EntertainerGorilla }, - { "snowman", PeepSpriteType::EntertainerSnowman }, - { "knight", PeepSpriteType::EntertainerKnight }, - { "astronaut", PeepSpriteType::EntertainerAstronaut }, - { "bandit", PeepSpriteType::EntertainerBandit }, - { "sheriff", PeepSpriteType::EntertainerSheriff }, - { "pirate", PeepSpriteType::EntertainerPirate }, + static const DukEnumMap availableEntertainerCostumes({ + { "none", PeepAnimationGroup::Normal }, + { "panda", PeepAnimationGroup::EntertainerPanda }, + { "tiger", PeepAnimationGroup::EntertainerTiger }, + { "elephant", PeepAnimationGroup::EntertainerElephant }, + { "roman", PeepAnimationGroup::EntertainerRoman }, + { "gorilla", PeepAnimationGroup::EntertainerGorilla }, + { "snowman", PeepAnimationGroup::EntertainerSnowman }, + { "knight", PeepAnimationGroup::EntertainerKnight }, + { "astronaut", PeepAnimationGroup::EntertainerAstronaut }, + { "bandit", PeepAnimationGroup::EntertainerBandit }, + { "sheriff", PeepAnimationGroup::EntertainerSheriff }, + { "pirate", PeepAnimationGroup::EntertainerPirate }, }); - static const DukEnumMap& costumesByStaffType(StaffType staffType) + static const DukEnumMap& costumesByStaffType(StaffType staffType) { switch (staffType) { @@ -259,7 +259,7 @@ namespace OpenRCT2::Scripting } else if (value.type() == DukValue::Type::NUMBER) { - auto newSpriteType = PeepSpriteType(value.as_uint() + EnumValue(PeepSpriteType::EntertainerPanda)); + auto newSpriteType = PeepAnimationGroup(value.as_uint() + EnumValue(PeepAnimationGroup::EntertainerPanda)); if (availableCostumes.find(newSpriteType) != availableCostumes.end()) { peep->SpriteType = newSpriteType; From 97acb793e81befb7951c6c18e0ee3c8c723bf048 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:53:43 +0200 Subject: [PATCH 11/12] Rename InteractionInfo::SpriteType to interactionType --- .../interface/ViewportInteraction.cpp | 54 +++++++++---------- src/openrct2-ui/interface/ViewportQuery.cpp | 12 ++--- src/openrct2-ui/ride/Construction.cpp | 2 +- src/openrct2-ui/scripting/CustomMenu.cpp | 2 +- src/openrct2-ui/windows/Footpath.cpp | 12 ++--- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2-ui/windows/LandRights.cpp | 2 +- src/openrct2-ui/windows/Ride.cpp | 10 ++-- src/openrct2-ui/windows/RideConstruction.cpp | 2 +- src/openrct2-ui/windows/Scenery.cpp | 12 ++--- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2-ui/windows/TrackDesignPlace.cpp | 2 +- src/openrct2-ui/windows/Water.cpp | 2 +- src/openrct2/drawing/LightFX.cpp | 2 +- src/openrct2/interface/Viewport.cpp | 12 +++-- src/openrct2/interface/Viewport.h | 2 +- 16 files changed, 67 insertions(+), 65 deletions(-) diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 2aced4a944..6337c700a9 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -87,22 +87,22 @@ namespace OpenRCT2::Ui screenCoords, EnumsToFlags( ViewportInteractionItem::Entity, ViewportInteractionItem::Ride, ViewportInteractionItem::ParkEntrance)); - auto tileElement = info.SpriteType != ViewportInteractionItem::Entity ? info.Element : nullptr; - // Only valid when info.SpriteType == ViewportInteractionItem::Entity, but can't assign nullptr without compiler + auto tileElement = info.interactionType != ViewportInteractionItem::Entity ? info.Element : nullptr; + // Only valid when info.interactionType == ViewportInteractionItem::Entity, but can't assign nullptr without compiler // complaining auto sprite = info.Entity; // Allows only balloons to be popped and ducks to be quacked in title screen if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) { - if (info.SpriteType == ViewportInteractionItem::Entity && (sprite->Is() || sprite->Is())) + if (info.interactionType == ViewportInteractionItem::Entity && (sprite->Is() || sprite->Is())) return info; - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Entity: switch (sprite->Type) @@ -113,7 +113,7 @@ namespace OpenRCT2::Ui if (vehicle != nullptr && !vehicle->IsCableLift()) vehicle->SetMapToolbar(); else - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; } break; case EntityType::Guest: @@ -126,7 +126,7 @@ namespace OpenRCT2::Ui } else { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; } } break; @@ -150,18 +150,18 @@ namespace OpenRCT2::Ui break; } default: - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; break; } // If nothing is under cursor, find a close by peep - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { auto peep = ViewportInteractionGetClosestPeep(screenCoords, 32); if (peep != nullptr) { info.Entity = peep; - info.SpriteType = ViewportInteractionItem::Entity; + info.interactionType = ViewportInteractionItem::Entity; info.Loc.x = peep->x; info.Loc.y = peep->y; PeepSetMapTooltip(peep); @@ -175,7 +175,7 @@ namespace OpenRCT2::Ui { auto info = ViewportInteractionGetItemLeft(screenCoords); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Entity: case ViewportInteractionItem::Ride: @@ -190,7 +190,7 @@ namespace OpenRCT2::Ui { auto info = ViewportInteractionGetItemLeft(screenCoords); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Entity: { @@ -275,21 +275,21 @@ namespace OpenRCT2::Ui info = GetMapCoordinatesFromPos(screenCoords, flags); auto tileElement = info.Element; - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Entity: { auto sprite = info.Entity; if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || sprite->Type != EntityType::Vehicle) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } auto vehicle = sprite->As(); if (vehicle == nullptr) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } ride = GetRide(vehicle->ride); @@ -306,19 +306,19 @@ namespace OpenRCT2::Ui { if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } if (tileElement->GetType() == TileElementType::Path) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } ride = GetRide(tileElement->GetRideIndex()); if (ride == nullptr) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } @@ -373,7 +373,7 @@ namespace OpenRCT2::Ui // FIXME: Why does it *2 the value? if (!GetGameState().Cheats.SandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 })) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } @@ -464,13 +464,13 @@ namespace OpenRCT2::Ui if (WindowFindByClass(WindowClass::RideConstruction) == nullptr && WindowFindByClass(WindowClass::Footpath) == nullptr) { - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } } auto ft = Formatter(); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Scenery: { @@ -533,7 +533,7 @@ namespace OpenRCT2::Ui break; } - info.SpriteType = ViewportInteractionItem::None; + info.interactionType = ViewportInteractionItem::None; return info; } @@ -541,7 +541,7 @@ namespace OpenRCT2::Ui { auto info = ViewportInteractionGetItemRight(screenCoords); - return info.SpriteType != ViewportInteractionItem::None; + return info.interactionType != ViewportInteractionItem::None; } /** @@ -553,7 +553,7 @@ namespace OpenRCT2::Ui CoordsXYE tileElement; auto info = ViewportInteractionGetItemRight(screenCoords); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::None: case ViewportInteractionItem::Terrain: @@ -791,14 +791,14 @@ namespace OpenRCT2::Ui window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); auto initialPos = info.Loc; - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { initialPos.SetNull(); return initialPos; } int16_t waterHeight = 0; - if (info.SpriteType == ViewportInteractionItem::Water) + if (info.interactionType == ViewportInteractionItem::Water) { waterHeight = info.Element->AsSurface()->GetWaterHeight(); } @@ -809,7 +809,7 @@ namespace OpenRCT2::Ui for (int32_t i = 0; i < 5; i++) { int16_t z = waterHeight; - if (info.SpriteType != ViewportInteractionItem::Water) + if (info.interactionType != ViewportInteractionItem::Water) { z = TileElementHeight(mapPos); } diff --git a/src/openrct2-ui/interface/ViewportQuery.cpp b/src/openrct2-ui/interface/ViewportQuery.cpp index 9b2e5efb70..b04bbdf6e6 100644 --- a/src/openrct2-ui/interface/ViewportQuery.cpp +++ b/src/openrct2-ui/interface/ViewportQuery.cpp @@ -42,12 +42,12 @@ namespace OpenRCT2::Ui } auto viewport = window->viewport; auto info = GetMapCoordinatesFromPosWindow(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Footpath)); - if (info.SpriteType != ViewportInteractionItem::Footpath + if (info.interactionType != ViewportInteractionItem::Footpath || !(viewport->flags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_VERTICAL))) { info = GetMapCoordinatesFromPosWindow( window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath)); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { auto position = info.Loc; position.SetNull(); @@ -60,7 +60,7 @@ namespace OpenRCT2::Ui auto myTileElement = info.Element; auto position = info.Loc.ToTileCentre(); auto z = 0; - if (info.SpriteType == ViewportInteractionItem::Footpath) + if (info.interactionType == ViewportInteractionItem::Footpath) { z = myTileElement->GetBaseZ(); if (myTileElement->AsPath()->IsSloped()) @@ -73,7 +73,7 @@ namespace OpenRCT2::Ui for (int32_t i = 0; i < 5; i++) { - if (info.SpriteType != ViewportInteractionItem::Footpath) + if (info.interactionType != ViewportInteractionItem::Footpath) { z = TileElementHeight(position); } @@ -141,7 +141,7 @@ namespace OpenRCT2::Ui auto viewport = window->viewport; auto info = GetMapCoordinatesFromPosWindow(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); *tileElement = info.Element; - if (info.SpriteType == ViewportInteractionItem::Ride + if (info.interactionType == ViewportInteractionItem::Ride && viewport->flags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_VERTICAL) && (*tileElement)->GetType() == TileElementType::Entrance) { @@ -160,7 +160,7 @@ namespace OpenRCT2::Ui info = GetMapCoordinatesFromPosWindow( window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath, ViewportInteractionItem::Ride)); - if (info.SpriteType == ViewportInteractionItem::Ride && (*tileElement)->GetType() == TileElementType::Entrance) + if (info.interactionType == ViewportInteractionItem::Ride && (*tileElement)->GetType() == TileElementType::Entrance) { uint32_t directions = (*tileElement)->AsEntrance()->GetDirections(); if (directions & 0x0F) diff --git a/src/openrct2-ui/ride/Construction.cpp b/src/openrct2-ui/ride/Construction.cpp index 3301d10089..9362432430 100644 --- a/src/openrct2-ui/ride/Construction.cpp +++ b/src/openrct2-ui/ride/Construction.cpp @@ -117,7 +117,7 @@ namespace OpenRCT2 gRideEntranceExitPlaceDirection = INVALID_DIRECTION; // determine if the mouse is hovering over a station - that's the station to add the entrance to auto info = GetMapCoordinatesFromPos(screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); - if (info.SpriteType != ViewportInteractionItem::None) + if (info.interactionType != ViewportInteractionItem::None) { if (info.Element->GetType() == TileElementType::Track) { diff --git a/src/openrct2-ui/scripting/CustomMenu.cpp b/src/openrct2-ui/scripting/CustomMenu.cpp index 66ca49e3a8..8fc255c519 100644 --- a/src/openrct2-ui/scripting/CustomMenu.cpp +++ b/src/openrct2-ui/scripting/CustomMenu.cpp @@ -195,7 +195,7 @@ namespace OpenRCT2::Scripting obj.Set("screenCoords", ToDuk(ctx, screenCoords)); obj.Set("mapCoords", ToDuk(ctx, info.Loc)); - if (info.SpriteType == ViewportInteractionItem::Entity && info.Entity != nullptr) + if (info.interactionType == ViewportInteractionItem::Entity && info.Entity != nullptr) { obj.Set("entityId", info.Entity->Id.ToUnderlying()); } diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 364233be15..76102abbfd 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -817,7 +817,7 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::LargeScenery); auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); - if (info.SpriteType != ViewportInteractionItem::None) + if (info.interactionType != ViewportInteractionItem::None) { const bool allowInvalidHeights = GetGameState().Cheats.AllowTrackPlaceInvalidHeights; const auto heightStep = kCoordsZStep * (!allowInvalidHeights ? 2 : 1); @@ -872,7 +872,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos( screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath)); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) return std::nullopt; mapCoords = info.Loc; @@ -918,14 +918,14 @@ namespace OpenRCT2::Ui::Windows int32_t FootpathGetSlopeFromInfo(const InteractionInfo& info) { - if (info.SpriteType == ViewportInteractionItem::None || info.Element == nullptr) + if (info.interactionType == ViewportInteractionItem::None || info.Element == nullptr) { gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; FootpathUpdateProvisional(); return kTileSlopeFlat; } - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Terrain: { @@ -959,12 +959,12 @@ namespace OpenRCT2::Ui::Windows int32_t FootpathGetBaseZFromInfo(const InteractionInfo& info) { - if (info.SpriteType == ViewportInteractionItem::None || info.Element == nullptr) + if (info.interactionType == ViewportInteractionItem::None || info.Element == nullptr) { return 0; } - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Terrain: { diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 876a9daa62..c9b3f14064 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -945,7 +945,7 @@ namespace OpenRCT2::Ui::Windows gPickupPeepImage = ImageId(); auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionItemAll); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) return; gPickupPeepX = screenCoords.x - 1; diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index bff45669c1..d7b4624959 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -462,7 +462,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos( screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { if (_landRightsCost != kMoney64Undefined) { diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 4add6c1aee..dd9fb3a759 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -4205,7 +4205,7 @@ namespace OpenRCT2::Ui::Windows auto newColourScheme = static_cast(_rideColour); auto info = GetMapCoordinatesFromPos(screenPos, EnumsToFlags(ViewportInteractionItem::Ride)); - if (info.SpriteType != ViewportInteractionItem::Ride) + if (info.interactionType != ViewportInteractionItem::Ride) return; if (info.Element->GetType() != TileElementType::Track) return; @@ -5554,14 +5554,14 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::Scenery, ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery); auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Scenery: case ViewportInteractionItem::LargeScenery: case ViewportInteractionItem::Wall: case ViewportInteractionItem::Footpath: _collectTrackDesignScenery = !TrackDesignSaveContainsTileElement(info.Element); - TrackDesignSaveSelectTileElement(info.SpriteType, info.Loc, info.Element, _collectTrackDesignScenery); + TrackDesignSaveSelectTileElement(info.interactionType, info.Loc, info.Element, _collectTrackDesignScenery); break; default: break; @@ -5579,13 +5579,13 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::Scenery, ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery); auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Scenery: case ViewportInteractionItem::LargeScenery: case ViewportInteractionItem::Wall: case ViewportInteractionItem::Footpath: - TrackDesignSaveSelectTileElement(info.SpriteType, info.Loc, info.Element, _collectTrackDesignScenery); + TrackDesignSaveSelectTileElement(info.interactionType, info.Loc, info.Element, _collectTrackDesignScenery); break; default: break; diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 2a5edf8361..2eb950856b 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -2928,7 +2928,7 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::Label, ViewportInteractionItem::Banner); auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); - if (info.SpriteType != ViewportInteractionItem::None) + if (info.interactionType != ViewportInteractionItem::None) { _trackPlaceCtrlZ = info.Element->GetBaseZ(); _trackPlaceCtrlState = true; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 91b67b5794..7af4b72184 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -2204,7 +2204,7 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::Scenery, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery, ViewportInteractionItem::Banner); auto info = GetMapCoordinatesFromPos(screenCoords, flag); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Scenery: { @@ -2281,7 +2281,7 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::Scenery, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery, ViewportInteractionItem::Banner, ViewportInteractionItem::PathAddition); auto info = GetMapCoordinatesFromPos(screenCoords, flag); - switch (info.SpriteType) + switch (info.interactionType) { case ViewportInteractionItem::Scenery: { @@ -2374,7 +2374,7 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::LargeScenery); auto info = GetMapCoordinatesFromPos(screenPos, flag); - if (info.SpriteType != ViewportInteractionItem::None) + if (info.interactionType != ViewportInteractionItem::None) { gSceneryCtrlPressed = true; gSceneryCtrlPressZ = info.Element->GetBaseZ(); @@ -2551,7 +2551,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos(screenPos, flag); gridPos = info.Loc; - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { gridPos.SetNull(); return; @@ -2644,7 +2644,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos(screenPos, flag); gridPos = info.Loc; - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { gridPos.SetNull(); return; @@ -2868,7 +2868,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos(screenPos, flag); gridPos = info.Loc; - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { gridPos.SetNull(); return; diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 046c4d2600..82d5fee932 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -669,7 +669,7 @@ namespace OpenRCT2::Ui::Windows gPickupPeepImage = ImageId(); auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionItemAll); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) return; gPickupPeepX = screenCoords.x - 1; diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index c959902eee..8d3d9e29b0 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -464,7 +464,7 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery); auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); - if (info.SpriteType == ViewportInteractionItem::Terrain) + if (info.interactionType == ViewportInteractionItem::Terrain) { _trackPlaceCtrlZ = Floor2(surfaceElement->GetBaseZ(), kCoordsZStep); diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index a1c0e62472..93fe35e0f5 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -328,7 +328,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos( screenPos, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { if (_waterToolRaiseCost != kMoney64Undefined || _waterToolLowerCost != kMoney64Undefined) { diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index 7143cb1827..8c87d4082f 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -316,7 +316,7 @@ void LightFXPrepareLightList() mapCoord = info.Loc; mapCoord.x += tileOffsetX; mapCoord.y += tileOffsetY; - interactionType = info.SpriteType; + interactionType = info.interactionType; tileElement = info.Element; } diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 2057b4b3f2..dc2642b5db 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -69,7 +69,7 @@ InteractionInfo::InteractionInfo(const PaintStruct* ps) : Loc(ps->MapPos) , Element(ps->Element) , Entity(ps->Entity) - , SpriteType(ps->InteractionItem) + , interactionType(ps->InteractionItem) { } @@ -1561,7 +1561,7 @@ VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlag /** * Checks if a PaintStruct sprite type is in the filter mask. */ -static bool PSSpriteTypeIsInFilter(PaintStruct* ps, uint16_t filter) +static bool PSInteractionTypeIsInFilter(PaintStruct* ps, uint16_t filter) { if (ps->InteractionItem != ViewportInteractionItem::None && ps->InteractionItem != ViewportInteractionItem::Label && ps->InteractionItem <= ViewportInteractionItem::Banner) @@ -1745,7 +1745,8 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32 ps = next_ps; if (IsSpriteInteractedWith(session->DPI, ps->image_id, ps->ScreenPos)) { - if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) == VisibilityKind::Visible) + if (PSInteractionTypeIsInFilter(ps, filter) + && GetPaintStructVisibility(ps, viewFlags) == VisibilityKind::Visible) { info = { ps }; } @@ -1759,7 +1760,8 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32 { if (IsSpriteInteractedWith(session->DPI, attached_ps->image_id, ps->ScreenPos + attached_ps->RelativePos)) { - if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) == VisibilityKind::Visible) + if (PSInteractionTypeIsInFilter(ps, filter) + && GetPaintStructVisibility(ps, viewFlags) == VisibilityKind::Visible) { info = { ps }; } @@ -1911,7 +1913,7 @@ std::optional ScreenGetMapXY(const ScreenCoordsXY& screenCoords, Viewp } auto myViewport = window->viewport; auto info = GetMapCoordinatesFromPosWindow(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain)); - if (info.SpriteType == ViewportInteractionItem::None) + if (info.interactionType == ViewportInteractionItem::None) { return std::nullopt; } diff --git a/src/openrct2/interface/Viewport.h b/src/openrct2/interface/Viewport.h index 75883321d0..087eaf9f48 100644 --- a/src/openrct2/interface/Viewport.h +++ b/src/openrct2/interface/Viewport.h @@ -112,7 +112,7 @@ struct InteractionInfo CoordsXY Loc; TileElement* Element{}; EntityBase* Entity{}; - ViewportInteractionItem SpriteType = ViewportInteractionItem::None; + ViewportInteractionItem interactionType = ViewportInteractionItem::None; }; constexpr int32_t kMaxViewportCount = kWindowLimitMax; From 584f6b866102e2522b2e877c6144af81650e8c53 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 22 Sep 2024 16:54:33 +0200 Subject: [PATCH 12/12] Rename Peep::SpriteType to AnimationGroup --- src/openrct2-ui/windows/GameBottomToolbar.cpp | 2 +- src/openrct2-ui/windows/Guest.cpp | 4 +- src/openrct2-ui/windows/News.cpp | 2 +- src/openrct2-ui/windows/Staff.cpp | 8 +-- src/openrct2-ui/windows/StaffList.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/CheatSetAction.cpp | 6 +- src/openrct2/actions/StaffHireNewAction.cpp | 2 +- .../actions/StaffSetCostumeAction.cpp | 2 +- src/openrct2/entity/Guest.cpp | 62 +++++++++---------- src/openrct2/entity/Guest.h | 4 +- src/openrct2/entity/Peep.cpp | 40 ++++++------ src/openrct2/entity/Peep.h | 4 +- src/openrct2/entity/Staff.cpp | 15 ++--- src/openrct2/park/ParkFile.cpp | 2 +- src/openrct2/peep/PeepAnimationData.cpp | 8 +-- src/openrct2/peep/PeepAnimationData.h | 4 +- src/openrct2/rct1/RCT1.h | 20 +++--- src/openrct2/rct1/S4Importer.cpp | 4 +- src/openrct2/rct1/Tables.cpp | 8 +-- src/openrct2/rct1/Tables.h | 2 +- src/openrct2/rct2/RCT2.h | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- src/openrct2/ride/Vehicle.cpp | 12 ++-- .../scripting/bindings/entity/ScGuest.cpp | 14 ++--- .../scripting/bindings/entity/ScStaff.cpp | 30 ++++----- 26 files changed, 132 insertions(+), 131 deletions(-) diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index 1fc1ca261e..6b2d74fd8f 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -285,7 +285,7 @@ namespace OpenRCT2::Ui::Windows clipCoords.y += 3; } - uint32_t image_id_base = GetPeepAnimation(peep->SpriteType).base_image; + uint32_t image_id_base = GetPeepAnimation(peep->AnimationGroup).base_image; image_id_base += frame_no & 0xFFFFFFFC; image_id_base++; diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index c9b3f14064..a3f9bcf874 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -555,7 +555,7 @@ namespace OpenRCT2::Ui::Windows return; } - int32_t animationFrame = GetPeepAnimation(peep->SpriteType).base_image + 1; + int32_t animationFrame = GetPeepAnimation(peep->AnimationGroup).base_image + 1; int32_t animationFrameOffset = 0; @@ -957,7 +957,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(peep->SpriteType, PeepAnimationType::Hanging).base_image; + auto baseImageId = GetPeepAnimation(peep->AnimationGroup, PeepAnimationType::Hanging).base_image; baseImageId += picked_peep_frame >> 2; gPickupPeepImage = ImageId(baseImageId, peep->TshirtColour, peep->TrousersColour); } diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 76a5a31583..e07083b641 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -255,7 +255,7 @@ namespace OpenRCT2::Ui::Windows auto* staff = peep->As(); if (staff != nullptr) { - spriteType = staff->SpriteType; + spriteType = staff->AnimationGroup; if (staff->AssignedStaffType == StaffType::Entertainer) { clipCoords.y += 3; diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 82d5fee932..1514ffed2b 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -575,7 +575,7 @@ namespace OpenRCT2::Ui::Windows if (staff->Is() && staff->AssignedStaffType == StaffType::Entertainer) screenCoords.y++; - int32_t imageIndex = GetPeepAnimation(staff->SpriteType).base_image + 1; + int32_t imageIndex = GetPeepAnimation(staff->AnimationGroup).base_image + 1; int32_t offset = 0; @@ -681,7 +681,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(staff->SpriteType, PeepAnimationType::Hanging).base_image; + auto baseImageId = GetPeepAnimation(staff->AnimationGroup, PeepAnimationType::Hanging).base_image; baseImageId += picked_peep_frame >> 2; gPickupPeepImage = ImageId(baseImageId, staff->TshirtColour, staff->TrousersColour); } @@ -776,7 +776,7 @@ namespace OpenRCT2::Ui::Windows for (int32_t i = 0; i < numCostumes; i++) { EntertainerCostume costume = _availableCostumes[i]; - if (staff->SpriteType == EntertainerCostumeToSprite(costume)) + if (staff->AnimationGroup == EntertainerCostumeToSprite(costume)) { checkedIndex = i; } @@ -831,7 +831,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_COSTUME_BTN].type = WindowWidgetType::Button; // TODO: retrieve string from object instead - auto costumeType = EnumValue(staff->SpriteType) - EnumValue(PeepAnimationGroup::EntertainerPanda); + auto costumeType = EnumValue(staff->AnimationGroup) - EnumValue(PeepAnimationGroup::EntertainerPanda); if (costumeType >= 0) widgets[WIDX_COSTUME_BOX].text = StaffCostumeNames[costumeType]; else diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index c76ae9ff53..26bac9eb69 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -456,7 +456,7 @@ namespace OpenRCT2::Ui::Windows } else { - GfxDrawSprite(dpi, ImageId(GetEntertainerCostumeSprite(peep->SpriteType)), { staffOrderIcon_x, y }); + GfxDrawSprite(dpi, ImageId(GetEntertainerCostumeSprite(peep->AnimationGroup)), { staffOrderIcon_x, y }); } } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index aa597ec132..9d9d65f4a1 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -265,7 +265,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, NextFlags); COMPARE_FIELD(Peep, State); COMPARE_FIELD(Peep, SubState); - COMPARE_FIELD(Peep, SpriteType); + COMPARE_FIELD(Peep, AnimationGroup); COMPARE_FIELD(Peep, TshirtColour); COMPARE_FIELD(Peep, TrousersColour); COMPARE_FIELD(Peep, DestinationX); diff --git a/src/openrct2/actions/CheatSetAction.cpp b/src/openrct2/actions/CheatSetAction.cpp index 48713bb26e..a5eb906970 100644 --- a/src/openrct2/actions/CheatSetAction.cpp +++ b/src/openrct2/actions/CheatSetAction.cpp @@ -669,7 +669,7 @@ void CheatSetAction::SetGuestParameter(int32_t parameter, int32_t value) const peep->Intensity = IntensityRange(value, 15); break; } - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); } } @@ -688,12 +688,12 @@ void CheatSetAction::GiveObjectToGuests(int32_t object) const case OBJECT_BALLOON: peep->GiveItem(ShopItem::Balloon); peep->BalloonColour = ScenarioRandMax(COLOUR_NUM_NORMAL); - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); break; case OBJECT_UMBRELLA: peep->GiveItem(ShopItem::Umbrella); peep->UmbrellaColour = ScenarioRandMax(COLOUR_NUM_NORMAL); - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); break; } } diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 717984edd7..1fb573abd8 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -169,7 +169,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const spriteType = EntertainerCostumeToSprite(_entertainerType); } newPeep->Name = nullptr; - newPeep->SpriteType = spriteType; + newPeep->AnimationGroup = spriteType; const SpriteBounds* spriteBounds = &GetSpriteBounds(spriteType); newPeep->SpriteData.Width = spriteBounds->sprite_width; diff --git a/src/openrct2/actions/StaffSetCostumeAction.cpp b/src/openrct2/actions/StaffSetCostumeAction.cpp index b59c0757b2..5d598e1301 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.cpp +++ b/src/openrct2/actions/StaffSetCostumeAction.cpp @@ -98,7 +98,7 @@ GameActions::Result StaffSetCostumeAction::Execute() const } auto spriteType = EntertainerCostumeToSprite(_costume); - staff->SpriteType = spriteType; + staff->AnimationGroup = spriteType; staff->PeepFlags &= ~PEEP_FLAGS_SLOW_WALK; if (peep_slow_walking_types[EnumValue(spriteType)]) { diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 47208e8ff0..6cac0b9c92 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -539,7 +539,7 @@ void Guest::GivePassingPeepsIceCream(Guest* passingPeep) return; passingPeep->GiveItem(ShopItem::IceCream); - passingPeep->UpdateSpriteType(); + passingPeep->UpdateAnimationGroup(); } /** @@ -826,7 +826,7 @@ void Guest::UpdateConsumptionMotives() } WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; - UpdateSpriteType(); + UpdateAnimationGroup(); } } } @@ -984,7 +984,7 @@ void Guest::Tick128UpdateGuest(uint32_t index) if (!(PeepFlags & PEEP_FLAGS_ANIMATION_FROZEN)) { - UpdateSpriteType(); + UpdateAnimationGroup(); } if (State == PeepState::OnRide || State == PeepState::EnteringRide) @@ -1308,7 +1308,7 @@ void Guest::UpdateSitting() return; } - if (SpriteType == PeepAnimationGroup::Umbrella) + if (AnimationGroup == PeepAnimationGroup::Umbrella) { TryGetUpFromSitting(); return; @@ -1334,7 +1334,7 @@ void Guest::UpdateSitting() TryGetUpFromSitting(); return; } - if (SpriteType == PeepAnimationGroup::Balloon || SpriteType == PeepAnimationGroup::Hat) + if (AnimationGroup == PeepAnimationGroup::Balloon || AnimationGroup == PeepAnimationGroup::Hat) { TryGetUpFromSitting(); return; @@ -1669,7 +1669,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) Photo4RideRef = ride.id; WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; - UpdateSpriteType(); + UpdateAnimationGroup(); if (PeepFlags & PEEP_FLAGS_TRACKING) { auto ft = Formatter(); @@ -5374,7 +5374,7 @@ void Guest::UpdateWalking() } WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; - UpdateSpriteType(); + UpdateAnimationGroup(); const auto loc = GetLocation(); int32_t litterX = loc.x + (ScenarioRand() & 0x7) - 3; @@ -5632,7 +5632,7 @@ void Guest::UpdateQueuing() PerformNextAction(pathingResult); if (!IsActionInterruptable()) return; - if (SpriteType == PeepAnimationGroup::Normal) + if (AnimationGroup == PeepAnimationGroup::Normal) { if (TimeInQueue >= 2000 && (0xFFFF & ScenarioRand()) <= 119) { @@ -5652,7 +5652,7 @@ void Guest::UpdateQueuing() { if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextAnimationType == PeepAnimationType::WatchRide) { - switch (SpriteType) + switch (AnimationGroup) { case PeepAnimationGroup::IceCream: case PeepAnimationGroup::Chips: @@ -5795,7 +5795,7 @@ void Guest::UpdateWatching() SubState++; TimeToStand = std::clamp(((129 - Energy) * 16 + 50) / 2, 0, 255); - UpdateSpriteType(); + UpdateAnimationGroup(); } else if (SubState == 1) { @@ -5853,7 +5853,7 @@ void Guest::UpdateWatching() return; SetState(PeepState::Walking); - UpdateSpriteType(); + UpdateAnimationGroup(); // Send peep to the centre of current tile. auto destination = GetLocation().ToTileCentre(); @@ -5943,7 +5943,7 @@ void Guest::UpdateUsingBin() spaceLeftInBin--; RemoveItem(item); WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; - UpdateSpriteType(); + UpdateAnimationGroup(); continue; } @@ -5956,7 +5956,7 @@ void Guest::UpdateUsingBin() RemoveItem(item); WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; - UpdateSpriteType(); + UpdateAnimationGroup(); } uint8_t additionStatus = foundElement->GetAdditionStatus(); @@ -6732,12 +6732,12 @@ static bool PeepFindRideToLookAt(Peep* peep, uint8_t edge, RideId* rideToView, u } /* Part of 0x0069B8CC rct2: 0x0069BC31 */ -void Guest::SetSpriteType(PeepAnimationGroup new_sprite_type) +void Guest::SetAnimationGroup(PeepAnimationGroup new_sprite_type) { - if (SpriteType == new_sprite_type) + if (AnimationGroup == new_sprite_type) return; - SpriteType = new_sprite_type; + AnimationGroup = new_sprite_type; AnimationImageIdOffset = 0; WalkingAnimationFrameNum = 0; @@ -6745,8 +6745,8 @@ void Guest::SetSpriteType(PeepAnimationGroup new_sprite_type) Action = PeepActionType::Walking; PeepFlags &= ~PEEP_FLAGS_SLOW_WALK; - Guard::Assert(EnumValue(new_sprite_type) < std::size(gSpriteTypeToSlowWalkMap)); - if (gSpriteTypeToSlowWalkMap[EnumValue(new_sprite_type)]) + Guard::Assert(EnumValue(new_sprite_type) < std::size(gAnimationGroupToSlowWalkMap)); + if (gAnimationGroupToSlowWalkMap[EnumValue(new_sprite_type)]) { PeepFlags |= PEEP_FLAGS_SLOW_WALK; } @@ -6814,9 +6814,9 @@ static ItemPref item_order_preference[] = { * * rct2: 0x0069B8CC */ -void Guest::UpdateSpriteType() +void Guest::UpdateAnimationGroup() { - if (SpriteType == PeepAnimationGroup::Balloon && (ScenarioRand() & 0xFFFF) <= 327) + if (AnimationGroup == PeepAnimationGroup::Balloon && (ScenarioRand() & 0xFFFF) <= 327) { bool isBalloonPopped = false; if (x != kLocationNull) @@ -6848,7 +6848,7 @@ void Guest::UpdateSpriteType() if (tileElement->IsLastForTile()) { - SetSpriteType(PeepAnimationGroup::Umbrella); + SetAnimationGroup(PeepAnimationGroup::Umbrella); return; } tileElement++; @@ -6860,48 +6860,48 @@ void Guest::UpdateSpriteType() { if (HasItem(itemPref.item)) { - SetSpriteType(itemPref.sprite_type); + SetAnimationGroup(itemPref.sprite_type); return; } } if (State == PeepState::Watching && StandingFlags & (1 << 1)) { - SetSpriteType(PeepAnimationGroup::Watching); + SetAnimationGroup(PeepAnimationGroup::Watching); return; } if (Nausea > 170) { - SetSpriteType(PeepAnimationGroup::VeryNauseous); + SetAnimationGroup(PeepAnimationGroup::VeryNauseous); return; } if (Nausea > 140) { - SetSpriteType(PeepAnimationGroup::Nauseous); + SetAnimationGroup(PeepAnimationGroup::Nauseous); return; } if (Energy <= 64 && Happiness < 128) { - SetSpriteType(PeepAnimationGroup::HeadDown); + SetAnimationGroup(PeepAnimationGroup::HeadDown); return; } if (Energy <= 80 && Happiness < 128) { - SetSpriteType(PeepAnimationGroup::ArmsCrossed); + SetAnimationGroup(PeepAnimationGroup::ArmsCrossed); return; } if (Toilet > 220) { - SetSpriteType(PeepAnimationGroup::RequireToilet); + SetAnimationGroup(PeepAnimationGroup::RequireToilet); return; } - SetSpriteType(PeepAnimationGroup::Normal); + SetAnimationGroup(PeepAnimationGroup::Normal); } bool Guest::HeadingForRideOrParkExit() const @@ -7119,7 +7119,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) auto& gameState = GetGameState(); Guest* peep = CreateEntity(); - peep->SpriteType = PeepAnimationGroup::Normal; + peep->AnimationGroup = PeepAnimationGroup::Normal; peep->OutsideOfPark = true; peep->State = PeepState::Falling; peep->Action = PeepActionType::Walking; @@ -7131,7 +7131,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->FavouriteRide = RideId::GetNull(); peep->FavouriteRideRating = 0; - const SpriteBounds* spriteBounds = &GetSpriteBounds(peep->SpriteType, peep->AnimationType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(peep->AnimationGroup, peep->AnimationType); peep->SpriteData.Width = spriteBounds->sprite_width; peep->SpriteData.HeightMin = spriteBounds->sprite_height_negative; peep->SpriteData.HeightMax = spriteBounds->sprite_height_positive; diff --git a/src/openrct2/entity/Guest.h b/src/openrct2/entity/Guest.h index a232e80d6d..330aeb1b39 100644 --- a/src/openrct2/entity/Guest.h +++ b/src/openrct2/entity/Guest.h @@ -329,7 +329,7 @@ public: bool HasEmptyContainer() const; void OnEnterRide(Ride& ride); void OnExitRide(Ride& ride); - void UpdateSpriteType(); + void UpdateAnimationGroup(); bool HeadingForRideOrParkExit() const; void StopPurchaseThought(ride_type_t rideType); void TryGetUpFromSitting(); @@ -354,7 +354,7 @@ public: void CheckCantFindRide(); void CheckCantFindExit(); bool DecideAndBuyItem(Ride& ride, ShopItem shopItem, money64 price); - void SetSpriteType(PeepAnimationGroup new_sprite_type); + void SetAnimationGroup(PeepAnimationGroup new_sprite_type); void HandleEasterEggName(); int32_t GetEasterEggNameId() const; void UpdateEasterEggInteractions(); diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 4786e00217..dfa1e02bb4 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -77,13 +77,13 @@ static std::shared_ptr _crowdSoundChannel = nullptr; static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height); -static PeepAnimationType PeepSpecialSpriteToSpriteTypeMap[] = { +static PeepAnimationType PeepSpecialSpriteToAnimationGroupMap[] = { PeepAnimationType::None, PeepAnimationType::HoldMat, PeepAnimationType::StaffMower, }; -static PeepAnimationType PeepActionToSpriteTypeMap[] = { +static PeepAnimationType PeepActionToAnimationGroupMap[] = { PeepAnimationType::CheckTime, PeepAnimationType::EatFood, PeepAnimationType::ShakeHead, @@ -117,7 +117,7 @@ static PeepAnimationType PeepActionToSpriteTypeMap[] = { PeepAnimationType::WithdrawMoney, }; -const bool gSpriteTypeToSlowWalkMap[] = { +const bool gAnimationGroupToSlowWalkMap[] = { false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, true, true, true, true, false, true, false, true, true, true, false, false, true, true, false, false, true, true, true, true, true, true, true, false, true, false, true, true, true, true, true, true, true, @@ -318,17 +318,17 @@ PeepAnimationType Peep::GetAnimationType() { if (IsActionInterruptable()) { // PeepActionType::None1 or PeepActionType::None2 - return PeepSpecialSpriteToSpriteTypeMap[SpecialSprite]; + return PeepSpecialSpriteToAnimationGroupMap[SpecialSprite]; } - if (EnumValue(Action) < std::size(PeepActionToSpriteTypeMap)) + if (EnumValue(Action) < std::size(PeepActionToAnimationGroupMap)) { - return PeepActionToSpriteTypeMap[EnumValue(Action)]; + return PeepActionToAnimationGroupMap[EnumValue(Action)]; } Guard::Assert( - EnumValue(Action) >= std::size(PeepActionToSpriteTypeMap) && Action < PeepActionType::Idle, "Invalid peep action %u", - EnumValue(Action)); + EnumValue(Action) >= std::size(PeepActionToAnimationGroupMap) && Action < PeepActionType::Idle, + "Invalid peep action %u", EnumValue(Action)); return PeepAnimationType::None; } @@ -337,7 +337,7 @@ PeepAnimationType Peep::GetAnimationType() */ void Peep::UpdateCurrentAnimationType() { - if (EnumValue(SpriteType) >= EnumValue(PeepAnimationGroup::Count)) + if (EnumValue(AnimationGroup) >= EnumValue(PeepAnimationGroup::Count)) { return; } @@ -356,7 +356,7 @@ void Peep::UpdateSpriteBoundingBox() { Invalidate(); - const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, AnimationType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(AnimationGroup, AnimationType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -451,7 +451,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) bool Peep::UpdateActionAnimation() { - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType); + const PeepAnimation& peepAnimation = GetPeepAnimation(AnimationGroup, AnimationType); AnimationFrameNum++; // If last frame of action @@ -510,7 +510,7 @@ std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, void Peep::UpdateWalkingAnimation() { WalkingAnimationFrameNum++; - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType); + const PeepAnimation& peepAnimation = GetPeepAnimation(AnimationGroup, AnimationType); if (WalkingAnimationFrameNum >= peepAnimation.frame_offsets.size()) { WalkingAnimationFrameNum = 0; @@ -1709,7 +1709,7 @@ void Peep::SwitchNextAnimationType() { Invalidate(); AnimationType = NextAnimationType; - const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, NextAnimationType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(AnimationGroup, NextAnimationType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -2739,11 +2739,11 @@ static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height) { peep->RemoveItem(ShopItem::Balloon); - if (peep->SpriteType == PeepAnimationGroup::Balloon && peep->x != kLocationNull) + if (peep->AnimationGroup == PeepAnimationGroup::Balloon && peep->x != kLocationNull) { Balloon::Create({ peep->x, peep->y, spawn_height }, peep->BalloonColour, false); peep->WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); } } } @@ -2790,7 +2790,7 @@ void Peep::Serialise(DataSerialiser& stream) stream << NextFlags; stream << State; stream << SubState; - stream << SpriteType; + stream << AnimationGroup; stream << TshirtColour; stream << TrousersColour; stream << DestinationX; @@ -2859,21 +2859,21 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const return; } - PeepAnimationType actionSpriteType = AnimationType; + PeepAnimationType actionAnimationGroup = AnimationType; uint8_t imageOffset = AnimationImageIdOffset; if (Action == PeepActionType::Idle) { - actionSpriteType = NextAnimationType; + actionAnimationGroup = NextAnimationType; imageOffset = 0; } // In the following 4 calls to PaintAddImageAsParent/PaintAddImageAsChild, we add 5 (instead of 3) to the // bound_box_offset_z to make sure peeps are drawn on top of railways - uint32_t baseImageId = GetPeepAnimation(SpriteType, actionSpriteType).base_image; + uint32_t baseImageId = GetPeepAnimation(AnimationGroup, actionAnimationGroup).base_image; // Offset frame onto the base image, using rotation except for the 'picked up' state - if (actionSpriteType != PeepAnimationType::Hanging) + if (actionAnimationGroup != PeepAnimationType::Hanging) baseImageId += (imageDirection >> 3) + imageOffset * 4; else baseImageId += imageOffset; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 106c86e213..35a7d84842 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -322,7 +322,7 @@ struct Peep : EntityBase PeepRideSubState RideSubState; PeepUsingBinSubState UsingBinSubState; }; - PeepAnimationGroup SpriteType; + PeepAnimationGroup AnimationGroup; uint8_t TshirtColour; uint8_t TrousersColour; uint16_t DestinationX; // Location that the peep is trying to get to @@ -441,7 +441,7 @@ enum PATHING_RIDE_ENTRANCE = 1 << 3, }; -extern const bool gSpriteTypeToSlowWalkMap[48]; +extern const bool gAnimationGroupToSlowWalkMap[48]; int32_t PeepGetStaffCount(); void PeepUpdateAll(); diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index d341fd1e22..4cdbb2daa9 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -961,8 +961,9 @@ int32_t Staff::GetHireDate() const PeepAnimationGroup EntertainerCostumeToSprite(EntertainerCostume entertainerType) { uint8_t value = static_cast(entertainerType); - PeepAnimationGroup newSpriteType = static_cast(value + EnumValue(PeepAnimationGroup::EntertainerPanda)); - return newSpriteType; + PeepAnimationGroup newAnimationGroup = static_cast( + value + EnumValue(PeepAnimationGroup::EntertainerPanda)); + return newAnimationGroup; } colour_t StaffGetColour(StaffType staffType) @@ -1691,21 +1692,21 @@ void Staff::Tick128UpdateStaff() if (AssignedStaffType != StaffType::Security) return; - PeepAnimationGroup newSpriteType = PeepAnimationGroup::SecurityAlt; + PeepAnimationGroup newAnimationGroup = PeepAnimationGroup::SecurityAlt; if (State != PeepState::Patrolling) - newSpriteType = PeepAnimationGroup::Security; + newAnimationGroup = PeepAnimationGroup::Security; - if (SpriteType == newSpriteType) + if (AnimationGroup == newAnimationGroup) return; - SpriteType = newSpriteType; + AnimationGroup = newAnimationGroup; AnimationImageIdOffset = 0; WalkingAnimationFrameNum = 0; if (Action < PeepActionType::Idle) Action = PeepActionType::Walking; PeepFlags &= ~PEEP_FLAGS_SLOW_WALK; - if (gSpriteTypeToSlowWalkMap[EnumValue(newSpriteType)]) + if (gAnimationGroupToSlowWalkMap[EnumValue(newAnimationGroup)]) { PeepFlags |= PEEP_FLAGS_SLOW_WALK; } diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index b4e770fd89..47fa883b97 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1663,7 +1663,7 @@ namespace OpenRCT2 cs.ReadWrite(entity.State); cs.ReadWrite(entity.SubState); - cs.ReadWrite(entity.SpriteType); + cs.ReadWrite(entity.AnimationGroup); if (version <= 1) { diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index 5ae6876786..042f3baa99 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -974,13 +974,13 @@ namespace OpenRCT2 kPeepAnimationsSandwich, }; - const PeepAnimation& GetPeepAnimation(PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType) + const PeepAnimation& GetPeepAnimation(PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup) { - return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType]; + return kPeepAnimationEntries[EnumValue(spriteType)][actionAnimationGroup]; } - const SpriteBounds& GetSpriteBounds(PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType) + const SpriteBounds& GetSpriteBounds(PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup) { - return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType].bounds; + return kPeepAnimationEntries[EnumValue(spriteType)][actionAnimationGroup].bounds; } } // namespace OpenRCT2 diff --git a/src/openrct2/peep/PeepAnimationData.h b/src/openrct2/peep/PeepAnimationData.h index 16a2a20f2f..c944a38631 100644 --- a/src/openrct2/peep/PeepAnimationData.h +++ b/src/openrct2/peep/PeepAnimationData.h @@ -37,7 +37,7 @@ namespace OpenRCT2 }; const PeepAnimation& GetPeepAnimation( - PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); + PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup = PeepAnimationType::None); const SpriteBounds& GetSpriteBounds( - PeepAnimationGroup spriteType, PeepAnimationType actionSpriteType = PeepAnimationType::None); + PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup = PeepAnimationType::None); } // namespace OpenRCT2 diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index fc695f1609..4f93370de7 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -544,16 +544,16 @@ namespace OpenRCT2::RCT1 struct Peep : RCT12EntityBase { uint8_t Pad1F[3]; - StringId NameStringID; // 0x22 - uint16_t NextX; // 0x24 - uint16_t NextY; // 0x26 - uint8_t NextZ; // 0x28 - uint8_t NextFlags; // 0x29 - uint8_t OutsideOfPark; // 0x2A - uint8_t State; // 0x2B - uint8_t SubState; // 0x2C - PeepAnimationGroup SpriteType; // 0x2D - RCT12PeepType PeepType; // 0x2E + StringId NameStringID; // 0x22 + uint16_t NextX; // 0x24 + uint16_t NextY; // 0x26 + uint8_t NextZ; // 0x28 + uint8_t NextFlags; // 0x29 + uint8_t OutsideOfPark; // 0x2A + uint8_t State; // 0x2B + uint8_t SubState; // 0x2C + PeepAnimationGroup AnimationGroup; // 0x2D + RCT12PeepType PeepType; // 0x2E union { uint8_t StaffType; // 0x2F diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 4ba1bd6374..c21e5cbd51 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1298,7 +1298,7 @@ namespace OpenRCT2::RCT1 void ImportPeep(::Peep* dst, const RCT1::Peep* src) { // Peep vs. staff (including which kind) - dst->SpriteType = RCT1::GetPeepAnimationGroup(src->SpriteType); + dst->AnimationGroup = RCT1::GetPeepAnimationGroup(src->AnimationGroup); dst->Action = static_cast(src->Action); dst->SpecialSprite = src->SpecialSprite; dst->NextAnimationType = static_cast(src->NextAnimationType); @@ -1307,7 +1307,7 @@ namespace OpenRCT2::RCT1 dst->AnimationType = static_cast(src->AnimationType); dst->AnimationFrameNum = src->AnimationFrameNum; - const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->AnimationType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->AnimationGroup, dst->AnimationType); dst->SpriteData.Width = spriteBounds->sprite_width; dst->SpriteData.HeightMin = spriteBounds->sprite_height_negative; dst->SpriteData.HeightMax = spriteBounds->sprite_height_positive; diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index fafd5d7141..44fb9cc0e8 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -68,7 +68,7 @@ namespace OpenRCT2::RCT1 return map[colour]; } - ::PeepAnimationGroup GetPeepAnimationGroup(RCT1::PeepAnimationGroup rct1SpriteType) + ::PeepAnimationGroup GetPeepAnimationGroup(RCT1::PeepAnimationGroup rct1AnimationGroup) { static constexpr ::PeepAnimationGroup map[] = { @@ -108,12 +108,12 @@ namespace OpenRCT2::RCT1 ::PeepAnimationGroup::Chicken, // 0x21 ::PeepAnimationGroup::Lemonade, // 0x22 }; - if (EnumValue(rct1SpriteType) >= std::size(map)) + if (EnumValue(rct1AnimationGroup) >= std::size(map)) { - LOG_WARNING("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1SpriteType)); + LOG_WARNING("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1AnimationGroup)); return ::PeepAnimationGroup::Normal; } - return map[EnumValue(rct1SpriteType)]; + return map[EnumValue(rct1AnimationGroup)]; } std::string_view GetTerrainSurfaceObject(uint8_t terrainSurface) diff --git a/src/openrct2/rct1/Tables.h b/src/openrct2/rct1/Tables.h index 1be800d0ab..54c65f6b09 100644 --- a/src/openrct2/rct1/Tables.h +++ b/src/openrct2/rct1/Tables.h @@ -25,7 +25,7 @@ namespace OpenRCT2::RCT1 enum class PeepAnimationGroup : uint8_t; colour_t GetColour(colour_t colour); - ::PeepAnimationGroup GetPeepAnimationGroup(PeepAnimationGroup rct1SpriteType); + ::PeepAnimationGroup GetPeepAnimationGroup(PeepAnimationGroup rct1AnimationGroup); uint8_t GetRideType(RideType rideType, VehicleType vehicleType); VehicleColourSchemeCopyDescriptor GetColourSchemeCopyDescriptor(VehicleType vehicleType); diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index a0423d6cee..4563f0551f 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -541,7 +541,7 @@ namespace OpenRCT2::RCT2 uint8_t OutsideOfPark; // 0x2A uint8_t State; // 0x2B uint8_t SubState; // 0x2C - uint8_t SpriteType; // 0x2D + uint8_t AnimationGroup; // 0x2D uint8_t PeepType; // 0x2E union { diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 9fb31e903a..c9ccb82b80 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1613,7 +1613,7 @@ namespace OpenRCT2::RCT2 dst->NextFlags = src->NextFlags; dst->State = static_cast(src->State); dst->SubState = src->SubState; - dst->SpriteType = static_cast(src->SpriteType); + dst->AnimationGroup = static_cast(src->AnimationGroup); dst->TshirtColour = src->TshirtColour; dst->TrousersColour = src->TrousersColour; dst->DestinationX = src->DestinationX; diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index d95141832c..0bb347a30f 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -7181,7 +7181,7 @@ Loc6DAEB9: // Loc6DB706 const auto moveInfo = GetMoveInfo(); trackType = GetTrackType(); - uint8_t moveInfovehicleSpriteType; + uint8_t moveInfovehicleAnimationGroup; { auto nextVehiclePosition = TrackLocation + CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset }; @@ -7224,7 +7224,7 @@ Loc6DAEB9: bank_rotation = moveInfo->bank_rotation; Pitch = moveInfo->Pitch; - moveInfovehicleSpriteType = moveInfo->Pitch; + moveInfovehicleAnimationGroup = moveInfo->Pitch; if ((carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) && moveInfo->Pitch != 0) { @@ -7289,7 +7289,7 @@ Loc6DAEB9: return true; } - acceleration += AccelerationFromPitch[moveInfovehicleSpriteType]; + acceleration += AccelerationFromPitch[moveInfovehicleAnimationGroup]; _vehicleUnkF64E10++; goto Loc6DAEB9; } @@ -7511,7 +7511,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c // Loc6DBD42 track_progress = newTrackProgress; - uint8_t moveInfoVehicleSpriteType; + uint8_t moveInfoVehicleAnimationGroup; { const VehicleInfo* moveInfo = GetMoveInfo(); auto nextVehiclePosition = TrackLocation @@ -7537,7 +7537,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c Orientation = moveInfo->direction; bank_rotation = moveInfo->bank_rotation; Pitch = moveInfo->Pitch; - moveInfoVehicleSpriteType = moveInfo->Pitch; + moveInfoVehicleAnimationGroup = moveInfo->Pitch; if ((carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) && Pitch != 0) { @@ -7598,7 +7598,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c { return true; } - acceleration += AccelerationFromPitch[moveInfoVehicleSpriteType]; + acceleration += AccelerationFromPitch[moveInfoVehicleAnimationGroup]; _vehicleUnkF64E10++; } } diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index ee68f6182e..adffa367b3 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -845,7 +845,7 @@ namespace OpenRCT2::Scripting } peep->GiveItem(*shopItem); - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); } void ScGuest::remove_item(const DukValue& item) const @@ -856,7 +856,7 @@ namespace OpenRCT2::Scripting // Since guests can only have one item of a type and this item matches, remove it. auto peep = GetGuest(); peep->RemoveItem(ShopItemMap[item["type"].as_string()]); - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); } } @@ -867,7 +867,7 @@ namespace OpenRCT2::Scripting if (peep != nullptr) { peep->RemoveAllItems(); - peep->UpdateSpriteType(); + peep->UpdateAnimationGroup(); } } @@ -894,7 +894,7 @@ namespace OpenRCT2::Scripting auto peep = GetPeep(); if (peep != nullptr) { - auto& animationGroup = GetPeepAnimation(peep->SpriteType, *animationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, *animationType); for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; @@ -946,7 +946,7 @@ namespace OpenRCT2::Scripting else peep->AnimationFrameNum = offset; - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -971,7 +971,7 @@ namespace OpenRCT2::Scripting auto* peep = GetGuest(); - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; @@ -992,7 +992,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); return static_cast(animationGroup.frame_offsets.size()); } diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index 7ca6141417..3f6b993ad5 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -116,22 +116,22 @@ namespace OpenRCT2::Scripting if (value == "handyman" && peep->AssignedStaffType != StaffType::Handyman) { peep->AssignedStaffType = StaffType::Handyman; - peep->SpriteType = PeepAnimationGroup::Handyman; + peep->AnimationGroup = PeepAnimationGroup::Handyman; } else if (value == "mechanic" && peep->AssignedStaffType != StaffType::Mechanic) { peep->AssignedStaffType = StaffType::Mechanic; - peep->SpriteType = PeepAnimationGroup::Mechanic; + peep->AnimationGroup = PeepAnimationGroup::Mechanic; } else if (value == "security" && peep->AssignedStaffType != StaffType::Security) { peep->AssignedStaffType = StaffType::Security; - peep->SpriteType = PeepAnimationGroup::Security; + peep->AnimationGroup = PeepAnimationGroup::Security; } else if (value == "entertainer" && peep->AssignedStaffType != StaffType::Entertainer) { peep->AssignedStaffType = StaffType::Entertainer; - peep->SpriteType = PeepAnimationGroup::EntertainerPanda; + peep->AnimationGroup = PeepAnimationGroup::EntertainerPanda; } // Reset state to walking to prevent invalid actions from carrying over @@ -225,7 +225,7 @@ namespace OpenRCT2::Scripting auto& availableCostumes = costumesByStaffType(peep->AssignedStaffType); - auto costume = availableCostumes.find(peep->SpriteType); + auto costume = availableCostumes.find(peep->AnimationGroup); if (costume != availableCostumes.end()) { return std::string(costume->first); @@ -250,19 +250,19 @@ namespace OpenRCT2::Scripting if (value.type() == DukValue::Type::STRING) { std::string newCostume = value.as_string(); - auto newSpriteType = availableCostumes.TryGet(newCostume); - if (newSpriteType != std::nullopt) + auto newAnimationGroup = availableCostumes.TryGet(newCostume); + if (newAnimationGroup != std::nullopt) { - peep->SpriteType = *newSpriteType; + peep->AnimationGroup = *newAnimationGroup; return; } } else if (value.type() == DukValue::Type::NUMBER) { - auto newSpriteType = PeepAnimationGroup(value.as_uint() + EnumValue(PeepAnimationGroup::EntertainerPanda)); - if (availableCostumes.find(newSpriteType) != availableCostumes.end()) + auto newAnimationGroup = PeepAnimationGroup(value.as_uint() + EnumValue(PeepAnimationGroup::EntertainerPanda)); + if (availableCostumes.find(newAnimationGroup) != availableCostumes.end()) { - peep->SpriteType = newSpriteType; + peep->AnimationGroup = newAnimationGroup; return; } } @@ -340,7 +340,7 @@ namespace OpenRCT2::Scripting return spriteIds; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, *animationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, *animationType); for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; @@ -388,7 +388,7 @@ namespace OpenRCT2::Scripting else peep->AnimationFrameNum = offset; - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -413,7 +413,7 @@ namespace OpenRCT2::Scripting auto* peep = GetStaff(); - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; @@ -434,7 +434,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->AnimationType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); return static_cast(animationGroup.frame_offsets.size()); }