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/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 b7289daf79..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; @@ -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; @@ -957,7 +957,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(peep->SpriteType, PeepActionSpriteType::Ui).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/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/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/News.cpp b/src/openrct2-ui/windows/News.cpp index c5ffb3f312..e07083b641 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -251,11 +251,11 @@ 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) { - spriteType = staff->SpriteType; + spriteType = staff->AnimationGroup; if (staff->AssignedStaffType == StaffType::Entertainer) { clipCoords.y += 3; 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..dd9fb3a759 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), @@ -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 1701c28ada..1cfb5ebedf 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -2936,7 +2936,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 c875dfc0f8..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; @@ -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; @@ -681,7 +681,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto baseImageId = GetPeepAnimation(staff->SpriteType, PeepActionSpriteType::Ui).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(PeepSpriteType::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 7be015f823..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 }); } } @@ -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-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/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 39cd67d45f..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); @@ -281,11 +281,11 @@ 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, ActionSpriteImageOffset); + COMPARE_FIELD(Peep, AnimationType); + COMPARE_FIELD(Peep, NextAnimationType); + COMPARE_FIELD(Peep, AnimationImageIdOffset); COMPARE_FIELD(Peep, Action); - COMPARE_FIELD(Peep, ActionFrame); + COMPARE_FIELD(Peep, AnimationFrameNum); COMPARE_FIELD(Peep, StepProgress); COMPARE_FIELD(Peep, MazeLastEdge); COMPARE_FIELD(Peep, InteractionRideIndex); @@ -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/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 4cda594119..1fb573abd8 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( @@ -132,9 +132,9 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->WindowInvalidateFlags = 0; newPeep->Action = PeepActionType::Walking; newPeep->SpecialSprite = 0; - newPeep->ActionSpriteImageOffset = 0; - newPeep->WalkingFrameNum = 0; - newPeep->ActionSpriteType = PeepActionSpriteType::None; + newPeep->AnimationImageIdOffset = 0; + newPeep->WalkingAnimationFrameNum = 0; + newPeep->AnimationType = PeepAnimationType::None; newPeep->PathCheckOptimisation = 0; newPeep->PeepFlags = 0; newPeep->StaffLawnsMown = 0; @@ -163,13 +163,13 @@ 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); } 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 e057fca248..5d598e1301 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) @@ -98,14 +98,14 @@ 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)]) { staff->PeepFlags |= PEEP_FLAGS_SLOW_WALK; } - staff->ActionFrame = 0; - staff->UpdateCurrentActionSpriteType(); + staff->AnimationFrameNum = 0; + staff->UpdateCurrentAnimationType(); staff->Invalidate(); WindowInvalidateByNumber(WindowClass::Peep, _spriteIndex); 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/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 9a2a58cc24..6cac0b9c92 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -512,9 +512,9 @@ void Guest::GivePassingPeepsPizza(Guest* passingPeep) if (passingPeep->IsActionInterruptable()) { passingPeep->Action = PeepActionType::Wave2; - passingPeep->ActionFrame = 0; - passingPeep->ActionSpriteImageOffset = 0; - passingPeep->UpdateCurrentActionSpriteType(); + passingPeep->AnimationFrameNum = 0; + passingPeep->AnimationImageIdOffset = 0; + passingPeep->UpdateCurrentAnimationType(); } } } @@ -527,9 +527,9 @@ void Guest::MakePassingPeepsSick(Guest* passingPeep) if (passingPeep->IsActionInterruptable()) { passingPeep->Action = PeepActionType::ThrowUp; - passingPeep->ActionFrame = 0; - passingPeep->ActionSpriteImageOffset = 0; - passingPeep->UpdateCurrentActionSpriteType(); + passingPeep->AnimationFrameNum = 0; + passingPeep->AnimationImageIdOffset = 0; + passingPeep->UpdateCurrentAnimationType(); } } @@ -539,7 +539,7 @@ void Guest::GivePassingPeepsIceCream(Guest* passingPeep) return; passingPeep->GiveItem(ShopItem::IceCream); - passingPeep->UpdateSpriteType(); + passingPeep->UpdateAnimationGroup(); } /** @@ -575,9 +575,9 @@ void Guest::UpdateEasterEggInteractions() if (IsActionInterruptable()) { Action = PeepActionType::Joy; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); } } } @@ -780,9 +780,9 @@ void Guest::UpdateMotivesIdle() if (IsActionInterruptable()) { Action = PeepActionType::ThrowUp; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); } } } @@ -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) @@ -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 = PeepActionSpriteType::SittingIdle; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::SittingIdle; + SwitchNextAnimationType(); SittingSubState = PeepSittingSubState::SatDown; @@ -1304,11 +1304,11 @@ void Guest::UpdateSitting() // Set destination to the centre of the tile auto destination = GetLocation().ToTileCentre(); SetDestination(destination, 5); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } - if (SpriteType == PeepSpriteType::Umbrella) + if (AnimationGroup == PeepAnimationGroup::Umbrella) { TryGetUpFromSitting(); return; @@ -1322,9 +1322,9 @@ void Guest::UpdateSitting() return; } Action = PeepActionType::SittingEatFood; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); return; } @@ -1334,7 +1334,7 @@ void Guest::UpdateSitting() TryGetUpFromSitting(); return; } - if (SpriteType == PeepSpriteType::Balloon || SpriteType == PeepSpriteType::Hat) + if (AnimationGroup == PeepAnimationGroup::Balloon || AnimationGroup == PeepAnimationGroup::Hat) { TryGetUpFromSitting(); return; @@ -1350,9 +1350,9 @@ void Guest::UpdateSitting() { Action = PeepActionType::SittingCheckWatch; } - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); 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(); @@ -2398,9 +2398,9 @@ void Guest::ReadMap() if (IsActionInterruptable() && !IsOnLevelCrossing()) { Action = PeepActionType::ReadMap; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); } } @@ -3391,10 +3391,10 @@ void Guest::UpdateBuying() else { Action = PeepActionType::WithdrawMoney; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); ride->no_primary_items_sold++; } @@ -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); @@ -4911,9 +4911,9 @@ void Guest::UpdateRideMazePathfinding() if (Energy > 80 && !(PeepFlags & PEEP_FLAGS_SLOW_WALK) && !ClimateIsRaining() && (ScenarioRand() & 0xFFFF) <= 2427) { Action = PeepActionType::Jump; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); } } @@ -5311,28 +5311,28 @@ void Guest::UpdateWalking() if (PeepFlags & PEEP_FLAGS_WAVING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::Wave2; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (PeepFlags & PEEP_FLAGS_PHOTO && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::TakePhoto; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (PeepFlags & PEEP_FLAGS_PAINTING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::DrawPicture; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -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; @@ -5553,19 +5553,19 @@ void Guest::UpdateWaitingAtCrossing() } Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::WatchRide; + SwitchNextAnimationType(); if (HasFoodOrDrink()) { if ((ScenarioRand() & 0xFFFF) <= 1310) { Action = PeepActionType::EatFood; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; } - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return; } @@ -5573,11 +5573,11 @@ void Guest::UpdateWaitingAtCrossing() if ((ScenarioRand() & 0xFFFF) <= 64) { Action = PeepActionType::Wave2; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; } - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } /** @@ -5632,15 +5632,15 @@ void Guest::UpdateQueuing() PerformNextAction(pathingResult); if (!IsActionInterruptable()) return; - if (SpriteType == PeepSpriteType::Normal) + if (AnimationGroup == PeepAnimationGroup::Normal) { if (TimeInQueue >= 2000 && (0xFFFF & ScenarioRand()) <= 119) { // Eat Food/Look at watch Action = PeepActionType::EatFood; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); } if (TimeInQueue >= 3500 && (0xFFFF & ScenarioRand()) <= 93) { @@ -5650,37 +5650,37 @@ void Guest::UpdateQueuing() } else { - if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextActionSpriteType == PeepActionSpriteType::WatchRide) + if (!(TimeInQueue & 0x3F) && IsActionIdle() && NextAnimationType == PeepAnimationType::WatchRide) { - switch (SpriteType) + switch (AnimationGroup) { - 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; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); break; default: break; @@ -5788,14 +5788,14 @@ void Guest::UpdateWatching() Orientation = (Var37 & 3) * 8; Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; + NextAnimationType = PeepAnimationType::WatchRide; - SwitchNextActionSpriteType(); + SwitchNextAnimationType(); SubState++; TimeToStand = std::clamp(((129 - Energy) * 16 + 50) / 2, 0, 255); - UpdateSpriteType(); + UpdateAnimationGroup(); } else if (SubState == 1) { @@ -5815,9 +5815,9 @@ void Guest::UpdateWatching() if ((ScenarioRand() & 0xFFFF) <= 1310) { Action = PeepActionType::EatFood; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); return; } } @@ -5825,9 +5825,9 @@ void Guest::UpdateWatching() if ((ScenarioRand() & 0xFFFF) <= 655) { Action = PeepActionType::TakePhoto; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); return; } @@ -5836,9 +5836,9 @@ void Guest::UpdateWatching() if ((ScenarioRand() & 0xFFFF) <= 655) { Action = PeepActionType::Wave; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); return; } } @@ -5853,12 +5853,12 @@ void Guest::UpdateWatching() return; SetState(PeepState::Walking); - UpdateSpriteType(); + UpdateAnimationGroup(); // Send peep to the centre of current tile. auto destination = GetLocation().ToTileCentre(); SetDestination(destination, 5); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -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,81 +6732,81 @@ 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::SetAnimationGroup(PeepAnimationGroup new_sprite_type) { - if (SpriteType == new_sprite_type) + if (AnimationGroup == new_sprite_type) return; - SpriteType = new_sprite_type; - ActionSpriteImageOffset = 0; - WalkingFrameNum = 0; + AnimationGroup = new_sprite_type; + AnimationImageIdOffset = 0; + WalkingAnimationFrameNum = 0; if (IsActionInterruptable()) 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; } - ActionSpriteType = PeepActionSpriteType::Invalid; - UpdateCurrentActionSpriteType(); + AnimationType = PeepAnimationType::Invalid; + UpdateCurrentAnimationType(); if (State == PeepState::Sitting) { Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::SittingIdle; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::SittingIdle; + SwitchNextAnimationType(); } if (State == PeepState::Watching) { Action = PeepActionType::Idle; - NextActionSpriteType = PeepActionSpriteType::WatchRide; - SwitchNextActionSpriteType(); + NextAnimationType = PeepAnimationType::WatchRide; + SwitchNextAnimationType(); } } 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 @@ -6814,9 +6814,9 @@ static ItemPref item_order_preference[] = { * * rct2: 0x0069B8CC */ -void Guest::UpdateSpriteType() +void Guest::UpdateAnimationGroup() { - if (SpriteType == PeepSpriteType::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(PeepSpriteType::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(PeepSpriteType::Watching); + SetAnimationGroup(PeepAnimationGroup::Watching); return; } if (Nausea > 170) { - SetSpriteType(PeepSpriteType::VeryNauseous); + SetAnimationGroup(PeepAnimationGroup::VeryNauseous); return; } if (Nausea > 140) { - SetSpriteType(PeepSpriteType::Nauseous); + SetAnimationGroup(PeepAnimationGroup::Nauseous); return; } if (Energy <= 64 && Happiness < 128) { - SetSpriteType(PeepSpriteType::HeadDown); + SetAnimationGroup(PeepAnimationGroup::HeadDown); return; } if (Energy <= 80 && Happiness < 128) { - SetSpriteType(PeepSpriteType::ArmsCrossed); + SetAnimationGroup(PeepAnimationGroup::ArmsCrossed); return; } if (Toilet > 220) { - SetSpriteType(PeepSpriteType::RequireToilet); + SetAnimationGroup(PeepAnimationGroup::RequireToilet); return; } - SetSpriteType(PeepSpriteType::Normal); + SetAnimationGroup(PeepAnimationGroup::Normal); } bool Guest::HeadingForRideOrParkExit() const @@ -6970,9 +6970,9 @@ void Guest::InsertNewThought(PeepThoughtType thoughtType, uint16_t thoughtArgume if (newAction != PeepActionType::Walking && IsActionInterruptable()) { Action = newAction; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); } for (int32_t i = 0; i < kPeepMaxThoughts; ++i) @@ -7119,19 +7119,19 @@ Guest* Guest::Generate(const CoordsXYZ& coords) auto& gameState = GetGameState(); Guest* peep = CreateEntity(); - peep->SpriteType = PeepSpriteType::Normal; + peep->AnimationGroup = PeepAnimationGroup::Normal; peep->OutsideOfPark = true; peep->State = PeepState::Falling; peep->Action = PeepActionType::Walking; peep->SpecialSprite = 0; - peep->ActionSpriteImageOffset = 0; - peep->WalkingFrameNum = 0; - peep->ActionSpriteType = PeepActionSpriteType::None; + peep->AnimationImageIdOffset = 0; + peep->WalkingAnimationFrameNum = 0; + 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->AnimationGroup, 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 = PeepActionSpriteType::WatchRide; + NextAnimationType = PeepAnimationType::WatchRide; if (previous_action != PeepActionType::Idle) Invalidate(); return true; diff --git a/src/openrct2/entity/Guest.h b/src/openrct2/entity/Guest.h index 8266160742..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(PeepSpriteType 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 fa2244ab54..dfa1e02bb4 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -70,54 +70,54 @@ using namespace OpenRCT2; using namespace OpenRCT2::Audio; -static uint8_t _unk_F1AEF0; +static uint8_t _backupAnimationImageIdOffset; static TileElement* _peepRideEntranceExitElement; 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 PeepSpecialSpriteToAnimationGroupMap[] = { + 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 PeepActionToAnimationGroupMap[] = { + 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[] = { +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, @@ -314,40 +314,40 @@ bool Peep::IsOnPathBlockedByVehicle() return FootpathIsBlockedByVehicle(curPos); } -PeepActionSpriteType Peep::GetActionSpriteType() +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)); - return PeepActionSpriteType::None; + EnumValue(Action) >= std::size(PeepActionToAnimationGroupMap) && Action < PeepActionType::Idle, + "Invalid peep action %u", EnumValue(Action)); + return PeepAnimationType::None; } /* * rct2: 0x00693B58 */ -void Peep::UpdateCurrentActionSpriteType() +void Peep::UpdateCurrentAnimationType() { - if (EnumValue(SpriteType) >= EnumValue(PeepSpriteType::Count)) + if (EnumValue(AnimationGroup) >= EnumValue(PeepAnimationGroup::Count)) { return; } - PeepActionSpriteType 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(AnimationGroup, AnimationType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -374,9 +374,9 @@ void Peep::SwitchToSpecialSprite(uint8_t special_sprite_id) if (IsActionInterruptable()) { - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; } - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } void Peep::StateReset() @@ -411,7 +411,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) { PROFILED_FUNCTION(); - _unk_F1AEF0 = ActionSpriteImageOffset; + _backupAnimationImageIdOffset = AnimationImageIdOffset; if (Action == PeepActionType::Idle) { Action = PeepActionType::Walking; @@ -433,15 +433,15 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) if (!UpdateActionAnimation()) { - ActionSpriteImageOffset = 0; + AnimationImageIdOffset = 0; Action = PeepActionType::Walking; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); return { { x, y } }; } // 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(); } @@ -451,16 +451,16 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) bool Peep::UpdateActionAnimation() { - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); - ActionFrame++; + const PeepAnimation& peepAnimation = GetPeepAnimation(AnimationGroup, AnimationType); + 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]; + AnimationImageIdOffset = peepAnimation.frame_offsets[AnimationFrameNum]; return true; } @@ -509,13 +509,13 @@ std::optional Peep::UpdateWalkingAction(const CoordsXY& differenceLoc, void Peep::UpdateWalkingAnimation() { - WalkingFrameNum++; - const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, ActionSpriteType); - if (WalkingFrameNum >= peepAnimation.frame_offsets.size()) + WalkingAnimationFrameNum++; + const PeepAnimation& peepAnimation = GetPeepAnimation(AnimationGroup, AnimationType); + if (WalkingAnimationFrameNum >= peepAnimation.frame_offsets.size()) { - WalkingFrameNum = 0; + WalkingAnimationFrameNum = 0; } - ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingFrameNum]; + AnimationImageIdOffset = peepAnimation.frame_offsets[WalkingAnimationFrameNum]; } void Peep::ThrowUp() @@ -621,8 +621,8 @@ void Peep::PickupAbort(int32_t old_x) SetState(PeepState::Falling); Action = PeepActionType::Walking; SpecialSprite = 0; - ActionSpriteImageOffset = 0; - ActionSpriteType = PeepActionSpriteType::None; + AnimationImageIdOffset = 0; + AnimationType = PeepAnimationType::None; PathCheckOptimisation = 0; } @@ -670,16 +670,16 @@ GameActions::Result Peep::Place(const TileCoordsXYZ& location, bool apply) SetState(PeepState::Falling); Action = PeepActionType::Walking; SpecialSprite = 0; - ActionSpriteImageOffset = 0; - ActionSpriteType = PeepActionSpriteType::None; + AnimationImageIdOffset = 0; + AnimationType = PeepAnimationType::None; PathCheckOptimisation = 0; EntityTweener::Get().Reset(); auto* guest = As(); if (guest != nullptr) { - ActionSpriteType = PeepActionSpriteType::Invalid; + AnimationType = PeepAnimationType::Invalid; guest->HappinessTarget = std::max(guest->HappinessTarget - 10, 0); - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } } @@ -816,10 +816,10 @@ void Peep::UpdateFalling() } Action = PeepActionType::Drowning; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); PeepWindowStateUpdate(this); return; } @@ -1381,9 +1381,9 @@ void PeepApplause() if ((peep->State == PeepState::Walking || peep->State == PeepState::Queuing) && peep->IsActionInterruptable()) { peep->Action = PeepActionType::Clap; - peep->ActionFrame = 0; - peep->ActionSpriteImageOffset = 0; - peep->UpdateCurrentActionSpriteType(); + peep->AnimationFrameNum = 0; + peep->AnimationImageIdOffset = 0; + 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(AnimationGroup, NextAnimationType); SpriteData.Width = spriteBounds->sprite_width; SpriteData.HeightMin = spriteBounds->sprite_height_negative; SpriteData.HeightMax = spriteBounds->sprite_height_positive; @@ -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->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 = _unk_F1AEF0; + 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 = _unk_F1AEF0; + guest->AnimationImageIdOffset = _backupAnimationImageIdOffset; guest->SetState(PeepState::Buying); guest->CurrentRide = rideIndex; guest->SubState = 0; @@ -2739,11 +2739,11 @@ static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height) { peep->RemoveItem(ShopItem::Balloon); - if (peep->SpriteType == PeepSpriteType::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; @@ -2807,11 +2807,11 @@ void Peep::Serialise(DataSerialiser& stream) stream << CurrentCar; stream << CurrentSeat; stream << SpecialSprite; - stream << ActionSpriteType; - stream << NextActionSpriteType; - stream << ActionSpriteImageOffset; + stream << AnimationType; + stream << NextAnimationType; + stream << AnimationImageIdOffset; stream << Action; - stream << ActionFrame; + stream << AnimationFrameNum; stream << StepProgress; stream << PeepDirection; stream << InteractionRideIndex; @@ -2819,7 +2819,7 @@ void Peep::Serialise(DataSerialiser& stream) stream << PathCheckOptimisation; stream << PathfindGoal; stream << PathfindHistory; - stream << WalkingFrameNum; + stream << WalkingAnimationFrameNum; stream << PeepFlags; } @@ -2859,21 +2859,21 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const return; } - PeepActionSpriteType actionSpriteType = ActionSpriteType; - uint8_t imageOffset = ActionSpriteImageOffset; + PeepAnimationType actionAnimationGroup = AnimationType; + uint8_t imageOffset = AnimationImageIdOffset; if (Action == PeepActionType::Idle) { - actionSpriteType = NextActionSpriteType; + 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 != PeepActionSpriteType::Ui) + 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 4d3eeb91e2..35a7d84842 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, @@ -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, @@ -164,7 +164,7 @@ enum class PeepActionSpriteType : uint8_t SittingEatFood = 8, SittingLookAroundLeft = 9, SittingLookAroundRight = 10, - Ui = 11, + Hanging = 11, StaffMower = 12, Wow = 13, ThrowUp = 14, @@ -173,7 +173,7 @@ enum class PeepActionSpriteType : uint8_t Drowning = 17, StaffAnswerCall = 18, StaffAnswerCall2 = 19, - StaffCheckboard = 20, + StaffCheckBoard = 20, StaffFix = 21, StaffFix2 = 22, StaffFixGround = 23, @@ -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 AnimationGroup; uint8_t TshirtColour; uint8_t TrousersColour; uint16_t DestinationX; // Location that the peep is trying to get to @@ -352,13 +352,13 @@ struct Peep : EntityBase }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower uint8_t SpecialSprite; - PeepActionSpriteType 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 - PeepActionSpriteType NextActionSpriteType; - uint8_t ActionSpriteImageOffset; + PeepAnimationType NextAnimationType; + uint8_t AnimationImageIdOffset; PeepActionType Action; - uint8_t ActionFrame; + uint8_t AnimationFrameNum; uint8_t StepProgress; union { @@ -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 @@ -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]] PeepActionSpriteType GetActionSpriteType(); + void SwitchNextAnimationType(); + [[nodiscard]] PeepAnimationType GetAnimationType(); private: void UpdateFalling(); @@ -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 af50f93483..4cdbb2daa9 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -915,10 +915,10 @@ bool Staff::DoEntertainerPathFinding() if (((ScenarioRand() & 0xFFFF) <= 0x4000) && IsActionInterruptable()) { Action = (ScenarioRand() & 1) ? PeepActionType::Wave2 : PeepActionType::Joy; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); EntertainerUpdateNearbyPeeps(); } @@ -958,11 +958,12 @@ 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)); - return newSpriteType; + PeepAnimationGroup newAnimationGroup = static_cast( + value + EnumValue(PeepAnimationGroup::EntertainerPanda)); + return newAnimationGroup; } colour_t StaffGetColour(StaffType staffType) @@ -1113,9 +1114,9 @@ void Staff::UpdateWatering() Orientation = (Var37 & 3) << 3; Action = PeepActionType::StaffWatering; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); SubState = 1; } @@ -1177,9 +1178,9 @@ void Staff::UpdateEmptyingBin() Orientation = (Var37 & 3) << 3; Action = PeepActionType::StaffEmptyBin; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); SubState = 1; } @@ -1194,7 +1195,7 @@ void Staff::UpdateEmptyingBin() UpdateAction(); Invalidate(); - if (ActionFrame != 11) + if (AnimationFrameNum != 11) return; TileElement* tile_element = MapGetFirstElementAt(NextLoc); @@ -1248,7 +1249,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,9 +1267,9 @@ void Staff::UpdateSweeping() if (Var37 != 2) { Action = PeepActionType::StaffSweep; - ActionFrame = 0; - ActionSpriteImageOffset = 0; - UpdateCurrentActionSpriteType(); + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; + UpdateCurrentAnimationType(); return; } StateReset(); @@ -1394,10 +1395,10 @@ void Staff::UpdateAnswering() if (SubState == 0) { Action = PeepActionType::StaffAnswerCall; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); SubState = 1; PeepWindowStateUpdate(this); @@ -1691,27 +1692,27 @@ void Staff::Tick128UpdateStaff() if (AssignedStaffType != StaffType::Security) return; - PeepSpriteType newSpriteType = PeepSpriteType::SecurityAlt; + PeepAnimationGroup newAnimationGroup = PeepAnimationGroup::SecurityAlt; if (State != PeepState::Patrolling) - newSpriteType = PeepSpriteType::Security; + newAnimationGroup = PeepAnimationGroup::Security; - if (SpriteType == newSpriteType) + if (AnimationGroup == newAnimationGroup) return; - SpriteType = newSpriteType; - ActionSpriteImageOffset = 0; - WalkingFrameNum = 0; + 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; } - ActionSpriteType = PeepActionSpriteType::Invalid; - UpdateCurrentActionSpriteType(); + AnimationType = PeepAnimationType::Invalid; + UpdateCurrentAnimationType(); } bool Staff::IsMechanic() const @@ -2092,9 +2093,9 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride& ride) Orientation = PeepDirection << 3; Action = (ScenarioRand() & 1) ? PeepActionType::StaffFix2 : PeepActionType::StaffFix; - ActionSpriteImageOffset = 0; - ActionFrame = 0; - UpdateCurrentActionSpriteType(); + AnimationImageIdOffset = 0; + AnimationFrameNum = 0; + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2106,7 +2107,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; } @@ -2133,10 +2134,10 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) { Orientation = PeepDirection << 3; Action = PeepActionType::StaffFix3; - ActionSpriteImageOffset = 0; - ActionFrame = 0; + AnimationImageIdOffset = 0; + AnimationFrameNum = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2147,7 +2148,7 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) UpdateAction(); Invalidate(); - if (ActionFrame != 0x65) + if (AnimationFrameNum != 0x65) { return false; } @@ -2238,11 +2239,11 @@ bool Staff::UpdateFixingFixStationEnd(bool firstRun) if (!firstRun) { Orientation = PeepDirection << 3; - Action = PeepActionType::StaffCheckboard; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + Action = PeepActionType::StaffCheckBoard; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2354,10 +2355,10 @@ bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride& ride) Orientation = PeepDirection << 3; Action = PeepActionType::StaffFix; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2382,10 +2383,10 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) Orientation = PeepDirection << 3; Action = PeepActionType::StaffFixGround; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (IsActionWalking()) @@ -2396,13 +2397,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,10 +2474,10 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& r Orientation = PeepDirection << 3; Action = PeepActionType::StaffAnswerCall2; - ActionFrame = 0; - ActionSpriteImageOffset = 0; + AnimationFrameNum = 0; + AnimationImageIdOffset = 0; - UpdateCurrentActionSpriteType(); + UpdateCurrentAnimationType(); } if (!IsActionWalking()) 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/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; diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 68c1ea1269..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) { @@ -1787,11 +1787,11 @@ 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.ActionSpriteImageOffset); + cs.ReadWrite(entity.AnimationType); + cs.ReadWrite(entity.NextAnimationType); + cs.ReadWrite(entity.AnimationImageIdOffset); cs.ReadWrite(entity.Action); - cs.ReadWrite(entity.ActionFrame); + cs.ReadWrite(entity.AnimationFrameNum); cs.ReadWrite(entity.StepProgress); if (version <= 1) @@ -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/peep/PeepAnimationData.cpp b/src/openrct2/peep/PeepAnimationData.cpp index f6c8beceff..042f3baa99 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 }; @@ -46,41 +46,41 @@ 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; - 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 }; + 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 }; + 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::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 }; + 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; }(); // 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 }; @@ -88,62 +88,62 @@ 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; - 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 }; + 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 }; + 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; }(); // 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 }; - 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 }; 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; - 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 }; + 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 }; + 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; }(); // 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 - 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 }; + 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 }; + pag[PeepAnimationType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityDrowning }; return pag; }(); @@ -151,21 +151,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -173,21 +173,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -195,21 +195,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -217,21 +217,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -239,21 +239,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -261,21 +261,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -283,21 +283,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -305,21 +305,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -327,21 +327,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -349,21 +349,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -371,21 +371,21 @@ 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 }; // 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 }; + 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 }; + 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 }; return pag; }(); @@ -397,13 +397,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteIceCreamStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceIceCreamSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteIceCreamStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceIceCreamSittingEatFood }; return pag; }(); @@ -415,13 +415,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteChipsStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChipsSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteChipsStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceChipsSittingEatFood }; return pag; }(); @@ -433,13 +433,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteBurgerStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceBurgerSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteBurgerStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceBurgerSittingEatFood }; return pag; }(); @@ -451,13 +451,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteDrinkStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceDrinkSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteDrinkStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceDrinkSittingEatFood }; return pag; }(); @@ -467,11 +467,11 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceBalloonSittingIdle = { 0 }; // 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 }; + 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 }; return pag; }(); @@ -483,13 +483,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteCandyflossStateSittingIdleId, { 13, 16, 6 }, kPeepAnimationSequenceCandyflossSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteCandyflossStateSittingEatFoodId, { 13, 16, 6 }, kPeepAnimationSequenceCandyflossSittingEatFood }; return pag; }(); @@ -499,11 +499,11 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceUmbrellaSittingIdle = { 0 }; // 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 }; + 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 }; return pag; }(); @@ -515,29 +515,29 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpritePizzaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePizzaSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpritePizzaStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequencePizzaSittingEatFood }; return pag; }(); // 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 - 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 }; + 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 }; + pag[PeepAnimationType::Drowning] = { kSecuritySpriteStateDrowningId, { 9, 15, 6 }, kPeepAnimationSequenceSecurityAltDrowning }; return pag; }(); @@ -549,13 +549,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpritePopcornStateSittingIdleId, { 13, 16, 6 }, kPeepAnimationSequencePopcornSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpritePopcornStateSittingEatFoodId, { 13, 16, 6 }, kPeepAnimationSequencePopcornSittingEatFood }; return pag; }(); @@ -563,9 +563,9 @@ 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; - pag[PeepActionSpriteType::None] = { kPeepSpriteArmsCrossedStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceArmsCrossedNone }; + static constexpr PeepAnimations kPeepAnimationsArmsCrossed = []() { + PeepAnimations pag = kPeepAnimationsNormal; + pag[PeepAnimationType::None] = { kPeepSpriteArmsCrossedStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceArmsCrossedNone }; return pag; }(); @@ -573,9 +573,9 @@ 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; - pag[PeepActionSpriteType::None] = { kPeepSpriteHeadDownStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHeadDownNone }; + static constexpr PeepAnimations kPeepAnimationsHeadDown = []() { + PeepAnimations pag = kPeepAnimationsNormal; + pag[PeepAnimationType::None] = { kPeepSpriteHeadDownStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceHeadDownNone }; return pag; }(); @@ -583,9 +583,9 @@ 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; - pag[PeepActionSpriteType::None] = { kPeepSpriteNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNauseousNone }; + static constexpr PeepAnimations kPeepAnimationsNauseous = []() { + PeepAnimations pag = kPeepAnimationsNormal; + pag[PeepAnimationType::None] = { kPeepSpriteNauseousStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceNauseousNone }; return pag; }(); @@ -595,11 +595,11 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceVeryNauseousSittingIdle = { 0 }; // 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 }; + 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 }; return pag; }(); @@ -607,9 +607,9 @@ 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; - pag[PeepActionSpriteType::None] = { kPeepSpriteRequireToiletStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceRequireToiletNone }; + static constexpr PeepAnimations kPeepAnimationsRequireToilet = []() { + PeepAnimations pag = kPeepAnimationsNormal; + pag[PeepAnimationType::None] = { kPeepSpriteRequireToiletStateNoneId, { 8, 16, 5 }, kPeepAnimationSequenceRequireToiletNone }; return pag; }(); @@ -619,11 +619,11 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceHatSittingIdle = { 0 }; // 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 }; + 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 }; return pag; }(); @@ -635,13 +635,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteHotDogStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceHotDogSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteHotDogStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceHotDogSittingEatFood }; return pag; }(); @@ -653,13 +653,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteTentacleStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceTentacleSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteTentacleStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceTentacleSittingEatFood }; return pag; }(); @@ -671,13 +671,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteToffeeAppleStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceToffeeAppleSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteToffeeAppleStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceToffeeAppleSittingEatFood }; return pag; }(); @@ -689,13 +689,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteDonutStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceDonutSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteDonutStateSittingEatFoodId, { 9, 16, 6 }, kPeepAnimationSequenceDonutSittingEatFood }; return pag; }(); @@ -707,13 +707,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteCoffeeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceCoffeeSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteCoffeeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceCoffeeSittingEatFood }; return pag; }(); @@ -725,13 +725,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteChickenStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChickenSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteChickenStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceChickenSittingEatFood }; return pag; }(); @@ -743,13 +743,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteLemonadeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceLemonadeSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteLemonadeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceLemonadeSittingEatFood }; return pag; }(); @@ -757,9 +757,9 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceWatchingWatchRide = { 0 }; // Define animation group for Watching sequences - static constexpr PeepAnimationGroup kPeepAnimationGroupWatching = []() { - PeepAnimationGroup pag = kPeepAnimationGroupNormal; - pag[PeepActionSpriteType::WatchRide] = { kPeepSpriteWatchingStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceWatchingWatchRide }; + static constexpr PeepAnimations kPeepAnimationsWatching = []() { + PeepAnimations pag = kPeepAnimationsNormal; + pag[PeepAnimationType::WatchRide] = { kPeepSpriteWatchingStateWatchRideId, { 8, 16, 5 }, kPeepAnimationSequenceWatchingWatchRide }; return pag; }(); @@ -771,13 +771,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpritePretzelStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePretzelSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpritePretzelStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequencePretzelSittingEatFood }; return pag; }(); @@ -787,11 +787,11 @@ namespace OpenRCT2 static constexpr std::array kPeepAnimationSequenceSunglassesSittingIdle = { 0 }; // 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 }; + 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 }; return pag; }(); @@ -803,13 +803,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSuJongkwaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSuJongkwaSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSuJongkwaStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSuJongkwaSittingEatFood }; return pag; }(); @@ -821,13 +821,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteJuiceStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceJuiceSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteJuiceStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceJuiceSittingEatFood }; return pag; }(); @@ -839,13 +839,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteFunnelCakeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceFunnelCakeSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteFunnelCakeStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceFunnelCakeSittingEatFood }; return pag; }(); @@ -857,13 +857,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteNoodlesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNoodlesSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteNoodlesStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceNoodlesSittingEatFood }; return pag; }(); @@ -875,13 +875,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSausageStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSausageSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSausageStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSausageSittingEatFood }; return pag; }(); @@ -893,13 +893,13 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSoupStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSoupSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSoupStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSoupSittingEatFood }; return pag; }(); @@ -911,76 +911,76 @@ 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; - 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 }; + 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 }; + pag[PeepAnimationType::SittingIdle] = { kPeepSpriteSandwichStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSandwichSittingIdle }; + pag[PeepAnimationType::SittingEatFood] = { kPeepSpriteSandwichStateSittingIdleId, { 9, 16, 6 }, kPeepAnimationSequenceSandwichSittingEatFood }; return pag; }(); // 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, PeepActionSpriteType actionSpriteType) + const PeepAnimation& GetPeepAnimation(PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup) { - return kPeepAnimationEntries[EnumValue(spriteType)][actionSpriteType]; + return kPeepAnimationEntries[EnumValue(spriteType)][actionAnimationGroup]; } - const SpriteBounds& GetSpriteBounds(PeepSpriteType spriteType, PeepActionSpriteType 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 bc814722df..c944a38631 100644 --- a/src/openrct2/peep/PeepAnimationData.h +++ b/src/openrct2/peep/PeepAnimationData.h @@ -20,14 +20,14 @@ namespace OpenRCT2 std::span frame_offsets; }; - struct PeepAnimationGroup + struct PeepAnimations { 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); + PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup = PeepAnimationType::None); const SpriteBounds& GetSpriteBounds( - PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType = PeepActionSpriteType::None); + PeepAnimationGroup spriteType, PeepAnimationType actionAnimationGroup = PeepAnimationType::None); } // namespace OpenRCT2 diff --git a/src/openrct2/peep/PeepSpriteIds.h b/src/openrct2/peep/PeepSpriteIds.h index 0086a52968..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,86 +49,86 @@ namespace OpenRCT2 kMechanicSpriteStateNoneId = 11441, kMechanicSpriteStateWatchRideId = 11465, - kMechanicSpriteStateUiId = 11469, + kMechanicSpriteStateHangingId = 11469, kMechanicSpriteStateDrowningId = 11481, kMechanicSpriteStateStaffAnswerCallId = 11513, - kMechanicSpriteStateStaffCheckboardId = 11597, + kMechanicSpriteStateStaffCheckBoardId = 11597, kMechanicSpriteStateStaffFixId = 11669, kMechanicSpriteStateStaffFixGroundId = 11801, 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/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 6ad1917aa6..4f93370de7 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, @@ -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 - PeepSpriteType 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 @@ -600,14 +600,14 @@ 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 ActionSpriteImageOffset; // 0x70 - uint8_t Action; // 0x71 - uint8_t ActionFrame; // 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 fa02a19652..c21e5cbd51 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1298,16 +1298,16 @@ namespace OpenRCT2::RCT1 void ImportPeep(::Peep* dst, const RCT1::Peep* src) { // Peep vs. staff (including which kind) - dst->SpriteType = RCT1::GetPeepSpriteType(src->SpriteType); + dst->AnimationGroup = RCT1::GetPeepAnimationGroup(src->AnimationGroup); dst->Action = static_cast(src->Action); dst->SpecialSprite = src->SpecialSprite; - dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); - dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; - dst->WalkingFrameNum = src->NoActionFrameNum; - dst->ActionSpriteType = static_cast(src->ActionSpriteType); - dst->ActionFrame = src->ActionFrame; + dst->NextAnimationType = static_cast(src->NextAnimationType); + dst->AnimationImageIdOffset = src->AnimationImageIdOffset; + dst->WalkingAnimationFrameNum = src->NoActionFrameNum; + dst->AnimationType = static_cast(src->AnimationType); + dst->AnimationFrameNum = src->AnimationFrameNum; - const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->ActionSpriteType); + 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 f53949886f..44fb9cc0e8 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -68,52 +68,52 @@ namespace OpenRCT2::RCT1 return map[colour]; } - ::PeepSpriteType GetPeepSpriteType(RCT1::PeepSpriteType rct1SpriteType) + ::PeepAnimationGroup GetPeepAnimationGroup(RCT1::PeepAnimationGroup rct1AnimationGroup) { - 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)) + if (EnumValue(rct1AnimationGroup) >= std::size(map)) { - LOG_WARNING("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1SpriteType)); - return ::PeepSpriteType::Normal; + 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 e5a6a1d05f..54c65f6b09 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 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 9660bb0ef3..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 { @@ -592,13 +592,13 @@ namespace OpenRCT2::RCT2 uint8_t StandingFlags; // 0x6C }; }; - uint8_t SpecialSprite; // 0x6D - uint8_t ActionSpriteType; // 0x6E - uint8_t NextActionSpriteType; // 0x6F - uint8_t ActionSpriteImageOffset; // 0x70 - uint8_t Action; // 0x71 - uint8_t ActionFrame; // 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 4c5b2eef5a..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; @@ -1629,11 +1629,11 @@ 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->ActionSpriteImageOffset = src->ActionSpriteImageOffset; + dst->AnimationType = static_cast(src->AnimationType); + dst->NextAnimationType = static_cast(src->NextAnimationType); + dst->AnimationImageIdOffset = src->AnimationImageIdOffset; 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); @@ -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/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 c144ff394a..adffa367b3 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::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) @@ -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,11 +894,11 @@ 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; - if (animationType != PeepActionSpriteType::Ui) + if (animationType != PeepAnimationType::Hanging) imageId += rotation + frameOffset * 4; else imageId += frameOffset; @@ -917,12 +917,12 @@ 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 == PeepActionSpriteType::None && peep->State == PeepState::Sitting) - action = availableGuestAnimations[PeepActionSpriteType::SittingIdle]; + if (peep->AnimationType == PeepAnimationType::None && peep->State == PeepState::Sitting) + action = availableGuestAnimations[PeepAnimationType::SittingIdle]; return std::string(action); } @@ -938,16 +938,16 @@ namespace OpenRCT2::Scripting } auto* peep = GetGuest(); - peep->ActionSpriteType = peep->NextActionSpriteType = *newType; + peep->AnimationType = peep->NextAnimationType = *newType; auto offset = 0; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -960,9 +960,9 @@ namespace OpenRCT2::Scripting } if (peep->IsActionWalking()) - return peep->WalkingFrameNum; + return peep->WalkingAnimationFrameNum; else - return peep->ActionFrame; + return peep->AnimationFrameNum; } void ScGuest::animationOffset_set(uint8_t offset) @@ -971,16 +971,16 @@ namespace OpenRCT2::Scripting auto* peep = GetGuest(); - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -992,7 +992,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); return static_cast(animationGroup.frame_offsets.size()); } 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..3f6b993ad5 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::Hanging }, + { "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::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", PeepActionSpriteType::None }, - { "watchRide", PeepActionSpriteType::WatchRide }, - { "hanging", PeepActionSpriteType::Ui }, - { "drowning", PeepActionSpriteType::Drowning }, + static const DukEnumMap availableSecurityAnimations({ + { "walking", PeepAnimationType::None }, + { "watchRide", PeepAnimationType::WatchRide }, + { "hanging", PeepAnimationType::Hanging }, + { "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::Hanging }, + { "drowning", PeepAnimationType::Drowning }, + { "joy", PeepAnimationType::Joy }, + { "wave2", PeepAnimationType::Wave2 }, }); ScStaff::ScStaff(EntityId Id) @@ -116,27 +116,27 @@ namespace OpenRCT2::Scripting if (value == "handyman" && peep->AssignedStaffType != StaffType::Handyman) { peep->AssignedStaffType = StaffType::Handyman; - peep->SpriteType = PeepSpriteType::Handyman; + peep->AnimationGroup = PeepAnimationGroup::Handyman; } else if (value == "mechanic" && peep->AssignedStaffType != StaffType::Mechanic) { peep->AssignedStaffType = StaffType::Mechanic; - peep->SpriteType = PeepSpriteType::Mechanic; + peep->AnimationGroup = PeepAnimationGroup::Mechanic; } else if (value == "security" && peep->AssignedStaffType != StaffType::Security) { peep->AssignedStaffType = StaffType::Security; - peep->SpriteType = PeepSpriteType::Security; + peep->AnimationGroup = PeepAnimationGroup::Security; } else if (value == "entertainer" && peep->AssignedStaffType != StaffType::Entertainer) { peep->AssignedStaffType = StaffType::Entertainer; - peep->SpriteType = PeepSpriteType::EntertainerPanda; + peep->AnimationGroup = PeepAnimationGroup::EntertainerPanda; } // Reset state to walking to prevent invalid actions from carrying over peep->Action = PeepActionType::Walking; - peep->ActionSpriteType = peep->NextActionSpriteType = PeepActionSpriteType::None; + peep->AnimationType = peep->NextAnimationType = PeepAnimationType::None; } } @@ -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) { @@ -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 = PeepSpriteType(value.as_uint() + EnumValue(PeepSpriteType::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; } } @@ -291,7 +291,7 @@ namespace OpenRCT2::Scripting } } - const DukEnumMap& ScStaff::animationsByStaffType(StaffType staffType) const + const DukEnumMap& ScStaff::animationsByStaffType(StaffType staffType) const { switch (staffType) { @@ -340,11 +340,11 @@ 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; - if (animationType != PeepActionSpriteType::Ui) + if (animationType != PeepAnimationType::Hanging) imageId += rotation + frameOffset * 4; else imageId += frameOffset; @@ -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,16 +380,16 @@ 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()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -402,9 +402,9 @@ namespace OpenRCT2::Scripting } if (peep->IsActionWalking()) - return peep->WalkingFrameNum; + return peep->WalkingAnimationFrameNum; else - return peep->ActionFrame; + return peep->AnimationFrameNum; } void ScStaff::animationOffset_set(uint8_t offset) @@ -413,16 +413,16 @@ namespace OpenRCT2::Scripting auto* peep = GetStaff(); - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); auto length = animationGroup.frame_offsets.size(); offset %= length; if (peep->IsActionWalking()) - peep->WalkingFrameNum = offset; + peep->WalkingAnimationFrameNum = offset; else - peep->ActionFrame = offset; + peep->AnimationFrameNum = offset; - peep->ActionSpriteImageOffset = animationGroup.frame_offsets[offset]; + peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset]; peep->UpdateSpriteBoundingBox(); } @@ -434,7 +434,7 @@ namespace OpenRCT2::Scripting return 0; } - auto& animationGroup = GetPeepAnimation(peep->SpriteType, peep->ActionSpriteType); + auto& animationGroup = GetPeepAnimation(peep->AnimationGroup, peep->AnimationType); return static_cast(animationGroup.frame_offsets.size()); } 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; 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..72cfa5ece1 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -210,9 +210,9 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) continue; peep->Action = PeepActionType::CheckTime; - peep->ActionFrame = 0; - peep->ActionSpriteImageOffset = 0; - peep->UpdateCurrentActionSpriteType(); + peep->AnimationFrameNum = 0; + peep->AnimationImageIdOffset = 0; + peep->UpdateCurrentAnimationType(); peep->Invalidate(); break; }