forked from rosebudai/OpenRCT2-Web
Rename WalkingFrameNum to WalkingAnimationFrameNum
This commit is contained in:
1 parent
2edf8b472a
commit
ee7bb61bb0
11 files changed
+20
-20
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const
|
||||
newPeep->Action = PeepActionType::Walking;
|
||||
newPeep->SpecialSprite = 0;
|
||||
newPeep->ActionSpriteImageOffset = 0;
|
||||
newPeep->WalkingFrameNum = 0;
|
||||
newPeep->WalkingAnimationFrameNum = 0;
|
||||
newPeep->AnimationType = PeepAnimationType::None;
|
||||
newPeep->PathCheckOptimisation = 0;
|
||||
newPeep->PeepFlags = 0;
|
||||
|
||||
@@ -6739,7 +6739,7 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type)
|
||||
|
||||
SpriteType = new_sprite_type;
|
||||
ActionSpriteImageOffset = 0;
|
||||
WalkingFrameNum = 0;
|
||||
WalkingAnimationFrameNum = 0;
|
||||
|
||||
if (IsActionInterruptable())
|
||||
Action = PeepActionType::Walking;
|
||||
@@ -7125,7 +7125,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords)
|
||||
peep->Action = PeepActionType::Walking;
|
||||
peep->SpecialSprite = 0;
|
||||
peep->ActionSpriteImageOffset = 0;
|
||||
peep->WalkingFrameNum = 0;
|
||||
peep->WalkingAnimationFrameNum = 0;
|
||||
peep->AnimationType = PeepAnimationType::None;
|
||||
peep->PeepFlags = 0;
|
||||
peep->FavouriteRide = RideId::GetNull();
|
||||
|
||||
@@ -509,13 +509,13 @@ std::optional<CoordsXY> Peep::UpdateWalkingAction(const CoordsXY& differenceLoc,
|
||||
|
||||
void Peep::UpdateWalkingAnimation()
|
||||
{
|
||||
WalkingFrameNum++;
|
||||
WalkingAnimationFrameNum++;
|
||||
const PeepAnimation& peepAnimation = GetPeepAnimation(SpriteType, AnimationType);
|
||||
if (WalkingFrameNum >= peepAnimation.frame_offsets.size())
|
||||
if (WalkingAnimationFrameNum >= peepAnimation.frame_offsets.size())
|
||||
{
|
||||
WalkingFrameNum = 0;
|
||||
WalkingAnimationFrameNum = 0;
|
||||
}
|
||||
ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingFrameNum];
|
||||
ActionSpriteImageOffset = peepAnimation.frame_offsets[WalkingAnimationFrameNum];
|
||||
}
|
||||
|
||||
void Peep::ThrowUp()
|
||||
@@ -2819,7 +2819,7 @@ void Peep::Serialise(DataSerialiser& stream)
|
||||
stream << PathCheckOptimisation;
|
||||
stream << PathfindGoal;
|
||||
stream << PathfindHistory;
|
||||
stream << WalkingFrameNum;
|
||||
stream << WalkingAnimationFrameNum;
|
||||
stream << PeepFlags;
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ struct Peep : EntityBase
|
||||
uint8_t PathCheckOptimisation; // see peep.checkForPath
|
||||
TileCoordsXYZD PathfindGoal;
|
||||
std::array<TileCoordsXYZD, 4> PathfindHistory;
|
||||
uint8_t WalkingFrameNum;
|
||||
uint8_t WalkingAnimationFrameNum;
|
||||
uint32_t PeepFlags;
|
||||
|
||||
public: // Peep
|
||||
|
||||
@@ -1700,7 +1700,7 @@ void Staff::Tick128UpdateStaff()
|
||||
|
||||
SpriteType = newSpriteType;
|
||||
ActionSpriteImageOffset = 0;
|
||||
WalkingFrameNum = 0;
|
||||
WalkingAnimationFrameNum = 0;
|
||||
if (Action < PeepActionType::Idle)
|
||||
Action = PeepActionType::Walking;
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -1303,7 +1303,7 @@ namespace OpenRCT2::RCT1
|
||||
dst->SpecialSprite = src->SpecialSprite;
|
||||
dst->NextAnimationType = static_cast<PeepAnimationType>(src->NextAnimationType);
|
||||
dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset;
|
||||
dst->WalkingFrameNum = src->NoActionFrameNum;
|
||||
dst->WalkingAnimationFrameNum = src->NoActionFrameNum;
|
||||
dst->AnimationType = static_cast<PeepAnimationType>(src->AnimationType);
|
||||
dst->ActionFrame = src->ActionFrame;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -942,7 +942,7 @@ namespace OpenRCT2::Scripting
|
||||
|
||||
auto offset = 0;
|
||||
if (peep->IsActionWalking())
|
||||
peep->WalkingFrameNum = offset;
|
||||
peep->WalkingAnimationFrameNum = offset;
|
||||
else
|
||||
peep->ActionFrame = offset;
|
||||
|
||||
@@ -960,7 +960,7 @@ namespace OpenRCT2::Scripting
|
||||
}
|
||||
|
||||
if (peep->IsActionWalking())
|
||||
return peep->WalkingFrameNum;
|
||||
return peep->WalkingAnimationFrameNum;
|
||||
else
|
||||
return peep->ActionFrame;
|
||||
}
|
||||
@@ -976,7 +976,7 @@ namespace OpenRCT2::Scripting
|
||||
offset %= length;
|
||||
|
||||
if (peep->IsActionWalking())
|
||||
peep->WalkingFrameNum = offset;
|
||||
peep->WalkingAnimationFrameNum = offset;
|
||||
else
|
||||
peep->ActionFrame = offset;
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace OpenRCT2::Scripting
|
||||
|
||||
auto offset = 0;
|
||||
if (peep->IsActionWalking())
|
||||
peep->WalkingFrameNum = offset;
|
||||
peep->WalkingAnimationFrameNum = offset;
|
||||
else
|
||||
peep->ActionFrame = offset;
|
||||
|
||||
@@ -402,7 +402,7 @@ namespace OpenRCT2::Scripting
|
||||
}
|
||||
|
||||
if (peep->IsActionWalking())
|
||||
return peep->WalkingFrameNum;
|
||||
return peep->WalkingAnimationFrameNum;
|
||||
else
|
||||
return peep->ActionFrame;
|
||||
}
|
||||
@@ -418,7 +418,7 @@ namespace OpenRCT2::Scripting
|
||||
offset %= length;
|
||||
|
||||
if (peep->IsActionWalking())
|
||||
peep->WalkingFrameNum = offset;
|
||||
peep->WalkingAnimationFrameNum = offset;
|
||||
else
|
||||
peep->ActionFrame = offset;
|
||||
|
||||
|
||||
Reference in new issue
Block a user