mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #21985 from AaronVanGeffen/guest-constants
Use constants for balloon/umbrella/hat sprites in more places
This commit is contained in:
commit
ca1118c2f1
|
@ -26,6 +26,7 @@
|
|||
#include <openrct2/management/Finance.h>
|
||||
#include <openrct2/management/NewsItem.h>
|
||||
#include <openrct2/peep/PeepAnimationData.h>
|
||||
#include <openrct2/peep/PeepSpriteIds.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
|
||||
|
@ -296,15 +297,18 @@ static Widget window_game_bottom_toolbar_widgets[] =
|
|||
auto* guest = peep->As<Guest>();
|
||||
if (guest != nullptr)
|
||||
{
|
||||
if (image_id_base >= 0x2A1D && image_id_base < 0x2A3D)
|
||||
if (image_id_base >= kPeepSpriteBalloonStateWatchRideId
|
||||
&& image_id_base < kPeepSpriteBalloonStateSittingIdleId + 4)
|
||||
{
|
||||
GfxDrawSprite(cliped_dpi, ImageId(image_id_base + 32, guest->BalloonColour), clipCoords);
|
||||
}
|
||||
else if (image_id_base >= 0x2BBD && image_id_base < 0x2BDD)
|
||||
if (image_id_base >= kPeepSpriteUmbrellaStateNoneId
|
||||
&& image_id_base < kPeepSpriteUmbrellaStateSittingIdleId + 4)
|
||||
{
|
||||
GfxDrawSprite(cliped_dpi, ImageId(image_id_base + 32, guest->UmbrellaColour), clipCoords);
|
||||
}
|
||||
else if (image_id_base >= 0x29DD && image_id_base < 0x29FD)
|
||||
if (image_id_base >= kPeepSpriteHatStateWatchRideId
|
||||
&& image_id_base < kPeepSpriteHatStateSittingIdleId + 4)
|
||||
{
|
||||
GfxDrawSprite(cliped_dpi, ImageId(image_id_base + 32, guest->HatColour), clipCoords);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <openrct2/management/Marketing.h>
|
||||
#include <openrct2/network/network.h>
|
||||
#include <openrct2/peep/PeepAnimationData.h>
|
||||
#include <openrct2/peep/PeepSpriteIds.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/ShopItem.h>
|
||||
#include <openrct2/scenario/Scenario.h>
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue