diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index 8b96430059..55e5ca2168 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -1337,15 +1337,15 @@ namespace OpenRCT2::Ui::Windows { switch (type) { - case AnimationPeepType::Handyman: + case AnimationPeepType::handyman: return STR_HANDYMAN_PLURAL; - case AnimationPeepType::Mechanic: + case AnimationPeepType::mechanic: return STR_MECHANIC_PLURAL; - case AnimationPeepType::Security: + case AnimationPeepType::security: return STR_SECURITY_GUARD_PLURAL; - case AnimationPeepType::Entertainer: + case AnimationPeepType::entertainer: return STR_ENTERTAINER_PLURAL; - case AnimationPeepType::Guest: + case AnimationPeepType::guest: default: return STR_GUESTS; } diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 9f86a0a293..c8a30939ac 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -628,7 +628,7 @@ namespace OpenRCT2::Ui::Windows { // Tab 1 image auto i = (_selectedTab == TabId::Individual ? _tabAnimationIndex & ~3 : 0); - auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::Guest); + auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::guest); i += animObj->GetPeepAnimation(PeepAnimationGroup::Normal).base_image + 1; GfxDrawSprite( rt, ImageId(i, COLOUR_GREY, COLOUR_DARK_OLIVE_GREEN), diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 282d3c16a6..e02b3ba537 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -1234,7 +1234,7 @@ namespace OpenRCT2::Ui::Windows spriteIdx = spriteIdx.WithIndexOffset((currentFrame / 8) % 8); GfxDrawSprite(rt, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].left, widgets[WIDX_TAB_3].top }); - auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::Guest); + auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::guest); ImageId peepImage( animObj->GetPeepAnimation(PeepAnimationGroup::Normal).base_image + 1, COLOUR_BRIGHT_RED, COLOUR_TEAL); if (page == WINDOW_PARK_PAGE_GUESTS) diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 975a8f6f8b..0566cea295 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1326,7 +1326,7 @@ namespace OpenRCT2::Ui::Windows if (page == WINDOW_RIDE_PAGE_CUSTOMER) spriteIndex = pickedPeepFrame & ~3; - auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::Guest); + auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::guest); spriteIndex += animObj->GetPeepAnimation(PeepAnimationGroup::Normal).base_image + 1; GfxDrawSprite( diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index b8465dc462..919945d1fc 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -143,7 +143,7 @@ namespace OpenRCT2::Ui::Windows return; if (staff->isEntertainer()) - _availableCostumes = getAvailableCostumeStrings(AnimationPeepType::Entertainer); + _availableCostumes = getAvailableCostumeStrings(AnimationPeepType::entertainer); ViewportInit(); } @@ -165,7 +165,7 @@ namespace OpenRCT2::Ui::Windows return; if (staff->isEntertainer()) - _availableCostumes = getAvailableCostumeStrings(AnimationPeepType::Entertainer); + _availableCostumes = getAvailableCostumeStrings(AnimationPeepType::entertainer); } void onMouseUp(WidgetIndex widgetIndex) override diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 499ee6a73e..05556abdbe 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -595,10 +595,10 @@ namespace OpenRCT2::Ui::Windows void DrawTabImages(RenderTarget& rt) const { const auto& gameState = getGameState(); - DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_HANDYMEN, AnimationPeepType::Handyman, gameState.park.staffHandymanColour); - DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_MECHANICS, AnimationPeepType::Mechanic, gameState.park.staffMechanicColour); - DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_SECURITY, AnimationPeepType::Security, gameState.park.staffSecurityColour); - DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_ENTERTAINERS, AnimationPeepType::Entertainer); + DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_HANDYMEN, AnimationPeepType::handyman, gameState.park.staffHandymanColour); + DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_MECHANICS, AnimationPeepType::mechanic, gameState.park.staffMechanicColour); + DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_SECURITY, AnimationPeepType::security, gameState.park.staffSecurityColour); + DrawTabImage(rt, WINDOW_STAFF_LIST_TAB_ENTERTAINERS, AnimationPeepType::entertainer); } void DrawTabImage(RenderTarget& rt, int32_t tabIndex, AnimationPeepType type, colour_t colour) const diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index ba4a4f748b..eb0596f0b5 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -474,11 +474,11 @@ namespace OpenRCT2::Editor using OpenRCT2::AnimationPeepType; constexpr std::pair kPeepCheckPairs[] = { - { AnimationPeepType::Guest, STR_AT_LEAST_ONE_GUEST_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, - { AnimationPeepType::Handyman, STR_AT_LEAST_ONE_HANDYMAN_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, - { AnimationPeepType::Mechanic, STR_AT_LEAST_ONE_MECHANIC_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, - { AnimationPeepType::Security, STR_AT_LEAST_ONE_SECURITY_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, - { AnimationPeepType::Entertainer, STR_AT_LEAST_ONE_ENTERTAINER_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, + { AnimationPeepType::guest, STR_AT_LEAST_ONE_GUEST_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, + { AnimationPeepType::handyman, STR_AT_LEAST_ONE_HANDYMAN_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, + { AnimationPeepType::mechanic, STR_AT_LEAST_ONE_MECHANIC_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, + { AnimationPeepType::security, STR_AT_LEAST_ONE_SECURITY_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, + { AnimationPeepType::entertainer, STR_AT_LEAST_ONE_ENTERTAINER_PEEP_ANIMATIONS_OBJECT_MUST_BE_SELECTED }, }; for (auto& pair : kPeepCheckPairs) diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 21efa78bae..7a7d6a746a 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -90,7 +90,7 @@ namespace OpenRCT2::GameActions if (_staffType == static_cast(StaffType::Entertainer)) { - auto costumes = findAllPeepAnimationsIndexesForType(AnimationPeepType::Entertainer); + auto costumes = findAllPeepAnimationsIndexesForType(AnimationPeepType::entertainer); if (std::find(costumes.begin(), costumes.end(), _costumeIndex) == costumes.end()) { LOG_ERROR("Unavailable entertainer costume %u", static_cast(_costumeIndex)); @@ -150,7 +150,7 @@ namespace OpenRCT2::GameActions auto animPeepType = AnimationPeepType(static_cast(_staffType) + 1); ObjectEntryIndex animObjectIndex = _costumeIndex; - if (animPeepType != AnimationPeepType::Entertainer) + if (animPeepType != AnimationPeepType::entertainer) animObjectIndex = findPeepAnimationsIndexForType(animPeepType); newPeep->Name = nullptr; diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 80783427d8..b0d206e40d 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -7272,7 +7272,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) Guest* peep = gameState.entities.CreateEntity(); - peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Guest); + peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::guest); peep->AnimationGroup = PeepAnimationGroup::Normal; peep->OutsideOfPark = true; peep->State = PeepState::Falling; diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index a995d71550..5a4c5bcc6a 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -480,8 +480,8 @@ static void ConsoleCommandStaff(InteractiveConsole& console, const arguments_t& console.WriteFormatLine("staff set energy "); console.WriteFormatLine("staff set costume "); - auto _availableCostumeIndexes = findAllPeepAnimationsIndexesForType(AnimationPeepType::Entertainer); - auto _availableCostumeObjects = findAllPeepAnimationsObjectForType(AnimationPeepType::Entertainer); + auto _availableCostumeIndexes = findAllPeepAnimationsIndexesForType(AnimationPeepType::entertainer); + auto _availableCostumeObjects = findAllPeepAnimationsObjectForType(AnimationPeepType::entertainer); for (auto i = 0u; i < _availableCostumeIndexes.size(); i++) { diff --git a/src/openrct2/object/PeepAnimationsObject.cpp b/src/openrct2/object/PeepAnimationsObject.cpp index 21d961aa70..2a9590046d 100644 --- a/src/openrct2/object/PeepAnimationsObject.cpp +++ b/src/openrct2/object/PeepAnimationsObject.cpp @@ -22,11 +22,11 @@ namespace OpenRCT2 { static const EnumMap animationPeepTypeMap( { - { "guest", AnimationPeepType::Guest }, - { "handyman", AnimationPeepType::Handyman }, - { "mechanic", AnimationPeepType::Mechanic }, - { "security", AnimationPeepType::Security }, - { "entertainer", AnimationPeepType::Entertainer }, + { "guest", AnimationPeepType::guest }, + { "handyman", AnimationPeepType::handyman }, + { "mechanic", AnimationPeepType::mechanic }, + { "security", AnimationPeepType::security }, + { "entertainer", AnimationPeepType::entertainer }, }); void PeepAnimationsObject::Load() diff --git a/src/openrct2/peep/PeepAnimations.cpp b/src/openrct2/peep/PeepAnimations.cpp index 5b86a1fa43..22a6e2afd1 100644 --- a/src/openrct2/peep/PeepAnimations.cpp +++ b/src/openrct2/peep/PeepAnimations.cpp @@ -102,15 +102,15 @@ namespace OpenRCT2 { switch (peepType) { - case AnimationPeepType::Guest: + case AnimationPeepType::guest: return availableGuestAnimations; - case AnimationPeepType::Handyman: + case AnimationPeepType::handyman: return availableHandymanAnimations; - case AnimationPeepType::Mechanic: + case AnimationPeepType::mechanic: return availableMechanicAnimations; - case AnimationPeepType::Security: + case AnimationPeepType::security: return availableSecurityAnimations; - case AnimationPeepType::Entertainer: + case AnimationPeepType::entertainer: default: return availableEntertainerAnimations; } @@ -121,14 +121,14 @@ namespace OpenRCT2 switch (staffType) { case StaffType::Handyman: - return AnimationPeepType::Handyman; + return AnimationPeepType::handyman; case StaffType::Mechanic: - return AnimationPeepType::Mechanic; + return AnimationPeepType::mechanic; case StaffType::Security: - return AnimationPeepType::Security; + return AnimationPeepType::security; case StaffType::Entertainer: default: - return AnimationPeepType::Entertainer; + return AnimationPeepType::entertainer; } } diff --git a/src/openrct2/peep/PeepAnimations.h b/src/openrct2/peep/PeepAnimations.h index 284fd6b2b8..1a48d45e0b 100644 --- a/src/openrct2/peep/PeepAnimations.h +++ b/src/openrct2/peep/PeepAnimations.h @@ -26,11 +26,11 @@ namespace OpenRCT2 enum class AnimationPeepType : uint8_t { - Guest, - Handyman, - Mechanic, - Security, - Entertainer, + guest, + handyman, + mechanic, + security, + entertainer, }; const EnumMap& getAnimationsByPeepType(AnimationPeepType peepType); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index e1c971856a..b5f4e9f1e7 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1274,7 +1274,7 @@ namespace OpenRCT2::RCT1 { // TODO: Entities are currently read from the global state, change this once entities are stored // in the passed gameState. - auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::Guest); + auto* animObj = findPeepAnimationsObjectForType(AnimationPeepType::guest); for (auto* peep : EntityList()) { const auto& spriteBounds = animObj->GetSpriteBounds(peep->AnimationGroup, peep->AnimationType); diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 3ae2e1d4b4..7fb67c27c0 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -848,7 +848,7 @@ namespace OpenRCT2::Scripting std::vector ScGuest::availableAnimations_get() const { std::vector availableAnimations{}; - for (auto& animation : getAnimationsByPeepType(AnimationPeepType::Guest)) + for (auto& animation : getAnimationsByPeepType(AnimationPeepType::guest)) { availableAnimations.push_back(std::string(animation.first)); } @@ -859,7 +859,7 @@ namespace OpenRCT2::Scripting { std::vector spriteIds{}; - auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest); + auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::guest); auto animationType = availableGuestAnimations.TryGet(groupKey); if (animationType == std::nullopt) { @@ -895,7 +895,7 @@ namespace OpenRCT2::Scripting return nullptr; } - auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest); + auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::guest); std::string_view action = availableGuestAnimations[peep->AnimationType]; // Special consideration for sitting peeps @@ -910,7 +910,7 @@ namespace OpenRCT2::Scripting { ThrowIfGameStateNotMutable(); - auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest); + auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::guest); auto newType = availableGuestAnimations.TryGet(groupKey); if (newType == std::nullopt) { diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index a600ceb792..90e0b21eae 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -78,25 +78,25 @@ namespace OpenRCT2::Scripting if (value == "handyman" && peep->AssignedStaffType != StaffType::Handyman) { peep->AssignedStaffType = StaffType::Handyman; - peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Handyman); + peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::handyman); peep->AnimationGroup = PeepAnimationGroup::Normal; } else if (value == "mechanic" && !peep->IsMechanic()) { peep->AssignedStaffType = StaffType::Mechanic; - peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Mechanic); + peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::mechanic); peep->AnimationGroup = PeepAnimationGroup::Normal; } else if (value == "security" && peep->AssignedStaffType != StaffType::Security) { peep->AssignedStaffType = StaffType::Security; - peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Security); + peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::security); peep->AnimationGroup = PeepAnimationGroup::Normal; } else if (value == "entertainer" && !peep->isEntertainer()) { peep->AssignedStaffType = StaffType::Entertainer; - peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Entertainer); + peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::entertainer); peep->AnimationGroup = PeepAnimationGroup::Normal; } @@ -243,17 +243,17 @@ namespace OpenRCT2::Scripting switch (staffType) { case StaffType::Handyman: - animPeepType = AnimationPeepType::Handyman; + animPeepType = AnimationPeepType::handyman; break; case StaffType::Mechanic: - animPeepType = AnimationPeepType::Mechanic; + animPeepType = AnimationPeepType::mechanic; break; case StaffType::Security: - animPeepType = AnimationPeepType::Security; + animPeepType = AnimationPeepType::security; break; case StaffType::Entertainer: default: - animPeepType = AnimationPeepType::Entertainer; + animPeepType = AnimationPeepType::entertainer; } return getAnimationsByPeepType(animPeepType); }