mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
Rename members of RCT12PeepAnimationGroup
This commit is contained in:
@@ -87,14 +87,14 @@ namespace OpenRCT2
|
||||
if (groupJson.contains("legacyPosition"))
|
||||
{
|
||||
auto position = Json::GetNumber<uint8_t>(groupJson["legacyPosition"]);
|
||||
if (position <= EnumValue(RCT12PeepAnimationGroup::Count))
|
||||
if (position <= EnumValue(RCT12PeepAnimationGroup::count))
|
||||
{
|
||||
group.legacyPosition = static_cast<RCT12PeepAnimationGroup>(position);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
group.legacyPosition = RCT12PeepAnimationGroup::Invalid;
|
||||
group.legacyPosition = RCT12PeepAnimationGroup::invalid;
|
||||
}
|
||||
|
||||
group.isSlowWalking = Json::GetBoolean(groupJson["isSlowWalking"], false);
|
||||
|
||||
@@ -2313,7 +2313,7 @@ static AnimObjectConversionTable BuildPeepAnimObjectConversionTable()
|
||||
{
|
||||
auto pag = PeepAnimationGroup(j);
|
||||
auto legacyPosition = object->GetLegacyPosition(pag);
|
||||
if (legacyPosition == RCT12PeepAnimationGroup::Invalid)
|
||||
if (legacyPosition == RCT12PeepAnimationGroup::invalid)
|
||||
continue;
|
||||
|
||||
table[legacyPosition] = { i, pag };
|
||||
|
||||
@@ -71,46 +71,46 @@ namespace OpenRCT2::RCT1
|
||||
{
|
||||
static constexpr RCT12PeepAnimationGroup map[] =
|
||||
{
|
||||
RCT12PeepAnimationGroup::Normal, // 0x00
|
||||
RCT12PeepAnimationGroup::Handyman, // 0x01
|
||||
RCT12PeepAnimationGroup::Mechanic, // 0x02
|
||||
RCT12PeepAnimationGroup::Security, // 0x03
|
||||
RCT12PeepAnimationGroup::EntertainerPanda, // 0x04
|
||||
RCT12PeepAnimationGroup::EntertainerTiger, // 0x05
|
||||
RCT12PeepAnimationGroup::EntertainerElephant, // 0x06
|
||||
RCT12PeepAnimationGroup::EntertainerRoman, // 0x07
|
||||
RCT12PeepAnimationGroup::EntertainerGorilla, // 0x08
|
||||
RCT12PeepAnimationGroup::EntertainerSnowman, // 0x09
|
||||
RCT12PeepAnimationGroup::EntertainerKnight, // 0x0A
|
||||
RCT12PeepAnimationGroup::EntertainerAstronaut, // 0x0B
|
||||
RCT12PeepAnimationGroup::IceCream, // 0x0C
|
||||
RCT12PeepAnimationGroup::Chips, // 0x0D
|
||||
RCT12PeepAnimationGroup::Burger, // 0x0E
|
||||
RCT12PeepAnimationGroup::Drink, // 0x0F
|
||||
RCT12PeepAnimationGroup::Balloon, // 0x10
|
||||
RCT12PeepAnimationGroup::Candyfloss, // 0x11
|
||||
RCT12PeepAnimationGroup::Umbrella, // 0x12
|
||||
RCT12PeepAnimationGroup::Pizza, // 0x13
|
||||
RCT12PeepAnimationGroup::SecurityAlt, // 0x14
|
||||
RCT12PeepAnimationGroup::Popcorn, // 0x15
|
||||
RCT12PeepAnimationGroup::ArmsCrossed, // 0x16
|
||||
RCT12PeepAnimationGroup::HeadDown, // 0x17
|
||||
RCT12PeepAnimationGroup::Nauseous, // 0x18
|
||||
RCT12PeepAnimationGroup::VeryNauseous, // 0x19
|
||||
RCT12PeepAnimationGroup::RequireToilet, // 0x1A
|
||||
RCT12PeepAnimationGroup::Hat, // 0x1B
|
||||
RCT12PeepAnimationGroup::HotDog, // 0x1C
|
||||
RCT12PeepAnimationGroup::Tentacle, // 0x1D
|
||||
RCT12PeepAnimationGroup::ToffeeApple, // 0x1E
|
||||
RCT12PeepAnimationGroup::Doughnut, // 0x1F
|
||||
RCT12PeepAnimationGroup::Coffee, // 0x20
|
||||
RCT12PeepAnimationGroup::Chicken, // 0x21
|
||||
RCT12PeepAnimationGroup::Lemonade, // 0x22
|
||||
RCT12PeepAnimationGroup::normal, // 0x00
|
||||
RCT12PeepAnimationGroup::handyman, // 0x01
|
||||
RCT12PeepAnimationGroup::mechanic, // 0x02
|
||||
RCT12PeepAnimationGroup::security, // 0x03
|
||||
RCT12PeepAnimationGroup::entertainerPanda, // 0x04
|
||||
RCT12PeepAnimationGroup::entertainerTiger, // 0x05
|
||||
RCT12PeepAnimationGroup::entertainerElephant, // 0x06
|
||||
RCT12PeepAnimationGroup::entertainerRoman, // 0x07
|
||||
RCT12PeepAnimationGroup::entertainerGorilla, // 0x08
|
||||
RCT12PeepAnimationGroup::entertainerSnowman, // 0x09
|
||||
RCT12PeepAnimationGroup::entertainerKnight, // 0x0A
|
||||
RCT12PeepAnimationGroup::entertainerAstronaut, // 0x0B
|
||||
RCT12PeepAnimationGroup::iceCream, // 0x0C
|
||||
RCT12PeepAnimationGroup::chips, // 0x0D
|
||||
RCT12PeepAnimationGroup::burger, // 0x0E
|
||||
RCT12PeepAnimationGroup::drink, // 0x0F
|
||||
RCT12PeepAnimationGroup::balloon, // 0x10
|
||||
RCT12PeepAnimationGroup::candyfloss, // 0x11
|
||||
RCT12PeepAnimationGroup::umbrella, // 0x12
|
||||
RCT12PeepAnimationGroup::pizza, // 0x13
|
||||
RCT12PeepAnimationGroup::securityAlt, // 0x14
|
||||
RCT12PeepAnimationGroup::popcorn, // 0x15
|
||||
RCT12PeepAnimationGroup::armsCrossed, // 0x16
|
||||
RCT12PeepAnimationGroup::headDown, // 0x17
|
||||
RCT12PeepAnimationGroup::nauseous, // 0x18
|
||||
RCT12PeepAnimationGroup::veryNauseous, // 0x19
|
||||
RCT12PeepAnimationGroup::requireToilet, // 0x1A
|
||||
RCT12PeepAnimationGroup::hat, // 0x1B
|
||||
RCT12PeepAnimationGroup::hotDog, // 0x1C
|
||||
RCT12PeepAnimationGroup::tentacle, // 0x1D
|
||||
RCT12PeepAnimationGroup::toffeeApple, // 0x1E
|
||||
RCT12PeepAnimationGroup::doughnut, // 0x1F
|
||||
RCT12PeepAnimationGroup::coffee, // 0x20
|
||||
RCT12PeepAnimationGroup::chicken, // 0x21
|
||||
RCT12PeepAnimationGroup::lemonade, // 0x22
|
||||
};
|
||||
if (EnumValue(rct1AnimationGroup) >= std::size(map))
|
||||
{
|
||||
LOG_WARNING("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1AnimationGroup));
|
||||
return RCT12PeepAnimationGroup::Normal;
|
||||
return RCT12PeepAnimationGroup::normal;
|
||||
}
|
||||
return map[EnumValue(rct1AnimationGroup)];
|
||||
}
|
||||
|
||||
@@ -941,57 +941,57 @@ enum class RCT12PeepType : uint8_t
|
||||
|
||||
enum class RCT12PeepAnimationGroup : uint8_t
|
||||
{
|
||||
Normal = 0,
|
||||
Handyman = 1,
|
||||
Mechanic = 2,
|
||||
Security = 3,
|
||||
EntertainerPanda = 4,
|
||||
EntertainerTiger = 5,
|
||||
EntertainerElephant = 6,
|
||||
EntertainerRoman = 7,
|
||||
EntertainerGorilla = 8,
|
||||
EntertainerSnowman = 9,
|
||||
EntertainerKnight = 10,
|
||||
EntertainerAstronaut = 11,
|
||||
EntertainerBandit = 12,
|
||||
EntertainerSheriff = 13,
|
||||
EntertainerPirate = 14,
|
||||
IceCream = 15,
|
||||
Chips = 16,
|
||||
Burger = 17,
|
||||
Drink = 18,
|
||||
Balloon = 19,
|
||||
Candyfloss = 20,
|
||||
Umbrella = 21,
|
||||
Pizza = 22,
|
||||
SecurityAlt = 23,
|
||||
Popcorn = 24,
|
||||
ArmsCrossed = 25,
|
||||
HeadDown = 26,
|
||||
Nauseous = 27,
|
||||
VeryNauseous = 28,
|
||||
RequireToilet = 29,
|
||||
Hat = 30,
|
||||
HotDog = 31,
|
||||
Tentacle = 32,
|
||||
ToffeeApple = 33,
|
||||
Doughnut = 34,
|
||||
Coffee = 35,
|
||||
Chicken = 36,
|
||||
Lemonade = 37,
|
||||
Watching = 38,
|
||||
Pretzel = 39,
|
||||
Sunglasses = 40,
|
||||
Sujeonggwa = 41,
|
||||
Juice = 42,
|
||||
FunnelCake = 43,
|
||||
Noodles = 44,
|
||||
Sausage = 45,
|
||||
Soup = 46,
|
||||
Sandwich = 47,
|
||||
Count = 48,
|
||||
normal = 0,
|
||||
handyman = 1,
|
||||
mechanic = 2,
|
||||
security = 3,
|
||||
entertainerPanda = 4,
|
||||
entertainerTiger = 5,
|
||||
entertainerElephant = 6,
|
||||
entertainerRoman = 7,
|
||||
entertainerGorilla = 8,
|
||||
entertainerSnowman = 9,
|
||||
entertainerKnight = 10,
|
||||
entertainerAstronaut = 11,
|
||||
entertainerBandit = 12,
|
||||
entertainerSheriff = 13,
|
||||
entertainerPirate = 14,
|
||||
iceCream = 15,
|
||||
chips = 16,
|
||||
burger = 17,
|
||||
drink = 18,
|
||||
balloon = 19,
|
||||
candyfloss = 20,
|
||||
umbrella = 21,
|
||||
pizza = 22,
|
||||
securityAlt = 23,
|
||||
popcorn = 24,
|
||||
armsCrossed = 25,
|
||||
headDown = 26,
|
||||
nauseous = 27,
|
||||
veryNauseous = 28,
|
||||
requireToilet = 29,
|
||||
hat = 30,
|
||||
hotDog = 31,
|
||||
tentacle = 32,
|
||||
toffeeApple = 33,
|
||||
doughnut = 34,
|
||||
coffee = 35,
|
||||
chicken = 36,
|
||||
lemonade = 37,
|
||||
watching = 38,
|
||||
pretzel = 39,
|
||||
sunglasses = 40,
|
||||
sujeonggwa = 41,
|
||||
juice = 42,
|
||||
funnelCake = 43,
|
||||
noodles = 44,
|
||||
sausage = 45,
|
||||
soup = 46,
|
||||
sandwich = 47,
|
||||
count = 48,
|
||||
|
||||
Invalid = 255
|
||||
invalid = 255
|
||||
};
|
||||
|
||||
struct RCT12EntityBase
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace OpenRCT2::Scripting
|
||||
}
|
||||
else if (value.type() == DukValue::Type::NUMBER)
|
||||
{
|
||||
auto target = RCT12PeepAnimationGroup(value.as_uint() + EnumValue(RCT12PeepAnimationGroup::EntertainerPanda));
|
||||
auto target = RCT12PeepAnimationGroup(value.as_uint() + EnumValue(RCT12PeepAnimationGroup::entertainerPanda));
|
||||
costume = std::find_if(
|
||||
costumes.begin(), costumes.end(), [target](auto& candidate) { return candidate.legacyPosition == target; });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user