mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove AsDuck
This commit is contained in:
parent
6e78d8d654
commit
bee424585a
|
@ -79,16 +79,6 @@ template<> bool SpriteBase::Is<Duck>() const
|
||||||
return sprite_identifier == SPRITE_IDENTIFIER_MISC && type == SPRITE_MISC_DUCK;
|
return sprite_identifier == SPRITE_IDENTIFIER_MISC && type == SPRITE_MISC_DUCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
Duck* rct_sprite::AsDuck()
|
|
||||||
{
|
|
||||||
Duck* result = nullptr;
|
|
||||||
if (generic.Is<Duck>())
|
|
||||||
{
|
|
||||||
return reinterpret_cast<Duck*>(this);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Duck::Invalidate()
|
void Duck::Invalidate()
|
||||||
{
|
{
|
||||||
invalidate_sprite_1(this);
|
invalidate_sprite_1(this);
|
||||||
|
|
|
@ -888,7 +888,7 @@ uint16_t remove_floating_sprites()
|
||||||
}
|
}
|
||||||
else if (rctSprite->generic.Is<Duck>())
|
else if (rctSprite->generic.Is<Duck>())
|
||||||
{
|
{
|
||||||
if (rctSprite->AsDuck()->IsFlying())
|
if (rctSprite->generic.As<Duck>()->IsFlying())
|
||||||
{
|
{
|
||||||
rctSprite->duck.Remove();
|
rctSprite->duck.Remove();
|
||||||
sprite_misc_update(rctSprite);
|
sprite_misc_update(rctSprite);
|
||||||
|
|
|
@ -137,7 +137,6 @@ union rct_sprite
|
||||||
CrashSplashParticle crash_splash;
|
CrashSplashParticle crash_splash;
|
||||||
SteamParticle steam_particle;
|
SteamParticle steam_particle;
|
||||||
|
|
||||||
Duck* AsDuck();
|
|
||||||
MoneyEffect* AsMoneyEffect();
|
MoneyEffect* AsMoneyEffect();
|
||||||
Peep* AsPeep();
|
Peep* AsPeep();
|
||||||
// Default constructor to prevent non trivial construction issues
|
// Default constructor to prevent non trivial construction issues
|
||||||
|
|
Loading…
Reference in New Issue