1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Add checks to ensure an animation object is selected for each peep type

This commit is contained in:
Aaron van Geffen
2024-12-07 13:40:30 +01:00
parent 42adf84723
commit 7efe73f6ac
10 changed files with 65 additions and 2 deletions

View File

@@ -16,6 +16,7 @@
#include "../core/Json.hpp"
#include "../peep/PeepAnimations.h"
#include "../rct12/RCT12.h"
#include "ObjectRepository.h"
using namespace OpenRCT2;
@@ -155,3 +156,8 @@ void PeepAnimationsObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_
GfxDrawSprite(dpi, ImageId(_imageOffsetId + 1, COLOUR_BRIGHT_RED, COLOUR_TEAL), centre + ScreenCoordsXY{ +32, -24 });
GfxDrawSprite(dpi, ImageId(_imageOffsetId + 3, COLOUR_BRIGHT_RED, COLOUR_TEAL), centre + ScreenCoordsXY{ -32, +32 });
}
void PeepAnimationsObject::SetRepositoryItem(ObjectRepositoryItem* item) const
{
item->PeepAnimationsInfo.PeepType = EnumValue(_peepType);
}