1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Rename fields of PeepAnimation

This commit is contained in:
Gymnasiast
2025-10-05 01:27:23 +02:00
parent be23fbc98c
commit aa84394e7b
14 changed files with 40 additions and 40 deletions

View File

@@ -873,9 +873,9 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, *animationType);
for (auto frameOffset : animationGroup.frame_offsets)
for (auto frameOffset : animationGroup.frameOffsets)
{
auto imageId = animationGroup.base_image;
auto imageId = animationGroup.baseImage;
if (animationType != PeepAnimationType::Hanging)
imageId += rotation + frameOffset * 4;
else
@@ -930,7 +930,7 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, peep->AnimationType);
peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset];
peep->AnimationImageIdOffset = animationGroup.frameOffsets[offset];
peep->Invalidate();
peep->UpdateSpriteBoundingBox();
peep->Invalidate();
@@ -960,7 +960,7 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, peep->AnimationType);
auto length = animationGroup.frame_offsets.size();
auto length = animationGroup.frameOffsets.size();
offset %= length;
if (peep->IsActionWalking())
@@ -968,7 +968,7 @@ namespace OpenRCT2::Scripting
else
peep->AnimationFrameNum = offset;
peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset];
peep->AnimationImageIdOffset = animationGroup.frameOffsets[offset];
peep->UpdateSpriteBoundingBox();
}
@@ -984,7 +984,7 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, peep->AnimationType);
return static_cast<uint8_t>(animationGroup.frame_offsets.size());
return static_cast<uint8_t>(animationGroup.frameOffsets.size());
}
ScThought::ScThought(PeepThought backing)

View File

@@ -295,9 +295,9 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, *animationType);
for (auto frameOffset : animationGroup.frame_offsets)
for (auto frameOffset : animationGroup.frameOffsets)
{
auto imageId = animationGroup.base_image;
auto imageId = animationGroup.baseImage;
if (animationType != PeepAnimationType::Hanging)
imageId += rotation + frameOffset * 4;
else
@@ -346,7 +346,7 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, peep->AnimationType);
peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset];
peep->AnimationImageIdOffset = animationGroup.frameOffsets[offset];
peep->Invalidate();
peep->UpdateSpriteBoundingBox();
peep->Invalidate();
@@ -376,7 +376,7 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, peep->AnimationType);
auto length = animationGroup.frame_offsets.size();
auto length = animationGroup.frameOffsets.size();
offset %= length;
if (peep->IsActionWalking())
@@ -384,7 +384,7 @@ namespace OpenRCT2::Scripting
else
peep->AnimationFrameNum = offset;
peep->AnimationImageIdOffset = animationGroup.frame_offsets[offset];
peep->AnimationImageIdOffset = animationGroup.frameOffsets[offset];
peep->Invalidate();
peep->UpdateSpriteBoundingBox();
peep->Invalidate();
@@ -402,7 +402,7 @@ namespace OpenRCT2::Scripting
auto* animObj = objManager.GetLoadedObject<PeepAnimationsObject>(peep->AnimationObjectIndex);
const auto& animationGroup = animObj->GetPeepAnimation(peep->AnimationGroup, peep->AnimationType);
return static_cast<uint8_t>(animationGroup.frame_offsets.size());
return static_cast<uint8_t>(animationGroup.frameOffsets.size());
}
ScHandyman::ScHandyman(EntityId Id)