mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
WIP: start reworking PeepAnimationGroup
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../core/Json.hpp"
|
||||
#include "../peep/PeepAnimations.h"
|
||||
#include "../rct12/RCT12.h"
|
||||
|
||||
using namespace OpenRCT2;
|
||||
|
||||
@@ -94,7 +95,7 @@ void PeepAnimationsObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
if (groupJson.contains("legacyPosition"))
|
||||
{
|
||||
auto position = Json::GetNumber<uint8_t>(groupJson["legacyPosition"]);
|
||||
if (position <= EnumValue(PeepAnimationGroup::Count))
|
||||
if (position <= EnumValue(RCT12PeepAnimationGroup::Count))
|
||||
{
|
||||
group.legacyPosition = static_cast<PeepAnimationGroup>(position);
|
||||
}
|
||||
@@ -104,6 +105,16 @@ void PeepAnimationsObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
}
|
||||
}
|
||||
|
||||
ImageIndex PeepAnimationsObject::GetInlineImageId() const
|
||||
{
|
||||
return _imageOffsetId;
|
||||
}
|
||||
|
||||
const PeepAnimation& PeepAnimationsObject::GetPeepAnimation(PeepAnimationGroup animGroup, PeepAnimationType animType) const
|
||||
{
|
||||
return _animationGroups[EnumValue(animGroup)][animType];
|
||||
}
|
||||
|
||||
size_t PeepAnimationsObject::GetNumAnimationGroups() const
|
||||
{
|
||||
return _animationGroups.size();
|
||||
|
||||
Reference in New Issue
Block a user