diff --git a/src/openrct2/actions/StaffSetColourAction.h b/src/openrct2/actions/StaffSetColourAction.h index fe6fa3ee24..6a4015e040 100644 --- a/src/openrct2/actions/StaffSetColourAction.h +++ b/src/openrct2/actions/StaffSetColourAction.h @@ -9,6 +9,7 @@ #pragma once +#include "../entity/Staff.h" #include "GameAction.h" class StaffSetColourAction final : public GameActionBase diff --git a/src/openrct2/entity/PatrolArea.h b/src/openrct2/entity/PatrolArea.h index 053df61c58..f90b3f70e1 100644 --- a/src/openrct2/entity/PatrolArea.h +++ b/src/openrct2/entity/PatrolArea.h @@ -10,7 +10,7 @@ #pragma once #include "../world/Map.h" -#include "Peep.h" +#include "Staff.h" #include diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 90d191df08..69b6b59f3e 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -36,16 +36,6 @@ namespace OpenRCT2::GameActions class Result; } -enum class StaffType : uint8_t -{ - Handyman, - Mechanic, - Security, - Entertainer, - - Count -}; - enum class PeepState : uint8_t { Falling = 0, // Drowning is part of falling diff --git a/src/openrct2/entity/Staff.h b/src/openrct2/entity/Staff.h index 4e0cfdea5d..87dbb3c66f 100644 --- a/src/openrct2/entity/Staff.h +++ b/src/openrct2/entity/Staff.h @@ -20,6 +20,16 @@ class PatrolArea; using colour_t = uint8_t; +enum class StaffType : uint8_t +{ + Handyman, + Mechanic, + Security, + Entertainer, + + Count +}; + struct Staff : Peep { static constexpr auto cEntityType = EntityType::Staff; diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index f605926444..86d0c493c7 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -329,9 +329,6 @@ - - - @@ -349,6 +346,9 @@ + + + @@ -391,6 +391,7 @@ + @@ -864,7 +865,6 @@ - @@ -878,11 +878,12 @@ + - + @@ -1006,6 +1007,7 @@ + diff --git a/src/openrct2/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index 5b6daeb00d..3a2dae4e05 100644 --- a/src/openrct2/peep/PeepAnimationData.cpp +++ b/src/openrct2/peep/PeepAnimationData.cpp @@ -10,109 +10,13 @@ #include "PeepAnimationData.h" #include "../drawing/Drawing.h" +#include "PeepAnimations.h" #include "PeepSpriteIds.h" -#include #include namespace OpenRCT2 { - // Adapted from CarEntry.cpp - static SpriteBounds inferMaxAnimationDimensions(const PeepAnimation& anim) - { - constexpr uint8_t kWidth = 200; - constexpr uint8_t kHeight = 200; - constexpr uint8_t kCentreX = kWidth / 2; - constexpr uint8_t kCentreY = kHeight / 2; - - uint8_t bitmap[kHeight][kWidth] = { 0 }; - - DrawPixelInfo dpi = { - .bits = reinterpret_cast(bitmap), - .x = -(kWidth / 2), - .y = -(kHeight / 2), - .width = kWidth, - .height = kHeight, - .pitch = 0, - .zoom_level = ZoomLevel{ 0 }, - }; - - const auto numImages = *(std::max_element(anim.frame_offsets.begin(), anim.frame_offsets.end())) + 1; - for (int32_t i = 0; i < numImages; ++i) - { - GfxDrawSpriteSoftware(dpi, ImageId(anim.base_image + i), { 0, 0 }); - } - - int32_t spriteWidth = -1; - for (int32_t i = kCentreX - 1; i != 0; --i) - { - for (int32_t j = 0; j < kWidth; j++) - { - if (bitmap[j][kCentreX - i] != 0) - { - spriteWidth = i; - break; - } - } - - if (spriteWidth != -1) - break; - - for (int32_t j = 0; j < kWidth; j++) - { - if (bitmap[j][kCentreX + i] != 0) - { - spriteWidth = i; - break; - } - } - - if (spriteWidth != -1) - break; - } - spriteWidth++; - - int32_t spriteHeightNegative = -1; - for (int32_t i = kCentreY - 1; i != 0; --i) - { - for (int32_t j = 0; j < kWidth; j++) - { - if (bitmap[kCentreY - i][j] != 0) - { - spriteHeightNegative = i; - break; - } - } - - if (spriteHeightNegative != -1) - break; - } - spriteHeightNegative++; - - int32_t spriteHeightPositive = -1; - for (int32_t i = kCentreY - 1; i != 0; --i) - { - for (int32_t j = 0; j < kWidth; j++) - { - if (bitmap[kCentreY + i][j] != 0) - { - spriteHeightPositive = i; - break; - } - } - - if (spriteHeightPositive != -1) - break; - } - spriteHeightPositive++; - - return { - .sprite_width = static_cast(spriteWidth), - .sprite_height_negative = static_cast(spriteHeightNegative), - .sprite_height_positive = static_cast(spriteHeightPositive), - }; - } - // clang-format off // Define animation sequences for Normal sprites @@ -1098,5 +1002,4 @@ namespace OpenRCT2 } } } - } // namespace OpenRCT2 diff --git a/src/openrct2/peep/PeepAnimationData.h b/src/openrct2/peep/PeepAnimationData.h index 7a826d92e5..28cf8a35c5 100644 --- a/src/openrct2/peep/PeepAnimationData.h +++ b/src/openrct2/peep/PeepAnimationData.h @@ -2,49 +2,12 @@ #include "../entity/Peep.h" #include "../util/Util.h" +#include "PeepAnimations.h" #include namespace OpenRCT2 { - struct SpriteBounds - { - uint8_t sprite_width; // 0x00 - uint8_t sprite_height_negative; // 0x01 - uint8_t sprite_height_positive; // 0x02 - }; - - struct PeepAnimation - { - uint32_t base_image; - std::span frame_offsets; - SpriteBounds bounds{}; - - constexpr PeepAnimation() = default; - - PeepAnimation(uint32_t baseImage, std::span frameOffsets) - : base_image(baseImage) - , frame_offsets(frameOffsets) - { - } - }; - - struct PeepAnimations - { - public: - constexpr PeepAnimation& operator[](PeepAnimationType n) - { - return animations[EnumValue(n)]; - } - constexpr const PeepAnimation& operator[](PeepAnimationType n) const - { - return animations[EnumValue(n)]; - } - - private: - PeepAnimation animations[37]{}; - }; - const PeepAnimation& GetPeepAnimation( PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup = PeepAnimationType::Walking); const SpriteBounds& GetSpriteBounds( diff --git a/src/openrct2/peep/PeepAnimations.cpp b/src/openrct2/peep/PeepAnimations.cpp new file mode 100644 index 0000000000..591bc57641 --- /dev/null +++ b/src/openrct2/peep/PeepAnimations.cpp @@ -0,0 +1,203 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#include "PeepAnimations.h" + +#include "../Context.h" +#include "../drawing/Drawing.h" +#include "../entity/Peep.h" + +#include + +namespace OpenRCT2 +{ + static const EnumMap availableGuestAnimations({ + { "walking", PeepAnimationType::Walking }, + { "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::Hanging }, + { "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 }, + }); + + static const EnumMap availableHandymanAnimations({ + { "walking", PeepAnimationType::Walking }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Hanging }, + { "staffMower", PeepAnimationType::StaffMower }, + { "staffSweep", PeepAnimationType::StaffSweep }, + { "drowning", PeepAnimationType::Drowning }, + { "staffWatering", PeepAnimationType::StaffWatering }, + { "staffEmptyBin", PeepAnimationType::StaffEmptyBin }, + }); + + static const EnumMap availableMechanicAnimations({ + { "walking", PeepAnimationType::Walking }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Hanging }, + { "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 EnumMap availableSecurityAnimations({ + { "walking", PeepAnimationType::Walking }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Hanging }, + { "drowning", PeepAnimationType::Drowning }, + }); + + static const EnumMap availableEntertainerAnimations({ + { "walking", PeepAnimationType::Walking }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Hanging }, + { "drowning", PeepAnimationType::Drowning }, + { "joy", PeepAnimationType::Joy }, + { "wave2", PeepAnimationType::Wave2 }, + }); + + const EnumMap& getAnimationsByPeepType(AnimationPeepType peepType) + { + switch (peepType) + { + case AnimationPeepType::Guest: + return availableGuestAnimations; + case AnimationPeepType::Handyman: + return availableHandymanAnimations; + case AnimationPeepType::Mechanic: + return availableMechanicAnimations; + case AnimationPeepType::Security: + return availableSecurityAnimations; + case AnimationPeepType::Entertainer: + default: + return availableEntertainerAnimations; + } + } + + // Adapted from CarEntry.cpp + SpriteBounds inferMaxAnimationDimensions(const PeepAnimation& anim) + { + constexpr uint8_t kWidth = 200; + constexpr uint8_t kHeight = 200; + constexpr uint8_t kCentreX = kWidth / 2; + constexpr uint8_t kCentreY = kHeight / 2; + + uint8_t bitmap[kHeight][kWidth] = { 0 }; + + DrawPixelInfo dpi = { + .bits = reinterpret_cast(bitmap), + .x = -(kWidth / 2), + .y = -(kHeight / 2), + .width = kWidth, + .height = kHeight, + .pitch = 0, + .zoom_level = ZoomLevel{ 0 }, + }; + + const auto numImages = *(std::max_element(anim.frame_offsets.begin(), anim.frame_offsets.end())) + 1; + for (int32_t i = 0; i < numImages; ++i) + { + GfxDrawSpriteSoftware(dpi, ImageId(anim.base_image + i), { 0, 0 }); + } + + int32_t spriteWidth = -1; + for (int32_t i = kCentreX - 1; i != 0; --i) + { + for (int32_t j = 0; j < kWidth; j++) + { + if (bitmap[j][kCentreX - i] != 0) + { + spriteWidth = i; + break; + } + } + + if (spriteWidth != -1) + break; + + for (int32_t j = 0; j < kWidth; j++) + { + if (bitmap[j][kCentreX + i] != 0) + { + spriteWidth = i; + break; + } + } + + if (spriteWidth != -1) + break; + } + spriteWidth++; + + int32_t spriteHeightNegative = -1; + for (int32_t i = kCentreY - 1; i != 0; --i) + { + for (int32_t j = 0; j < kWidth; j++) + { + if (bitmap[kCentreY - i][j] != 0) + { + spriteHeightNegative = i; + break; + } + } + + if (spriteHeightNegative != -1) + break; + } + spriteHeightNegative++; + + int32_t spriteHeightPositive = -1; + for (int32_t i = kCentreY - 1; i != 0; --i) + { + for (int32_t j = 0; j < kWidth; j++) + { + if (bitmap[kCentreY + i][j] != 0) + { + spriteHeightPositive = i; + break; + } + } + + if (spriteHeightPositive != -1) + break; + } + spriteHeightPositive++; + + return { + .sprite_width = static_cast(spriteWidth), + .sprite_height_negative = static_cast(spriteHeightNegative), + .sprite_height_positive = static_cast(spriteHeightPositive), + }; + } +} // namespace OpenRCT2 diff --git a/src/openrct2/peep/PeepAnimations.h b/src/openrct2/peep/PeepAnimations.h new file mode 100644 index 0000000000..9f9ff9bbd6 --- /dev/null +++ b/src/openrct2/peep/PeepAnimations.h @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include "../core/EnumMap.hpp" +#include "../drawing/ImageIndexType.h" +#include "../entity/Peep.h" +#include "../util/Util.h" + +namespace OpenRCT2 +{ + enum class AnimationPeepType : uint8_t + { + Guest, + Handyman, + Mechanic, + Security, + Entertainer, + }; + + const EnumMap& getAnimationsByPeepType(AnimationPeepType peepType); + + struct SpriteBounds + { + uint8_t sprite_width; // 0x00 + uint8_t sprite_height_negative; // 0x01 + uint8_t sprite_height_positive; // 0x02 + }; + + struct PeepAnimation + { + uint32_t base_image; + std::span frame_offsets; + SpriteBounds bounds{}; + + constexpr PeepAnimation() = default; + + PeepAnimation(uint32_t baseImage, std::span frameOffsets) + : base_image(baseImage) + , frame_offsets(frameOffsets) + { + } + }; + + struct PeepAnimations + { + public: + constexpr PeepAnimation& operator[](PeepAnimationType n) + { + return animations[EnumValue(n)]; + } + constexpr const PeepAnimation& operator[](PeepAnimationType n) const + { + return animations[EnumValue(n)]; + } + + private: + PeepAnimation animations[37]{}; + }; + + SpriteBounds inferMaxAnimationDimensions(const PeepAnimation& anim); +} // namespace OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 4e7a451fca..ee329238eb 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -15,6 +15,7 @@ #include "../../../entity/Guest.h" #include "../../../localisation/Formatting.h" #include "../../../peep/PeepAnimationData.h" + #include "../../../peep/PeepAnimations.h" #include "../../../ride/RideEntry.h" namespace OpenRCT2::Scripting @@ -147,35 +148,6 @@ namespace OpenRCT2::Scripting { "here_we_are", PeepThoughtType::HereWeAre }, }); - static const DukEnumMap availableGuestAnimations({ - { "walking", PeepAnimationType::Walking }, - { "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::Hanging }, - { "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) : ScPeep(id) { @@ -874,7 +846,7 @@ namespace OpenRCT2::Scripting std::vector ScGuest::availableAnimations_get() const { std::vector availableAnimations{}; - for (auto& animation : availableGuestAnimations) + for (auto& animation : getAnimationsByPeepType(AnimationPeepType::Guest)) { availableAnimations.push_back(std::string(animation.first)); } @@ -885,6 +857,7 @@ namespace OpenRCT2::Scripting { std::vector spriteIds{}; + auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest); auto animationType = availableGuestAnimations.TryGet(groupKey); if (animationType == std::nullopt) { @@ -894,7 +867,7 @@ namespace OpenRCT2::Scripting auto peep = GetPeep(); if (peep != nullptr) { - auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, *animationType); + const auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, *animationType); for (auto frameOffset : animationGroup.frame_offsets) { auto imageId = animationGroup.base_image; @@ -917,6 +890,7 @@ namespace OpenRCT2::Scripting return nullptr; } + auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest); std::string_view action = availableGuestAnimations[peep->AnimationType]; // Special consideration for sitting peeps @@ -931,6 +905,7 @@ namespace OpenRCT2::Scripting { ThrowIfGameStateNotMutable(); + auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest); auto newType = availableGuestAnimations.TryGet(groupKey); if (newType == std::nullopt) { @@ -946,7 +921,7 @@ namespace OpenRCT2::Scripting else peep->AnimationFrameNum = offset; - auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); + const auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -971,7 +946,7 @@ namespace OpenRCT2::Scripting auto* peep = GetGuest(); - auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); + const auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; @@ -992,7 +967,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); + const 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 6df3274d85..d8d1d28682 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -14,51 +14,10 @@ #include "../../../entity/PatrolArea.h" #include "../../../entity/Staff.h" #include "../../../peep/PeepAnimationData.h" + #include "../../../peep/PeepAnimations.h" namespace OpenRCT2::Scripting { - static const DukEnumMap availableHandymanAnimations({ - { "walking", PeepAnimationType::Walking }, - { "watchRide", PeepAnimationType::WatchRide }, - { "hanging", PeepAnimationType::Hanging }, - { "staffMower", PeepAnimationType::StaffMower }, - { "staffSweep", PeepAnimationType::StaffSweep }, - { "drowning", PeepAnimationType::Drowning }, - { "staffWatering", PeepAnimationType::StaffWatering }, - { "staffEmptyBin", PeepAnimationType::StaffEmptyBin }, - }); - - static const DukEnumMap availableMechanicAnimations({ - { "walking", PeepAnimationType::Walking }, - { "watchRide", PeepAnimationType::WatchRide }, - { "hanging", PeepAnimationType::Hanging }, - { "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", PeepAnimationType::Walking }, - { "watchRide", PeepAnimationType::WatchRide }, - { "hanging", PeepAnimationType::Hanging }, - { "drowning", PeepAnimationType::Drowning }, - }); - - static const DukEnumMap availableEntertainerAnimations({ - { "walking", PeepAnimationType::Walking }, - { "watchRide", PeepAnimationType::WatchRide }, - { "wave", PeepAnimationType::EatFood }, // NB: this not a typo - { "hanging", PeepAnimationType::Hanging }, - { "drowning", PeepAnimationType::Drowning }, - { "joy", PeepAnimationType::Joy }, - { "wave2", PeepAnimationType::Wave2 }, - }); - ScStaff::ScStaff(EntityId Id) : ScPeep(Id) { @@ -293,18 +252,23 @@ namespace OpenRCT2::Scripting const DukEnumMap& ScStaff::animationsByStaffType(StaffType staffType) const { + AnimationPeepType animPeepType{}; switch (staffType) { case StaffType::Handyman: - return availableHandymanAnimations; + animPeepType = AnimationPeepType::Handyman; + break; case StaffType::Mechanic: - return availableMechanicAnimations; + animPeepType = AnimationPeepType::Mechanic; + break; case StaffType::Security: - return availableSecurityAnimations; + animPeepType = AnimationPeepType::Security; + break; case StaffType::Entertainer: default: - return availableEntertainerAnimations; + animPeepType = AnimationPeepType::Entertainer; } + return getAnimationsByPeepType(animPeepType); } std::vector ScStaff::availableAnimations_get() const