//
// AnimatedGameObject::deactivateObject from 0x100383e8c to 0x100383f28 (156 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007f5600
//
// 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 AnimatedGameObject::deactivateObject(AnimatedGameObject *a1, bool a2)
{
_BOOL4 m_isActivated; // w20
SpriteAnimationManager *m_animationManager; // x8
void **p_m_currentAnimation; // x20
__int128 v6; // [xsp+0h] [xbp-30h] BYREF
char *longStorage; // [xsp+10h] [xbp-20h]
m_isActivated = a1->m_isActivated;
EnhancedGameObject::deactivateObject(a1, a2);
if ( m_isActivated && !a1->m_isActivated )
{
m_animationManager = a1->m_animatedSprite->m_animationManager;
if ( m_animationManager->m_currentAnimation.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(
&v6,
(void *)m_animationManager->m_currentAnimation.m_data.m_long.capacitym1,
m_animationManager->m_currentAnimation.m_data.m_long.size);
}
else
{
v6 = *(_OWORD *)&m_animationManager->m_currentAnimation.m_data.m_short.sizex2;
longStorage = m_animationManager->m_currentAnimation.m_data.m_long.longStorage;
}
p_m_currentAnimation = (void **)&a1->m_currentAnimation;
if ( a1->m_currentAnimation.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete(*p_m_currentAnimation);
*(_OWORD *)p_m_currentAnimation = v6;
a1->m_currentAnimation.m_data.m_long.longStorage = longStorage;
SpriteAnimationManager::stopAnimations(a1->m_animatedSprite->m_animationManager);
}
}