//
// SpriteAnimationManager::callAnimationFinished from 0x1003244b8 to 0x100324574 (188 bytes)
//
// 1 xrefs:
// > SpriteAnimationManager::animationFinished @ 0x100323af0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall SpriteAnimationManager::callAnimationFinished(SpriteAnimationManager *a1)
{
std::string *p_m_currentAnimation; // x20
_BOOL4 v3; // w0
std::string *p_m_nextAnimation; // x8
void **v5; // x1
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v7; // [xsp+1Fh] [xbp-31h]
void *__dst[2]; // [xsp+20h] [xbp-30h] BYREF
char *longStorage; // [xsp+30h] [xbp-20h]
p_m_currentAnimation = &a1->m_currentAnimation;
sub_100009900(__p, "not_used");
v3 = sub_1000045BC(p_m_currentAnimation, __p);
p_m_nextAnimation = &a1->m_nextAnimation;
if ( !v3 )
p_m_nextAnimation = p_m_currentAnimation;
if ( p_m_nextAnimation->m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(__dst, (void *)p_m_nextAnimation->m_data.m_long.capacitym1, p_m_nextAnimation->m_data.m_long.size);
}
else
{
*(_OWORD *)__dst = *(_OWORD *)&p_m_nextAnimation->m_data.m_short.sizex2;
longStorage = p_m_nextAnimation->m_data.m_long.longStorage;
}
if ( v7 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(longStorage) >= 0 )
v5 = __dst;
else
v5 = (void **)__dst[0];
((void (__fastcall *)(CCAnimatedSprite *, void **))a1->m_sprite->animationFinished)(a1->m_sprite, v5);
if ( SHIBYTE(longStorage) < 0 )
operator delete(__dst[0]);
}