//
// AnimatedGameObject::deactivateObject from 0x1001b72d0 to 0x1001b739f (207 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008c4578
//
// 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)
{
double v2; // xmm0_8
bool m_isActivated; // r14
SpriteAnimationManager *m_animationManager; // rax
std::string *v5; // rax
std::string *p_m_currentAnimation; // r14
__int128 v7; // [rsp+0h] [rbp-30h] BYREF
char *longStorage; // [rsp+10h] [rbp-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.sizex2 & 1) != 0 )
{
sub_100006B70(
&v7,
m_animationManager->m_currentAnimation.m_data.m_long.longStorage,
m_animationManager->m_currentAnimation.m_data.m_long.size,
v2);
p_m_currentAnimation = &a1->m_currentAnimation;
if ( (a1->m_currentAnimation.m_data.m_short.sizex2 & 1) == 0 )
{
LABEL_8:
p_m_currentAnimation->m_data.m_long.longStorage = longStorage;
*(_OWORD *)&p_m_currentAnimation->m_data.m_short.sizex2 = v7;
SpriteAnimationManager::stopAnimations(a1->m_animatedSprite->m_animationManager);
return;
}
}
else
{
v5 = &m_animationManager->m_currentAnimation;
longStorage = v5->m_data.m_long.longStorage;
v7 = *(_OWORD *)&v5->m_data.m_short.sizex2;
p_m_currentAnimation = &a1->m_currentAnimation;
if ( (a1->m_currentAnimation.m_data.m_short.sizex2 & 1) == 0 )
goto LABEL_8;
}
operator delete(a1->m_currentAnimation.m_data.m_long.longStorage);
goto LABEL_8;
}
}