From 73c592b13715cd2bd6e5fd6e9c61873f70d66053 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Tue, 7 May 2024 22:57:56 +0200 Subject: [PATCH] Guest window: use constants for balloon/umbrella/hat sprites --- src/openrct2-ui/windows/Guest.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index de6f83a9e6..7a840512ef 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -561,19 +562,21 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT); if (guest != nullptr) { // If holding a balloon - if (animationFrame >= 0x2A1D && animationFrame < 0x2A3D) + if (animationFrame >= kPeepSpriteBalloonStateWatchRideId + && animationFrame < kPeepSpriteBalloonStateSittingIdleId + 4) { GfxDrawSprite(clipDpi, ImageId(animationFrame + 32, guest->BalloonColour), screenCoords); } // If holding umbrella - if (animationFrame >= 0x2BBD && animationFrame < 0x2BDD) + if (animationFrame >= kPeepSpriteUmbrellaStateNoneId + && animationFrame < kPeepSpriteUmbrellaStateSittingIdleId + 4) { GfxDrawSprite(clipDpi, ImageId(animationFrame + 32, guest->UmbrellaColour), screenCoords); } // If wearing hat - if (animationFrame >= 0x29DD && animationFrame < 0x29FD) + if (animationFrame >= kPeepSpriteHatStateWatchRideId && animationFrame < kPeepSpriteHatStateSittingIdleId + 4) { GfxDrawSprite(clipDpi, ImageId(animationFrame + 32, guest->HatColour), screenCoords); }